![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
test 1 doc
Ennemy/Enemy.h@8:d19b30a6cd69, 2020-05-26 (annotated)
- Committer:
- joebarhouch
- Date:
- Tue May 26 22:15:42 2020 +0000
- Revision:
- 8:d19b30a6cd69
- Child:
- 9:9830d3a78572
Implemented enemies with AI that walk around with physics
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joebarhouch | 8:d19b30a6cd69 | 1 | #ifndef ENEMY_H |
joebarhouch | 8:d19b30a6cd69 | 2 | #define ENEMY_H |
joebarhouch | 8:d19b30a6cd69 | 3 | |
joebarhouch | 8:d19b30a6cd69 | 4 | #include "mbed.h" |
joebarhouch | 8:d19b30a6cd69 | 5 | #include "N5110.h" |
joebarhouch | 8:d19b30a6cd69 | 6 | #include "Gamepad.h" |
joebarhouch | 8:d19b30a6cd69 | 7 | #include "Bitmap.h" |
joebarhouch | 8:d19b30a6cd69 | 8 | |
joebarhouch | 8:d19b30a6cd69 | 9 | |
joebarhouch | 8:d19b30a6cd69 | 10 | class Enemy |
joebarhouch | 8:d19b30a6cd69 | 11 | { |
joebarhouch | 8:d19b30a6cd69 | 12 | |
joebarhouch | 8:d19b30a6cd69 | 13 | public: |
joebarhouch | 8:d19b30a6cd69 | 14 | Enemy(int spawnX, int spawnY); |
joebarhouch | 8:d19b30a6cd69 | 15 | ~Enemy(); |
joebarhouch | 8:d19b30a6cd69 | 16 | |
joebarhouch | 8:d19b30a6cd69 | 17 | void draw(N5110 &lcd); |
joebarhouch | 8:d19b30a6cd69 | 18 | void update(int eYpos, bool efall); |
joebarhouch | 8:d19b30a6cd69 | 19 | bool fell(); |
joebarhouch | 8:d19b30a6cd69 | 20 | Vector2D get_pos(); |
joebarhouch | 8:d19b30a6cd69 | 21 | |
joebarhouch | 8:d19b30a6cd69 | 22 | |
joebarhouch | 8:d19b30a6cd69 | 23 | private: |
joebarhouch | 8:d19b30a6cd69 | 24 | int _enX; |
joebarhouch | 8:d19b30a6cd69 | 25 | int _enY; |
joebarhouch | 8:d19b30a6cd69 | 26 | bool eDir; |
joebarhouch | 8:d19b30a6cd69 | 27 | bool _fell; |
joebarhouch | 8:d19b30a6cd69 | 28 | |
joebarhouch | 8:d19b30a6cd69 | 29 | }; |
joebarhouch | 8:d19b30a6cd69 | 30 | |
joebarhouch | 8:d19b30a6cd69 | 31 | |
joebarhouch | 8:d19b30a6cd69 | 32 | #endif |