Nemesis game, friendly
Friendly.h@4:879c4cb8a7e4, 2017-03-15 (annotated)
- Committer:
- musallambseiso
- Date:
- Wed Mar 15 14:34:43 2017 +0000
- Revision:
- 4:879c4cb8a7e4
- Child:
- 9:3c411d37d390
Added frame, enemy ships, friendly ship, 4-directional movement, random-nature movement of enemy ships
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
musallambseiso | 4:879c4cb8a7e4 | 1 | #ifndef FRIENDLY_H |
musallambseiso | 4:879c4cb8a7e4 | 2 | #define FRIENDLY_H |
musallambseiso | 4:879c4cb8a7e4 | 3 | |
musallambseiso | 4:879c4cb8a7e4 | 4 | #include "mbed.h" |
musallambseiso | 4:879c4cb8a7e4 | 5 | #include "N5110.h" |
musallambseiso | 4:879c4cb8a7e4 | 6 | #include "Gamepad.h" |
musallambseiso | 4:879c4cb8a7e4 | 7 | |
musallambseiso | 4:879c4cb8a7e4 | 8 | class Friendly |
musallambseiso | 4:879c4cb8a7e4 | 9 | { |
musallambseiso | 4:879c4cb8a7e4 | 10 | public: |
musallambseiso | 4:879c4cb8a7e4 | 11 | |
musallambseiso | 4:879c4cb8a7e4 | 12 | Friendly(); |
musallambseiso | 4:879c4cb8a7e4 | 13 | ~Friendly(); |
musallambseiso | 4:879c4cb8a7e4 | 14 | void init(int x,int height,int width); |
musallambseiso | 4:879c4cb8a7e4 | 15 | void draw(N5110 &lcd); |
musallambseiso | 4:879c4cb8a7e4 | 16 | void update(Direction d,float mag); |
musallambseiso | 4:879c4cb8a7e4 | 17 | Vector2D get_pos(); |
musallambseiso | 4:879c4cb8a7e4 | 18 | |
musallambseiso | 4:879c4cb8a7e4 | 19 | private: |
musallambseiso | 4:879c4cb8a7e4 | 20 | |
musallambseiso | 4:879c4cb8a7e4 | 21 | int _height; |
musallambseiso | 4:879c4cb8a7e4 | 22 | int _width; |
musallambseiso | 4:879c4cb8a7e4 | 23 | int _x; |
musallambseiso | 4:879c4cb8a7e4 | 24 | int _y; |
musallambseiso | 4:879c4cb8a7e4 | 25 | int _speed; |
musallambseiso | 4:879c4cb8a7e4 | 26 | int _score; |
musallambseiso | 4:879c4cb8a7e4 | 27 | |
musallambseiso | 4:879c4cb8a7e4 | 28 | }; |
musallambseiso | 4:879c4cb8a7e4 | 29 | #endif |