A rouge-like rpg, heavily inspired on the binding of isaac. Running on a FRDM-K64F Mbed board. C++.
Dependencies: mbed MotionSensor
Diff: RoomEngine/RoomEngine.h
- Revision:
- 27:a1b41626f57c
- Parent:
- 26:abbc19edc5c1
- Child:
- 28:98848e6a77a2
--- a/RoomEngine/RoomEngine.h Mon Apr 29 02:45:17 2019 +0000 +++ b/RoomEngine/RoomEngine.h Mon Apr 29 10:39:09 2019 +0000 @@ -6,13 +6,16 @@ #include "Gamepad.h" #include "sprites.h" -class GameEngine +class RoomEngine { public: - void init(); + RoomEngine(); + ~RoomEngine(); + void load_room(Room ¤t_room); void read_input(Gamepad &gamepad); - void update(N5110 &lcd); - void draw(N5110 &lcd); + void update(); + void render(N5110 &lcd, Gamepad &gamepad); + bool check_player_death(); private: bool _L; @@ -25,22 +28,22 @@ bool _Y; Vector2D mapped_coord; - Player player; - Room room; - + Room *room; + Player *player; // Functions void check_damage(); void check_damage_player(); void check_damage_enemies(); - void check_death(); + void check_enemies_death(); void move(); void move_player(); void move_enemies(); void move_bullets(); - void minimap_detection(N5110 &lcd); - void pause_detection(N5110 &lcd); + void minimap_detection(N5110 &lcd, Gamepad &gamepad); + void pause_detection(N5110 &lcd, Gamepad &gamepad); + void draw(N5110 &lcd); void draw_player(N5110 &lcd); void draw_enemies(N5110 &lcd); void draw_bullets(N5110 &lcd);