diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-07 14:06:45 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-07 14:06:45 +0100 |
commit | 41f890863706ee8ede43021fe83b776b638a18b7 (patch) | |
tree | 4ee74df7e60c8c22c61a1748dd648dda2783b21f /game/player | |
parent | bc66e7195c80facca244f933b882011e5e81fa3c (diff) |
fixed coins and improved coin
Diffstat (limited to 'game/player')
-rw-r--r-- | game/player/PlayerEndScript.cpp | 2 | ||||
-rw-r--r-- | game/player/PlayerScript.cpp | 6 | ||||
-rw-r--r-- | game/player/PlayerSubScene.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/game/player/PlayerEndScript.cpp b/game/player/PlayerEndScript.cpp index 1554c84..f3d9aad 100644 --- a/game/player/PlayerEndScript.cpp +++ b/game/player/PlayerEndScript.cpp @@ -94,7 +94,7 @@ bool PlayerEndScript::on_collision(const crepe::CollisionEvent & ev) { this->trigger_event<EndGameEvent>(); } - return true; + return false; } return false; diff --git a/game/player/PlayerScript.cpp b/game/player/PlayerScript.cpp index 472d7c8..c151d53 100644 --- a/game/player/PlayerScript.cpp +++ b/game/player/PlayerScript.cpp @@ -36,7 +36,7 @@ bool PlayerScript::on_collision(const CollisionEvent & ev) { } play_scr.active = false; end_scr.active = true; - return true; + return false; } else if (ev.info.other.metadata.tag == "laser") { for (Animator & anim : animators) { anim.active = true; @@ -49,7 +49,7 @@ bool PlayerScript::on_collision(const CollisionEvent & ev) { } play_scr.active = false; end_scr.active = true; - return true; + return false; } else if (ev.info.other.metadata.tag == "missile") { for (Animator & anim : animators) { anim.active = true; @@ -62,7 +62,7 @@ bool PlayerScript::on_collision(const CollisionEvent & ev) { } play_scr.active = false; end_scr.active = true; - return true; + return false; } return false; diff --git a/game/player/PlayerSubScene.cpp b/game/player/PlayerSubScene.cpp index fff9287..e6da6f7 100644 --- a/game/player/PlayerSubScene.cpp +++ b/game/player/PlayerSubScene.cpp @@ -150,6 +150,6 @@ PlayerSubScene::PlayerSubScene(Scene & scn) { .collision_layer = COLL_LAY_PLAYER, }); player.add_component<BehaviorScript>().set_script<PlayerScript>().active = false; - player.add_component<BehaviorScript>().set_script<PlayerEndScript>().active = false; player.add_component<BehaviorScript>().set_script<CoinScript>(); + player.add_component<BehaviorScript>().set_script<PlayerEndScript>().active = false; } |