class for bullet in Car_race game
Bullet.h@3:7015c77e39a2, 2017-04-07 (annotated)
- Committer:
- fy14aaz
- Date:
- Fri Apr 07 10:56:15 2017 +0000
- Revision:
- 3:7015c77e39a2
- Parent:
- 1:6bd0cbdf15f7
- Child:
- 4:a32443aee8f8
working on destroying obstacles using buttons
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fy14aaz | 1:6bd0cbdf15f7 | 1 | #ifndef BULLET_H |
fy14aaz | 1:6bd0cbdf15f7 | 2 | #define BULLET_H |
fy14aaz | 1:6bd0cbdf15f7 | 3 | |
fy14aaz | 1:6bd0cbdf15f7 | 4 | #include "mbed.h" |
fy14aaz | 1:6bd0cbdf15f7 | 5 | #include "N5110.h" |
fy14aaz | 1:6bd0cbdf15f7 | 6 | #include "Gamepad.h" |
fy14aaz | 1:6bd0cbdf15f7 | 7 | |
fy14aaz | 1:6bd0cbdf15f7 | 8 | |
fy14aaz | 1:6bd0cbdf15f7 | 9 | class Bullet |
fy14aaz | 1:6bd0cbdf15f7 | 10 | { |
fy14aaz | 1:6bd0cbdf15f7 | 11 | |
fy14aaz | 1:6bd0cbdf15f7 | 12 | public: |
fy14aaz | 1:6bd0cbdf15f7 | 13 | Bullet(); |
fy14aaz | 1:6bd0cbdf15f7 | 14 | ~Bullet(); |
fy14aaz | 1:6bd0cbdf15f7 | 15 | void init(int car_x,int car_y); |
fy14aaz | 1:6bd0cbdf15f7 | 16 | void draw(N5110 &lcd); |
fy14aaz | 1:6bd0cbdf15f7 | 17 | // void clearCar(N5110 &lcd); |
fy14aaz | 3:7015c77e39a2 | 18 | void update(); |
fy14aaz | 1:6bd0cbdf15f7 | 19 | // void accident(N5110 &lcd); |
fy14aaz | 1:6bd0cbdf15f7 | 20 | |
fy14aaz | 1:6bd0cbdf15f7 | 21 | private: |
fy14aaz | 1:6bd0cbdf15f7 | 22 | |
fy14aaz | 1:6bd0cbdf15f7 | 23 | int _bullet_x; |
fy14aaz | 1:6bd0cbdf15f7 | 24 | int _bullet_y; |
fy14aaz | 1:6bd0cbdf15f7 | 25 | int _speed; |
fy14aaz | 1:6bd0cbdf15f7 | 26 | |
fy14aaz | 1:6bd0cbdf15f7 | 27 | }; |
fy14aaz | 1:6bd0cbdf15f7 | 28 | #endif |