Mochu Yao explorer game
Dependencies: mbed
Diff: Gameengine/Gameengine.h
- Revision:
- 10:559487aac60e
- Parent:
- 9:e11bb7cef050
- Child:
- 13:30330d61f09c
--- a/Gameengine/Gameengine.h Mon Apr 27 14:01:00 2020 +0000 +++ b/Gameengine/Gameengine.h Mon Apr 27 14:29:06 2020 +0000 @@ -7,6 +7,43 @@ // 3 draw on the lcd screen and load the gamepad controll //* @date April 24th 2020 //* @author Yaomochu + +/** Gameengine Class +@code +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +#include "Gameengine.h" + +N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); +Gamepad gamepad; +Gameengine _game_engine; + +bool _start_flag; +int _player_score; + +int main() { + _game_engine.init(); + while(1) { + _game_engine.check_reset(lcd, gamepad); + _start_flag = _game_engine.get_start_flag(); + _game_engine.read_input(gamepad); + _game_engine.get_sprite(); + _game_engine.get_explorer_direction(); + _game_engine.get_explorer_y(gamepad); + _game_engine.get_explorer_x(); + _game_engine.generate_lines(); + _game_engine.check_collision(gamepad); + _game_engine.update_lcd(lcd); + _player_score = _game_engine.get_score(); + _game_engine.run_engine(lcd, gamepad); + } +} + +@endcode +*/ + + #include "N5110.h" #include "mbed.h" #include "Gamepad.h"