class for obstacles in Car_race game
Obstacles.h@0:f8968ec0ec1b, 2017-03-13 (annotated)
- Committer:
- fy14aaz
- Date:
- Mon Mar 13 16:08:28 2017 +0000
- Revision:
- 0:f8968ec0ec1b
- Child:
- 1:a735e7396af4
created random obstacles
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 | 0:f8968ec0ec1b | 18 | void draw(N5110 &lcd); |
fy14aaz | 0:f8968ec0ec1b | 19 | void update(int seed); |
fy14aaz | 0:f8968ec0ec1b | 20 | |
fy14aaz | 0:f8968ec0ec1b | 21 | private: |
fy14aaz | 0:f8968ec0ec1b | 22 | |
fy14aaz | 0:f8968ec0ec1b | 23 | int _Obstacle_x; |
fy14aaz | 0:f8968ec0ec1b | 24 | }; |
fy14aaz | 0:f8968ec0ec1b | 25 | |
fy14aaz | 0:f8968ec0ec1b | 26 | #endif |