![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
test 1 doc
Ennemy/Enemy.h@11:b3024ab59fa5, 2020-05-27 (annotated)
- Committer:
- joebarhouch
- Date:
- Wed May 27 03:52:11 2020 +0000
- Revision:
- 11:b3024ab59fa5
- Parent:
- 10:9317a62bd4d0
- Child:
- 14:58887d7e1072
Coin class and enemy collision;
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 | 11:b3024ab59fa5 | 8 | |
joebarhouch | 11:b3024ab59fa5 | 9 | #define TYPE_VERT 1 |
joebarhouch | 11:b3024ab59fa5 | 10 | #define TYPE_HOR 0 |
joebarhouch | 8:d19b30a6cd69 | 11 | |
joebarhouch | 10:9317a62bd4d0 | 12 | |
joebarhouch | 8:d19b30a6cd69 | 13 | class Enemy |
joebarhouch | 8:d19b30a6cd69 | 14 | { |
joebarhouch | 8:d19b30a6cd69 | 15 | |
joebarhouch | 8:d19b30a6cd69 | 16 | public: |
joebarhouch | 10:9317a62bd4d0 | 17 | Enemy(bool type,int spawnX, int spawnY); |
joebarhouch | 8:d19b30a6cd69 | 18 | ~Enemy(); |
joebarhouch | 8:d19b30a6cd69 | 19 | |
joebarhouch | 8:d19b30a6cd69 | 20 | void draw(N5110 &lcd); |
joebarhouch | 11:b3024ab59fa5 | 21 | void update(int _ev); |
joebarhouch | 9:9830d3a78572 | 22 | void set_pos(int x, int y); |
joebarhouch | 8:d19b30a6cd69 | 23 | Vector2D get_pos(); |
joebarhouch | 8:d19b30a6cd69 | 24 | |
joebarhouch | 8:d19b30a6cd69 | 25 | |
joebarhouch | 8:d19b30a6cd69 | 26 | private: |
joebarhouch | 10:9317a62bd4d0 | 27 | |
joebarhouch | 10:9317a62bd4d0 | 28 | void drawVertical(N5110 &lcd); |
joebarhouch | 10:9317a62bd4d0 | 29 | void drawHoriz(N5110 &lcd); |
joebarhouch | 10:9317a62bd4d0 | 30 | bool _type; |
joebarhouch | 8:d19b30a6cd69 | 31 | int _enX; |
joebarhouch | 8:d19b30a6cd69 | 32 | int _enY; |
joebarhouch | 10:9317a62bd4d0 | 33 | |
joebarhouch | 10:9317a62bd4d0 | 34 | bool xDir; |
joebarhouch | 10:9317a62bd4d0 | 35 | bool yDir; |
joebarhouch | 8:d19b30a6cd69 | 36 | }; |
joebarhouch | 8:d19b30a6cd69 | 37 | |
joebarhouch | 8:d19b30a6cd69 | 38 | |
joebarhouch | 8:d19b30a6cd69 | 39 | #endif |