Yang Zhenye 201199680
Dependencies: mbed
Rooney/Rooney.h@5:fcad75e9b9e1, 2020-05-14 (annotated)
- Committer:
- yangzhenye
- Date:
- Thu May 14 14:13:03 2020 +0000
- Revision:
- 5:fcad75e9b9e1
- Parent:
- 4:eb8dca1dc341
- Child:
- 6:4abef55fee88
first
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yangzhenye | 4:eb8dca1dc341 | 1 | #ifndef ROONEY_H |
yangzhenye | 4:eb8dca1dc341 | 2 | #define ROONEY_H |
yangzhenye | 4:eb8dca1dc341 | 3 | |
yangzhenye | 4:eb8dca1dc341 | 4 | #include "mbed.h" |
yangzhenye | 4:eb8dca1dc341 | 5 | #include "N5110.h" |
yangzhenye | 4:eb8dca1dc341 | 6 | #include "Gamepad.h" |
yangzhenye | 5:fcad75e9b9e1 | 7 | enum rooneybody{left, right, stand}; |
yangzhenye | 4:eb8dca1dc341 | 8 | class player |
yangzhenye | 4:eb8dca1dc341 | 9 | { |
yangzhenye | 4:eb8dca1dc341 | 10 | public: |
yangzhenye | 4:eb8dca1dc341 | 11 | // Constructor and destructor. |
yangzhenye | 4:eb8dca1dc341 | 12 | /** |
yangzhenye | 4:eb8dca1dc341 | 13 | * @brief Constructor @details Non user specified. |
yangzhenye | 4:eb8dca1dc341 | 14 | */ |
yangzhenye | 4:eb8dca1dc341 | 15 | player(); |
yangzhenye | 4:eb8dca1dc341 | 16 | /** |
yangzhenye | 4:eb8dca1dc341 | 17 | * @brief Destructor @details Non user specified. |
yangzhenye | 4:eb8dca1dc341 | 18 | */ |
yangzhenye | 4:eb8dca1dc341 | 19 | ~player(); |
yangzhenye | 4:eb8dca1dc341 | 20 | |
yangzhenye | 4:eb8dca1dc341 | 21 | void init(); |
yangzhenye | 5:fcad75e9b9e1 | 22 | void set_palyer_x(float joy_x, int speed); |
yangzhenye | 5:fcad75e9b9e1 | 23 | void draw_gate(N5110 &lcd); |
yangzhenye | 4:eb8dca1dc341 | 24 | bool collisicon_flag(); |
yangzhenye | 4:eb8dca1dc341 | 25 | |
yangzhenye | 5:fcad75e9b9e1 | 26 | int * get_form(rooneybody body); |
yangzhenye | 4:eb8dca1dc341 | 27 | int get_y(); |
yangzhenye | 4:eb8dca1dc341 | 28 | int get_x(); |
yangzhenye | 4:eb8dca1dc341 | 29 | int get_speed(); |
yangzhenye | 4:eb8dca1dc341 | 30 | |
yangzhenye | 4:eb8dca1dc341 | 31 | private: |
yangzhenye | 4:eb8dca1dc341 | 32 | |
yangzhenye | 5:fcad75e9b9e1 | 33 | int _player_x; |
yangzhenye | 5:fcad75e9b9e1 | 34 | int _player_y; |
yangzhenye | 5:fcad75e9b9e1 | 35 | bool _c_flag; |
yangzhenye | 5:fcad75e9b9e1 | 36 | int _speed; |
yangzhenye | 5:fcad75e9b9e1 | 37 | rooneybody body; |
yangzhenye | 5:fcad75e9b9e1 | 38 | }; |
yangzhenye | 4:eb8dca1dc341 | 39 | #endif |