diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 15:57:16 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 15:57:16 +0100 |
commit | 31b068a3d2a275656ec310552f1ab27034aa184d (patch) | |
tree | 29cb00414ba91147922ab737ceac692d7fd2e514 /game | |
parent | 1ec7e724fcace1274473dfcae91022cc1c930baa (diff) | |
parent | 65eff0cb9b645f81f8231e14f1e92c2abcda35ef (diff) |
Merge branch 'niels/game' of github.com:lonkaars/crepe into niels/game
Diffstat (limited to 'game')
-rw-r--r-- | game/enemy/BattleScript.cpp | 2 | ||||
-rw-r--r-- | game/enemy/EnemyScript.cpp | 2 | ||||
-rw-r--r-- | game/player/PlayerScript.cpp | 5 |
3 files changed, 2 insertions, 7 deletions
diff --git a/game/enemy/BattleScript.cpp b/game/enemy/BattleScript.cpp index 4260c42..6d96ef6 100644 --- a/game/enemy/BattleScript.cpp +++ b/game/enemy/BattleScript.cpp @@ -47,5 +47,5 @@ bool BattleScript::create_battle(const BattleStartEvent & e) { script.game_object_id ); } - return true; + return false; } diff --git a/game/enemy/EnemyScript.cpp b/game/enemy/EnemyScript.cpp index 07ed9e8..8cf8b80 100644 --- a/game/enemy/EnemyScript.cpp +++ b/game/enemy/EnemyScript.cpp @@ -79,7 +79,7 @@ bool EnemyScript::spawn_enemy(const SpawnEnemyEvent & e) { ai_component.make_oval_path(10, 10, vec2 {x_value, random_height}, 1.5708, true); ai_component.active = true; this->last_fired = std::chrono::steady_clock::now(); - return true; + return false; } bool EnemyScript::on_collide(const CollisionEvent & e) { diff --git a/game/player/PlayerScript.cpp b/game/player/PlayerScript.cpp index d32da0b..57819c0 100644 --- a/game/player/PlayerScript.cpp +++ b/game/player/PlayerScript.cpp @@ -94,11 +94,6 @@ void PlayerScript::fixed_update(crepe::duration_t dt) { } Rigidbody & rb = this->get_components_by_name<Rigidbody>("player").front(); - if (this->get_key_state(Keycode::P)) { - this->trigger_event<BattleStartEvent>(BattleStartEvent { - .num_enemies = 5, - }); - } if (this->get_key_state(Keycode::ENTER)) { auto now = std::chrono::steady_clock::now(); |