Yang Zhenye 201199680

Dependencies:   mbed

Committer:
yangzhenye
Date:
Thu May 14 15:55:41 2020 +0000
Revision:
6:4abef55fee88
Parent:
5:fcad75e9b9e1
Child:
7:a69ae964412c
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 4:eb8dca1dc341 32
yangzhenye 4:eb8dca1dc341 33 private:
yangzhenye 4:eb8dca1dc341 34
yangzhenye 5:fcad75e9b9e1 35 int _player_x;
yangzhenye 5:fcad75e9b9e1 36 int _player_y;
yangzhenye 6:4abef55fee88 37 bool _collision_flag;
yangzhenye 5:fcad75e9b9e1 38 int _speed;
yangzhenye 6:4abef55fee88 39 int _x;
yangzhenye 6:4abef55fee88 40 int _y;
yangzhenye 6:4abef55fee88 41 int _score;
yangzhenye 5:fcad75e9b9e1 42 rooneybody body;
yangzhenye 5:fcad75e9b9e1 43 };
yangzhenye 4:eb8dca1dc341 44 #endif