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.
Dependencies: mbed
Diff: Gameengine/Gameengine.h
- Revision:
- 31:ed5f7f15a1ed
- Parent:
- 29:d85886364643
diff -r 6d6b48fe3679 -r ed5f7f15a1ed Gameengine/Gameengine.h
--- a/Gameengine/Gameengine.h Wed Apr 10 14:29:14 2019 +0000
+++ b/Gameengine/Gameengine.h Wed Apr 10 16:20:28 2019 +0000
@@ -4,10 +4,14 @@
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
-#include "Miner.h"
+#include "Sprites.h"
#include "Level1.h"
#include "Levelengine.h"
+struct Key{
+ bool key[5];
+};
+
class Gameengine
{
@@ -15,14 +19,17 @@
Gameengine();
~Gameengine();
- //void get_miner_pos();
+ void get_miner_pos();
void read_direction(Gamepad &pad);
void update(N5110 &lcd, Gamepad &pad);
void game_init();
void draw(Key _k, N5110 &lcd, Gamepad &pad);
void lose_life(N5110 &lcd);
bool game_over();
- void next_level(N5110 &lcd);
+ void next_level(N5110 &lcd);
+ bool enemy_death();
+
+ bool exit_level(int x, int y, N5110 &lcd);
private:
@@ -34,7 +41,7 @@
int _turn_flag;
int _counter;
- Miner _miner;
+ Sprites _sprites;
Direction _d;
Level1 _l1;
Timer t;