diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-07 14:33:07 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-07 14:33:07 +0100 |
commit | 5d798c30af7026099344a068e91e1684018b4386 (patch) | |
tree | 923b54a2745c338478246b8707c6ce8361822fc7 /game/player | |
parent | 6d69c8ef6b663bd6716b441cc7d01164c7e33dfc (diff) | |
parent | 42cbef630ccaf3e841459d364edade1a3c72a525 (diff) |
merge + more WIP
Diffstat (limited to 'game/player')
-rw-r--r-- | game/player/PlayerEndScript.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/game/player/PlayerEndScript.cpp b/game/player/PlayerEndScript.cpp index e04fb9d..1554c84 100644 --- a/game/player/PlayerEndScript.cpp +++ b/game/player/PlayerEndScript.cpp @@ -1,6 +1,7 @@ #include "PlayerEndScript.h" #include "../Config.h" +#include "../Events.h" #include "manager/LoopTimerManager.h" #include <crepe/api/Animator.h> @@ -89,6 +90,10 @@ bool PlayerEndScript::on_collision(const crepe::CollisionEvent & ev) { jump++; } + if(rb_player.data.linear_velocity.x < 5){ + this->trigger_event<EndGameEvent>(); + } + return true; } |