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
Gameengine.h@20:78bd235f8caa, 2019-04-02 (annotated)
- Committer:
- el17arm
- Date:
- Tue Apr 02 23:40:28 2019 +0000
- Revision:
- 20:78bd235f8caa
- Parent:
- 19:4789cb4ca550
now if all 5 keys collected, exit 'opens' and when character enters door the game moves on to level two.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17arm | 14:dc3524d11921 | 1 | #ifndef GAMEERENGINE_H |
| el17arm | 4:b92da6a09c8b | 2 | #define GAMEERENGINE_H |
| el17arm | 4:b92da6a09c8b | 3 | |
| el17arm | 4:b92da6a09c8b | 4 | #include "mbed.h" |
| el17arm | 4:b92da6a09c8b | 5 | #include "N5110.h" |
| el17arm | 4:b92da6a09c8b | 6 | #include "Gamepad.h" |
| el17arm | 4:b92da6a09c8b | 7 | #include "Minerengine.h" |
| el17arm | 18:ff0a53dcb862 | 8 | #include "Level1.h" |
| el17arm | 4:b92da6a09c8b | 9 | |
| el17arm | 4:b92da6a09c8b | 10 | class Gameengine |
| el17arm | 4:b92da6a09c8b | 11 | { |
| el17arm | 4:b92da6a09c8b | 12 | |
| el17arm | 4:b92da6a09c8b | 13 | public: |
| el17arm | 4:b92da6a09c8b | 14 | |
| el17arm | 4:b92da6a09c8b | 15 | Gameengine(); |
| el17arm | 4:b92da6a09c8b | 16 | ~Gameengine(); |
| el17arm | 15:2bda80896a84 | 17 | void read_direction(Gamepad &pad); |
| el17arm | 15:2bda80896a84 | 18 | void update(N5110 &lcd, Gamepad &pad); |
| el17arm | 15:2bda80896a84 | 19 | void game_init(); |
| el17arm | 15:2bda80896a84 | 20 | void draw(N5110 &lcd); |
| el17arm | 18:ff0a53dcb862 | 21 | void lose_life(N5110 &lcd); |
| el17arm | 19:4789cb4ca550 | 22 | bool game_over(); |
| el17arm | 20:78bd235f8caa | 23 | void next_level(N5110 &lcd); |
| el17arm | 4:b92da6a09c8b | 24 | |
| el17arm | 4:b92da6a09c8b | 25 | private: |
| el17arm | 4:b92da6a09c8b | 26 | |
| el17arm | 15:2bda80896a84 | 27 | Minerengine _miner; |
| el17arm | 15:2bda80896a84 | 28 | Direction _d; |
| el17arm | 15:2bda80896a84 | 29 | int _level_select; |
| el17arm | 18:ff0a53dcb862 | 30 | Level1 _l1; |
| el17arm | 18:ff0a53dcb862 | 31 | int _lives; |
| el17arm | 19:4789cb4ca550 | 32 | Timer t; |
| el17arm | 4:b92da6a09c8b | 33 | |
| el17arm | 4:b92da6a09c8b | 34 | }; |
| el17arm | 4:b92da6a09c8b | 35 | |
| el17arm | 4:b92da6a09c8b | 36 | #endif |