勇帜 周
/
2645_Final_project_1
bird
bird/bird.h@1:8672e52115e3, 2019-05-04 (annotated)
- Committer:
- 1013373474
- Date:
- Sat May 04 10:24:57 2019 +0000
- Revision:
- 1:8672e52115e3
- Parent:
- 0:3887ebee1b37
- Child:
- 2:fb9c05867677
fly bird
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
1013373474 | 0:3887ebee1b37 | 1 | #include "mbed.h" |
1013373474 | 0:3887ebee1b37 | 2 | #include "N5110.h" |
1013373474 | 0:3887ebee1b37 | 3 | #include "Gamepad.h" |
1013373474 | 0:3887ebee1b37 | 4 | |
1013373474 | 0:3887ebee1b37 | 5 | |
1013373474 | 0:3887ebee1b37 | 6 | |
1013373474 | 0:3887ebee1b37 | 7 | |
1013373474 | 0:3887ebee1b37 | 8 | struct Data{ |
1013373474 | 0:3887ebee1b37 | 9 | int y; |
1013373474 | 0:3887ebee1b37 | 10 | }; |
1013373474 | 0:3887ebee1b37 | 11 | |
1013373474 | 0:3887ebee1b37 | 12 | class bird |
1013373474 | 0:3887ebee1b37 | 13 | { |
1013373474 | 0:3887ebee1b37 | 14 | |
1013373474 | 0:3887ebee1b37 | 15 | |
1013373474 | 0:3887ebee1b37 | 16 | public: |
1013373474 | 0:3887ebee1b37 | 17 | |
1013373474 | 0:3887ebee1b37 | 18 | void init(int size,int speed); |
1013373474 | 0:3887ebee1b37 | 19 | void draw(N5110 &lcd); |
1013373474 | 1:8672e52115e3 | 20 | void check(Gamepad &pad, N5110 &lcd); |
1013373474 | 0:3887ebee1b37 | 21 | void init(); |
1013373474 | 0:3887ebee1b37 | 22 | Data get_data(); |
1013373474 | 0:3887ebee1b37 | 23 | void update(); |
1013373474 | 0:3887ebee1b37 | 24 | |
1013373474 | 0:3887ebee1b37 | 25 | private: |
1013373474 | 0:3887ebee1b37 | 26 | int _y; |
1013373474 | 0:3887ebee1b37 | 27 | Data _data; |
1013373474 | 0:3887ebee1b37 | 28 | }; |