A rouge-like rpg, heavily inspired on the binding of isaac. Running on a FRDM-K64F Mbed board. C++.

Dependencies:   mbed MotionSensor

Revision:
26:abbc19edc5c1
Child:
27:a1b41626f57c
diff -r 112cbcb0b4a7 -r abbc19edc5c1 RoomEngine/RoomEngine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RoomEngine/RoomEngine.h	Mon Apr 29 02:45:17 2019 +0000
@@ -0,0 +1,53 @@
+#ifndef ROOMENGINE_H
+#define ROOMENGINE_H
+#include "Player.h"
+#include "Bullets.h"
+#include "Room.h"
+#include "Gamepad.h"
+#include "sprites.h"
+
+class GameEngine
+{
+public:
+    void init();
+    void read_input(Gamepad &gamepad);
+    void update(N5110 &lcd);
+    void draw(N5110 &lcd);
+    
+private:
+    bool _L;
+    bool _R;
+    bool _START;
+    bool _BACK;
+    bool _A;
+    bool _B;
+    bool _X;
+    bool _Y;
+    Vector2D mapped_coord;
+    
+    Player player;
+    Room room;
+    
+    
+    // Functions
+    void check_damage();
+    void check_damage_player();
+    void check_damage_enemies();
+    void check_death();
+    void move();
+    void move_player();
+    void move_enemies();
+    void move_bullets();
+    void minimap_detection(N5110 &lcd);
+    void pause_detection(N5110 &lcd);
+    
+    void draw_player(N5110 &lcd);
+    void draw_enemies(N5110 &lcd);
+    void draw_bullets(N5110 &lcd);
+    void draw_health(N5110 &lcd);
+    
+    bool entity_collision(Entity &a, Entity &b);
+    float entity_move_check_x(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]);
+    float entity_move_check_y(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]);
+};
+#endif
\ No newline at end of file