Yang Zhenye 201199680

Dependencies:   mbed

Committer:
yangzhenye
Date:
Thu May 14 17:19:27 2020 +0000
Revision:
7:a69ae964412c
Parent:
6:4abef55fee88
Child:
9:a5a82b3d1102
el17zy

Who changed what in which revision?

UserRevisionLine numberNew 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 6:4abef55fee88 23 //void draw_gate(N5110 &lcd);]
yangzhenye 6:4abef55fee88 24 bool collision_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 6:4abef55fee88 30 void add_score();
yangzhenye 6:4abef55fee88 31 int get_score();
yangzhenye 7:a69ae964412c 32 int drawrooney(N5110 &lcd);
yangzhenye 4:eb8dca1dc341 33
yangzhenye 4:eb8dca1dc341 34 private:
yangzhenye 4:eb8dca1dc341 35
yangzhenye 5:fcad75e9b9e1 36 int _player_x;
yangzhenye 5:fcad75e9b9e1 37 int _player_y;
yangzhenye 6:4abef55fee88 38 bool _collision_flag;
yangzhenye 5:fcad75e9b9e1 39 int _speed;
yangzhenye 6:4abef55fee88 40 int _x;
yangzhenye 6:4abef55fee88 41 int _y;
yangzhenye 6:4abef55fee88 42 int _score;
yangzhenye 5:fcad75e9b9e1 43 rooneybody body;
yangzhenye 5:fcad75e9b9e1 44 };
yangzhenye 4:eb8dca1dc341 45 #endif