Josh Davy / Mbed 2 deprecated Flip

Dependencies:   mbed el17jd

Committer:
joshdavy
Date:
Wed Apr 24 10:18:45 2019 +0000
Revision:
9:96969b1c6bde
Parent:
8:21b6d4dbce44
Child:
10:58cf89dd878c
Added win screen aswell as multiple levels.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joshdavy 3:b34685dbdb8d 1 #ifndef PLAYER_H
joshdavy 3:b34685dbdb8d 2 #define PLAYER_H
joshdavy 3:b34685dbdb8d 3
joshdavy 3:b34685dbdb8d 4 #include "mbed.h"
joshdavy 3:b34685dbdb8d 5 #include "N5110.h"
joshdavy 3:b34685dbdb8d 6 #include "Gamepad.h"
joshdavy 3:b34685dbdb8d 7 #include "Bitmap.h"
joshdavy 3:b34685dbdb8d 8 #include "Sprite.h"
joshdavy 7:68e06dda79f7 9 #include "Level.h"
joshdavy 8:21b6d4dbce44 10 #include "PlayerMap.h"
joshdavy 3:b34685dbdb8d 11
joshdavy 3:b34685dbdb8d 12 #define GRAVITY 2
joshdavy 3:b34685dbdb8d 13 /*Sprite Class*/
joshdavy 3:b34685dbdb8d 14
joshdavy 3:b34685dbdb8d 15 //extern N5110 lcd;
joshdavy 3:b34685dbdb8d 16
joshdavy 3:b34685dbdb8d 17 class Player : public Sprite{
joshdavy 3:b34685dbdb8d 18
joshdavy 3:b34685dbdb8d 19 public:
joshdavy 3:b34685dbdb8d 20 Player();
joshdavy 3:b34685dbdb8d 21 ~Player();
joshdavy 7:68e06dda79f7 22 void update(Gamepad &pad, Block blocks [],int number_of_blocks);
joshdavy 8:21b6d4dbce44 23 void init(int height,int width,Vector2D pos);
joshdavy 8:21b6d4dbce44 24
joshdavy 9:96969b1c6bde 25 void check_out_of_range();
joshdavy 9:96969b1c6bde 26 bool check_goal_reached(Vector2D goal);
joshdavy 9:96969b1c6bde 27
joshdavy 8:21b6d4dbce44 28 bool can_move_up(Block blocks [],int number_of_blocks);
joshdavy 8:21b6d4dbce44 29 bool can_move_down(Block blocks [],int number_of_blocks);
joshdavy 8:21b6d4dbce44 30 bool can_move_left(Block blocks [],int number_of_blocks);
joshdavy 8:21b6d4dbce44 31 bool can_move_right(Block blocks [],int number_of_blocks);
joshdavy 7:68e06dda79f7 32
joshdavy 7:68e06dda79f7 33 private:
joshdavy 7:68e06dda79f7 34 int _orientation;
joshdavy 8:21b6d4dbce44 35 int _direction;
joshdavy 9:96969b1c6bde 36 Vector2D _initial_pos;
joshdavy 3:b34685dbdb8d 37 };
joshdavy 3:b34685dbdb8d 38
joshdavy 3:b34685dbdb8d 39 #endif