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.cpp
- Revision:
- 58:c8d90bb7404a
- Parent:
- 55:fc618f82d1d0
diff -r 1c12361b6e3d -r c8d90bb7404a RoomEngine/RoomEngine.cpp --- a/RoomEngine/RoomEngine.cpp Thu May 09 09:50:19 2019 +0000 +++ b/RoomEngine/RoomEngine.cpp Thu May 09 14:43:45 2019 +0000 @@ -318,7 +318,7 @@ return 0; } -// returns true if the hitbox of "entity a" collides with any hitboxes of entities within "array" as "entity a" moves on the x direction +// returns -1 or 1 if the hitbox of "entity a" collides with any hitboxes of entities within "array" as "entity a" moves on the x direction float RoomEngine::entity_move_check_x(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]) { for (int i = 0; i < no_of_enemies; i++) { // For every enemy = Entity B @@ -335,7 +335,7 @@ return 0; } -// returns true if the hitbox of "entity a" collides with any hitboxes of entities within "array" as "entity a" moves on the y direction +// returns -1 or 1 if the hitbox of "entity a" collides with any hitboxes of entities within "array" as "entity a" moves on the y direction float RoomEngine::entity_move_check_y(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]) { for (int i = 0; i < no_of_enemies; i++) { // For every enemy = Entity B