bzr branch
http://gegoxaren.bato24.eu/bzr/%2Bjunk/invaders_vala
|
2
by Gusatv Hartvigsson
* moved a file ( miss spelled name) |
1 |
using SDL; |
2 |
using SDLGraphics; |
|
|
7
by Gusatv Hartvigsson
* added gee-1.0 to Makefile. |
3 |
using SDLImage; |
|
2
by Gusatv Hartvigsson
* moved a file ( miss spelled name) |
4 |
|
5 |
namespace invadersGame{ |
|
|
7
by Gusatv Hartvigsson
* added gee-1.0 to Makefile. |
6 |
public SDL.Surface GameObjectImage; |
7 |
|
|
|
2
by Gusatv Hartvigsson
* moved a file ( miss spelled name) |
8 |
class GameObject : Object{ |
|
7
by Gusatv Hartvigsson
* added gee-1.0 to Makefile. |
9 |
public struct MovmentVector { |
10 |
/** MovmentVector |
|
11 |
* Is used for storting a movement vector.
|
|
12 |
* IE: if it should move up (y < 0), up (y > 0), left (x < 0),
|
|
13 |
* right (x > 0).
|
|
14 |
*/
|
|
15 |
int x; |
|
16 |
int y; |
|
17 |
int Speed; /* Maximum movement over Time */ |
|
18 |
int Time; /* The time it takes to move */ |
|
19 |
} //MovmentVector |
|
20 |
|
|
21 |
MovmentVector mMovmentVector; |
|
22 |
|
|
23 |
public GameObject(){ |
|
24 |
GameObjectImage = SDLImage.load("media/images/null.png"); |
|
25 |
mMovmentVector = { |
|
26 |
Game.getRandom(SCREEN_WIDTH), |
|
27 |
Game.getRandom(SCREEN_HEIGHT), |
|
28 |
0, |
|
29 |
0 |
|
30 |
}; |
|
31 |
stdout.printf("X: %i, Y: %i\n", mMovmentVector.x, mMovmentVector.y); |
|
32 |
|
|
33 |
mMovmentVector.x = 10; |
|
34 |
|
|
35 |
stdout.printf("New X: %i, Y: %i\n", mMovmentVector.x, mMovmentVector.y); |
|
36 |
} |
|
|
2
by Gusatv Hartvigsson
* moved a file ( miss spelled name) |
37 |
|
38 |
} |
|
39 |
}
|