Haoyan Zhang
/
el17h2z1
deemo1
Boss/Boss.h@6:b59bc5e15cf3, 2020-05-14 (annotated)
- Committer:
- haoyan
- Date:
- Thu May 14 06:30:39 2020 +0000
- Revision:
- 6:b59bc5e15cf3
- Parent:
- 3:1db91ad3ab84
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
haoyan | 3:1db91ad3ab84 | 1 | #ifndef BOSS_H |
haoyan | 3:1db91ad3ab84 | 2 | #define BOSS_H |
haoyan | 3:1db91ad3ab84 | 3 | |
haoyan | 3:1db91ad3ab84 | 4 | #include "mbed.h" |
haoyan | 3:1db91ad3ab84 | 5 | #include "N5110.h" |
haoyan | 3:1db91ad3ab84 | 6 | #include "Gamepad.h" |
haoyan | 3:1db91ad3ab84 | 7 | #include "Battleship.h" |
haoyan | 3:1db91ad3ab84 | 8 | |
haoyan | 3:1db91ad3ab84 | 9 | /** Boss Class |
haoyan | 3:1db91ad3ab84 | 10 | * @brief Boss |
haoyan | 3:1db91ad3ab84 | 11 | * @author Haoyan Zhang |
haoyan | 3:1db91ad3ab84 | 12 | * @date May, 2020 |
haoyan | 3:1db91ad3ab84 | 13 | */ |
haoyan | 3:1db91ad3ab84 | 14 | |
haoyan | 3:1db91ad3ab84 | 15 | class Boss |
haoyan | 3:1db91ad3ab84 | 16 | { |
haoyan | 3:1db91ad3ab84 | 17 | public: |
haoyan | 3:1db91ad3ab84 | 18 | |
haoyan | 3:1db91ad3ab84 | 19 | Boss(); |
haoyan | 3:1db91ad3ab84 | 20 | ~Boss(); |
haoyan | 3:1db91ad3ab84 | 21 | void init(int height, int width, int speed); |
haoyan | 3:1db91ad3ab84 | 22 | void draw(N5110 &lcd); |
haoyan | 3:1db91ad3ab84 | 23 | void update(); |
haoyan | 3:1db91ad3ab84 | 24 | void set_velocity(Vector2D v); |
haoyan | 3:1db91ad3ab84 | 25 | Vector2D get_velocity(); |
haoyan | 3:1db91ad3ab84 | 26 | Vector2D get_pos(); |
haoyan | 3:1db91ad3ab84 | 27 | void set_pos(Vector2D p); |
haoyan | 3:1db91ad3ab84 | 28 | |
haoyan | 3:1db91ad3ab84 | 29 | private: |
haoyan | 3:1db91ad3ab84 | 30 | |
haoyan | 3:1db91ad3ab84 | 31 | Vector2D _velocity; |
haoyan | 3:1db91ad3ab84 | 32 | int _height; |
haoyan | 3:1db91ad3ab84 | 33 | int _width; |
haoyan | 3:1db91ad3ab84 | 34 | int _x; |
haoyan | 3:1db91ad3ab84 | 35 | int _y; |
haoyan | 3:1db91ad3ab84 | 36 | }; |
haoyan | 3:1db91ad3ab84 | 37 | #endif |
haoyan | 3:1db91ad3ab84 | 38 | |
haoyan | 3:1db91ad3ab84 | 39 |