勇帜 周
/
2645_Final_project_1
bird
structure_2/structure_2.h@0:3887ebee1b37, 2019-05-03 (annotated)
- Committer:
- 1013373474
- Date:
- Fri May 03 17:51:38 2019 +0000
- Revision:
- 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 | struct Data2{ |
1013373474 | 0:3887ebee1b37 | 8 | int mm; //障碍物左上角的点的横坐标 |
1013373474 | 0:3887ebee1b37 | 9 | int nn; // 障碍物间隔左上角点的纵坐标 |
1013373474 | 0:3887ebee1b37 | 10 | int qq; //the second |
1013373474 | 0:3887ebee1b37 | 11 | int oo; // the third |
1013373474 | 0:3887ebee1b37 | 12 | int pp; // the second heng zuobiao |
1013373474 | 0:3887ebee1b37 | 13 | int ee; // the third heng zuobiao |
1013373474 | 0:3887ebee1b37 | 14 | int tt;// 分数 |
1013373474 | 0:3887ebee1b37 | 15 | }; |
1013373474 | 0:3887ebee1b37 | 16 | |
1013373474 | 0:3887ebee1b37 | 17 | |
1013373474 | 0:3887ebee1b37 | 18 | |
1013373474 | 0:3887ebee1b37 | 19 | class structure_2 |
1013373474 | 0:3887ebee1b37 | 20 | { |
1013373474 | 0:3887ebee1b37 | 21 | public: |
1013373474 | 0:3887ebee1b37 | 22 | |
1013373474 | 0:3887ebee1b37 | 23 | void init(int size,int speed); |
1013373474 | 0:3887ebee1b37 | 24 | void draw(N5110 &lcd); |
1013373474 | 0:3887ebee1b37 | 25 | void init(); |
1013373474 | 0:3887ebee1b37 | 26 | Data2 get_data2(); |
1013373474 | 0:3887ebee1b37 | 27 | void update(); |
1013373474 | 0:3887ebee1b37 | 28 | |
1013373474 | 0:3887ebee1b37 | 29 | |
1013373474 | 0:3887ebee1b37 | 30 | private: |
1013373474 | 0:3887ebee1b37 | 31 | int _mm; //障碍物左上角的点的横坐标 |
1013373474 | 0:3887ebee1b37 | 32 | int _nn; // 障碍物间隔左上角点的纵坐标 |
1013373474 | 0:3887ebee1b37 | 33 | int _qq; //the second |
1013373474 | 0:3887ebee1b37 | 34 | int _oo; // the third |
1013373474 | 0:3887ebee1b37 | 35 | int _pp; // the second heng zuobiao |
1013373474 | 0:3887ebee1b37 | 36 | int _ee; // the third heng zuobiao |
1013373474 | 0:3887ebee1b37 | 37 | int _tt; // the score |
1013373474 | 0:3887ebee1b37 | 38 | Data2 _data2; |
1013373474 | 0:3887ebee1b37 | 39 | }; |