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:
- 41:0cf320f73424
- Parent:
- 40:913339e324b8
- Child:
- 42:d81c008b0436
diff -r 913339e324b8 -r 0cf320f73424 Gameengine/Gameengine.h
--- a/Gameengine/Gameengine.h Mon Apr 15 02:01:41 2019 +0000
+++ b/Gameengine/Gameengine.h Tue Apr 16 02:01:53 2019 +0000
@@ -8,6 +8,8 @@
#include "Level1.h"
+
+
class Gameengine
{
@@ -18,8 +20,9 @@
void read_direction(Gamepad &pad);
void update(N5110 &lcd, Gamepad &pad);
void game_init();
- void draw(N5110 &lcd, Gamepad &pad);
- void lose_life(N5110 &lcd);
+ void draw_l1(N5110 &lcd, Gamepad &pad);
+ void draw_l2(N5110 &lcd, Gamepad &pad);
+ void lose_life(Gamepad &pad, N5110 &lcd);
bool game_over();
void next_level(N5110 &lcd);
bool enemy_death();
@@ -28,6 +31,9 @@
void blocks(N5110 &lcd);
bool enemies(N5110 &lcd);
void key_reinit();
+ int oxygen_leds();
+ int lives_leds();
+ void get_score(N5110 &lcd);
private:
@@ -42,11 +48,20 @@
int _five_keys;
bool _key_reinit;
bool level_exit(N5110 &lcd);
+ int _oxy_state;
+ int _life_state;
+ float _total_time;
+
+
+ float _time_total;
+
+ float _time;
Sprites _sprites;
Direction _d;
Level1 _l1;
- Timer t;
+ Timer _t;
+
};
#endif
\ No newline at end of file