Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47b4f23
commit 996470b
Showing
34 changed files
with
1,825 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
default | ||
{ | ||
title = Ethanon Engine; | ||
richLighting = true; | ||
|
||
width = 480; | ||
height = 480; | ||
windowed = true; | ||
vsync = true; | ||
} |
195 changes: 195 additions & 0 deletions
195
intermediate/omnidirectional-movement/data/Verdana14_shadow.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
195 changes: 195 additions & 0 deletions
195
intermediate/omnidirectional-movement/data/Verdana20.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
195 changes: 195 additions & 0 deletions
195
intermediate/omnidirectional-movement/data/Verdana20_shadow.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
195 changes: 195 additions & 0 deletions
195
intermediate/omnidirectional-movement/data/Verdana24.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
195 changes: 195 additions & 0 deletions
195
intermediate/omnidirectional-movement/data/Verdana24_shadow.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
195 changes: 195 additions & 0 deletions
195
intermediate/omnidirectional-movement/data/Verdana30.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
195 changes: 195 additions & 0 deletions
195
intermediate/omnidirectional-movement/data/Verdana30_shadow.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
196 changes: 196 additions & 0 deletions
196
intermediate/omnidirectional-movement/data/Verdana64.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
196 changes: 196 additions & 0 deletions
196
intermediate/omnidirectional-movement/data/Verdana64_shadow.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
All *.PAR effect files must be in this folder. |
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
This example takes the "shooting-spaceship" code and assign | ||
the left and right keys to rotate the ship and up and down | ||
keys do move it forward and backwards depending on current | ||
direction. | ||
*/ | ||
|
||
void main() | ||
{ | ||
LoadScene("scenes/scene.esc"); | ||
} | ||
|
||
// Receives a vector and an angle value in radians and returns the rotated vector | ||
vector2 rotate(const vector2 &in p, const float angleRad) | ||
{ | ||
return vector2( | ||
p.x * cos(angleRad) + p.y * sin(angleRad), | ||
- p.x * sin(angleRad) + p.y * cos(angleRad)); | ||
} | ||
|
||
// Controls the ship | ||
void ETHCallback_ship(ETHEntity@ thisEntity) | ||
{ | ||
ETHInput@ input = GetInputHandle(); | ||
|
||
// computes the distance our ship must move in order to keep | ||
// a speed of 60 pixels per second | ||
float speed = UnitsPerSecond(120.0f); | ||
float angleSpeed = UnitsPerSecond(160.0f); | ||
|
||
vector2 direction(0.0f,-1.0f); | ||
|
||
if (input.KeyDown(K_RIGHT)) | ||
{ | ||
thisEntity.AddToAngle(-angleSpeed); | ||
} | ||
|
||
if (input.KeyDown(K_LEFT)) | ||
{ | ||
thisEntity.AddToAngle(angleSpeed); | ||
} | ||
|
||
// compute rotation vector and do movement | ||
direction = rotate(direction, degreeToRadian(thisEntity.GetAngle())); | ||
|
||
if (input.KeyDown(K_UP)) | ||
{ | ||
thisEntity.AddToPositionXY(direction * speed); | ||
} | ||
|
||
if (input.KeyDown(K_DOWN)) | ||
{ | ||
thisEntity.AddToPositionXY(direction *-speed); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
intermediate/omnidirectional-movement/omnidirectional-movement.ethproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ethanon Engine project file |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
All particle sound effect files must be in this folder. |