Yang Meng
/
207_program
Similar to the example code.
Bird/Bird.h@0:97418ec4c37d, 2019-04-23 (annotated)
- Committer:
- 2016110307
- Date:
- Tue Apr 23 16:04:18 2019 +0000
- Revision:
- 0:97418ec4c37d
- Child:
- 1:85ab0d979b57
Fundamental functions have achieved.
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 | 0:97418ec4c37d | 14 | void draw(N5110 &lcd); |
2016110307 | 0:97418ec4c37d | 15 | void update(Gamepad &pad); |
2016110307 | 0:97418ec4c37d | 16 | void background(N5110 &lcd); |
2016110307 | 0:97418ec4c37d | 17 | int get_y(); |
2016110307 | 0:97418ec4c37d | 18 | |
2016110307 | 0:97418ec4c37d | 19 | |
2016110307 | 0:97418ec4c37d | 20 | |
2016110307 | 0:97418ec4c37d | 21 | |
2016110307 | 0:97418ec4c37d | 22 | private : |
2016110307 | 0:97418ec4c37d | 23 | int _y; |
2016110307 | 0:97418ec4c37d | 24 | int _head; |
2016110307 | 0:97418ec4c37d | 25 | int _speed; |
2016110307 | 0:97418ec4c37d | 26 | |
2016110307 | 0:97418ec4c37d | 27 | }; |
2016110307 | 0:97418ec4c37d | 28 | |
2016110307 | 0:97418ec4c37d | 29 | #endif |
2016110307 | 0:97418ec4c37d | 30 |