From 7739a80176cea889ce240d18d354c5174825b25a Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 9 Jan 2025 14:46:30 +0100 Subject: workers during normal sequence working --- game/player/PlayerScript.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'game/player/PlayerScript.cpp') diff --git a/game/player/PlayerScript.cpp b/game/player/PlayerScript.cpp index fadca9c..c072e06 100644 --- a/game/player/PlayerScript.cpp +++ b/game/player/PlayerScript.cpp @@ -104,6 +104,12 @@ void PlayerScript::fixed_update(crepe::duration_t dt) { last_fired = now; } } + if (this->get_key_state(Keycode::P)) { + this->trigger_event(BattleStartEvent{ + .num_enemies = 4, + .battle = true, + }); + } if (this->get_key_state(Keycode::SPACE)) { rb.add_force_linear(vec2(0, -PLAYER_GRAVITY_SCALE / 2.5) * dt.count() / 0.02); if (prev_anim != 1) { -- cgit v1.2.3