diff options
Diffstat (limited to 'src/entities')
-rw-r--r-- | src/entities/antifaShip.c | 8 | ||||
-rw-r--r-- | src/entities/antifaShip.h | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/entities/antifaShip.c b/src/entities/antifaShip.c index 1ba8db9..342f0f9 100644 --- a/src/entities/antifaShip.c +++ b/src/entities/antifaShip.c @@ -203,9 +203,15 @@ void controlAntifaShipKeyboardAndMouse(Game * game, Entity * entity) { data->lastMouse = Vector2Zero(); } - // Kill me hehehe +#ifdef DEBUG_KEYS + // Kill me. if (IsKeyPressed(KEY_K)) entity->health = 0.0; + // Kill everyone else. + if (IsKeyPressed(KEY_L)) + for (int i = 1; i < game->world.entitiesCount; ++i) + game->world.entities[i].health = 0.0; +#endif // Shoot bullet. if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON)) diff --git a/src/entities/antifaShip.h b/src/entities/antifaShip.h index c88cde4..c0e43ee 100644 --- a/src/entities/antifaShip.h +++ b/src/entities/antifaShip.h @@ -14,6 +14,9 @@ #define ANTIFA_START_AUTO_TARGET_MAX 0.5 // How far off auto target can be entail it drops. #define ANTIFA_TARGETING_SPEED 6.0 +// Some keys for debugging. +#define DEBUG_KEYS + typedef struct AntifaShip { Vector2 lastMouse; float forwardSpeed; |