Yang Meng
/
207_program
Similar to the example code.
Bird/Bird.h@1:85ab0d979b57, 2019-05-04 (annotated)
- Committer:
- 2016110307
- Date:
- Sat May 04 08:53:09 2019 +0000
- Revision:
- 1:85ab0d979b57
- Parent:
- 0:97418ec4c37d
- Child:
- 2:533869513c4a
Add new function which can select the difficult
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
2016110307 | 0:97418ec4c37d | 1 | #ifndef BIRD_H |
2016110307 | 0:97418ec4c37d | 2 | #define BIRD_H |
2016110307 | 0:97418ec4c37d | 3 | |
2016110307 | 0:97418ec4c37d | 4 | #include "mbed.h" |
2016110307 | 0:97418ec4c37d | 5 | #include "N5110.h" |
2016110307 | 0:97418ec4c37d | 6 | #include "Gamepad.h" |
2016110307 | 0:97418ec4c37d | 7 | |
2016110307 | 0:97418ec4c37d | 8 | |
2016110307 | 0:97418ec4c37d | 9 | class Bird |
2016110307 | 0:97418ec4c37d | 10 | |
2016110307 | 0:97418ec4c37d | 11 | { |
2016110307 | 0:97418ec4c37d | 12 | public : |
2016110307 | 0:97418ec4c37d | 13 | void init(); |
2016110307 | 1:85ab0d979b57 | 14 | void set_speed(int speed); |
2016110307 | 0:97418ec4c37d | 15 | void draw(N5110 &lcd); |
2016110307 | 0:97418ec4c37d | 16 | void update(Gamepad &pad); |
2016110307 | 0:97418ec4c37d | 17 | void background(N5110 &lcd); |
2016110307 | 0:97418ec4c37d | 18 | int get_y(); |
2016110307 | 0:97418ec4c37d | 19 | |
2016110307 | 0:97418ec4c37d | 20 | |
2016110307 | 0:97418ec4c37d | 21 | |
2016110307 | 0:97418ec4c37d | 22 | |
2016110307 | 0:97418ec4c37d | 23 | private : |
2016110307 | 0:97418ec4c37d | 24 | int _y; |
2016110307 | 0:97418ec4c37d | 25 | int _head; |
2016110307 | 0:97418ec4c37d | 26 | int _speed; |
2016110307 | 0:97418ec4c37d | 27 | |
2016110307 | 0:97418ec4c37d | 28 | }; |
2016110307 | 0:97418ec4c37d | 29 | |
2016110307 | 0:97418ec4c37d | 30 | #endif |
2016110307 | 0:97418ec4c37d | 31 |