![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
runner
Dependencies: mbed
Obstacle/Obstacle.h@4:7fca66882a00, 2019-05-09 (annotated)
- Committer:
- kamtas
- Date:
- Thu May 09 06:17:43 2019 +0000
- Revision:
- 4:7fca66882a00
- Parent:
- 3:59e67155e2dd
- Child:
- 6:ee273baff27c
obstacle can be now be spawned on demand using the X button (for testing only)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kamtas | 3:59e67155e2dd | 1 | #ifndef OBSTACLE_H |
kamtas | 3:59e67155e2dd | 2 | #define OBSTACLE_H |
kamtas | 3:59e67155e2dd | 3 | |
kamtas | 3:59e67155e2dd | 4 | #include "mbed.h" |
kamtas | 3:59e67155e2dd | 5 | #include "N5110.h" |
kamtas | 3:59e67155e2dd | 6 | #include "Gamepad.h" |
kamtas | 3:59e67155e2dd | 7 | |
kamtas | 3:59e67155e2dd | 8 | class Obstacle |
kamtas | 3:59e67155e2dd | 9 | { |
kamtas | 3:59e67155e2dd | 10 | public: |
kamtas | 3:59e67155e2dd | 11 | |
kamtas | 3:59e67155e2dd | 12 | Obstacle(); |
kamtas | 3:59e67155e2dd | 13 | ~Obstacle(); |
kamtas | 3:59e67155e2dd | 14 | void init(int y,int height,int width); |
kamtas | 3:59e67155e2dd | 15 | void draw(N5110 &lcd); |
kamtas | 4:7fca66882a00 | 16 | void update(bool ran); |
kamtas | 3:59e67155e2dd | 17 | Vector2D get_pos(); |
kamtas | 3:59e67155e2dd | 18 | |
kamtas | 3:59e67155e2dd | 19 | private: |
kamtas | 3:59e67155e2dd | 20 | |
kamtas | 3:59e67155e2dd | 21 | int _height; |
kamtas | 3:59e67155e2dd | 22 | int _width; |
kamtas | 3:59e67155e2dd | 23 | int _x; |
kamtas | 3:59e67155e2dd | 24 | int _y; |
kamtas | 3:59e67155e2dd | 25 | int _speed; |
kamtas | 3:59e67155e2dd | 26 | |
kamtas | 3:59e67155e2dd | 27 | }; |
kamtas | 3:59e67155e2dd | 28 | #endif |