class for obstacles in Car_race game
Obstacles.h@9:d5f90988545e, 2017-04-21 (annotated)
- Committer:
- fy14aaz
- Date:
- Fri Apr 21 21:45:49 2017 +0000
- Revision:
- 9:d5f90988545e
- Parent:
- 8:c8007ccac5c0
- Child:
- 10:515df7535b2f
worked on the bullet with the jumping functions
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fy14aaz | 0:f8968ec0ec1b | 1 | #ifndef OBSTACLES_H |
fy14aaz | 0:f8968ec0ec1b | 2 | #define OBSTACLES_H |
fy14aaz | 0:f8968ec0ec1b | 3 | |
fy14aaz | 0:f8968ec0ec1b | 4 | #include "mbed.h" |
fy14aaz | 0:f8968ec0ec1b | 5 | #include "N5110.h" |
fy14aaz | 0:f8968ec0ec1b | 6 | #include "Gamepad.h" |
fy14aaz | 0:f8968ec0ec1b | 7 | |
fy14aaz | 0:f8968ec0ec1b | 8 | class Obstacles |
fy14aaz | 0:f8968ec0ec1b | 9 | |
fy14aaz | 0:f8968ec0ec1b | 10 | { |
fy14aaz | 0:f8968ec0ec1b | 11 | |
fy14aaz | 0:f8968ec0ec1b | 12 | public: |
fy14aaz | 0:f8968ec0ec1b | 13 | |
fy14aaz | 0:f8968ec0ec1b | 14 | Obstacles(); |
fy14aaz | 0:f8968ec0ec1b | 15 | ~Obstacles(); |
fy14aaz | 0:f8968ec0ec1b | 16 | |
fy14aaz | 0:f8968ec0ec1b | 17 | void init(int seed); |
fy14aaz | 1:a735e7396af4 | 18 | void draw(N5110 &lcd,int seed); |
fy14aaz | 1:a735e7396af4 | 19 | void update(N5110 &lcd); |
fy14aaz | 8:c8007ccac5c0 | 20 | void addScore(N5110 &lcd); |
fy14aaz | 9:d5f90988545e | 21 | void updateScore(int Event); |
fy14aaz | 8:c8007ccac5c0 | 22 | int getScore(); |
fy14aaz | 9:d5f90988545e | 23 | int getTotalScore(); |
fy14aaz | 0:f8968ec0ec1b | 24 | |
fy14aaz | 0:f8968ec0ec1b | 25 | private: |
fy14aaz | 0:f8968ec0ec1b | 26 | |
fy14aaz | 1:a735e7396af4 | 27 | |
fy14aaz | 0:f8968ec0ec1b | 28 | int _Obstacle_x; |
fy14aaz | 8:c8007ccac5c0 | 29 | int _score; |
fy14aaz | 9:d5f90988545e | 30 | int _totalscore; |
fy14aaz | 0:f8968ec0ec1b | 31 | }; |
fy14aaz | 0:f8968ec0ec1b | 32 | |
fy14aaz | 0:f8968ec0ec1b | 33 | #endif |