Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Player/Player.h
- Revision:
- 8:21b6d4dbce44
- Parent:
- 7:68e06dda79f7
- Child:
- 9:96969b1c6bde
diff -r 68e06dda79f7 -r 21b6d4dbce44 Player/Player.h
--- a/Player/Player.h Wed Apr 17 12:39:46 2019 +0000
+++ b/Player/Player.h Fri Apr 19 17:54:09 2019 +0000
@@ -7,6 +7,7 @@
#include "Bitmap.h"
#include "Sprite.h"
#include "Level.h"
+#include "PlayerMap.h"
#define GRAVITY 2
/*Sprite Class*/
@@ -19,9 +20,16 @@
Player();
~Player();
void update(Gamepad &pad, Block blocks [],int number_of_blocks);
+ void init(int height,int width,Vector2D pos);
+
+ bool can_move_up(Block blocks [],int number_of_blocks);
+ bool can_move_down(Block blocks [],int number_of_blocks);
+ bool can_move_left(Block blocks [],int number_of_blocks);
+ bool can_move_right(Block blocks [],int number_of_blocks);
private:
int _orientation;
+ int _direction;
};
#endif
\ No newline at end of file