From 1f0edff951e7580163d8c987d4a021b24d45e9f1 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Tue, 7 Jan 2025 14:34:12 +0100 Subject: Added panic from player --- game/workers/WorkerScript.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'game/workers/WorkerScript.cpp') diff --git a/game/workers/WorkerScript.cpp b/game/workers/WorkerScript.cpp index d641c6a..1bcf8d5 100644 --- a/game/workers/WorkerScript.cpp +++ b/game/workers/WorkerScript.cpp @@ -53,6 +53,8 @@ void WorkerScript::fixed_update(duration_t dt) { = -rb_worker.data.linear_velocity.x / 5; animator_worker.back().get().data.fps = -rb_worker.data.linear_velocity.x / 5; + animator_worker.front().get().set_anim(0); + animator_worker.back().get().set_anim(0); } else { sprite_worker.front().get().data.flip.flip_x = false; sprite_worker.back().get().data.flip.flip_x = false; @@ -61,6 +63,8 @@ void WorkerScript::fixed_update(duration_t dt) { = rb_worker.data.linear_velocity.x / 5; animator_worker.back().get().data.fps = rb_worker.data.linear_velocity.x / 5; + animator_worker.front().get().set_anim(0); + animator_worker.back().get().set_anim(0); } } } else { @@ -89,6 +93,9 @@ void WorkerScript::fixed_update(duration_t dt) { = -rb_worker.data.linear_velocity.x / 5; animator_worker.back().get().data.fps = -rb_worker.data.linear_velocity.x / 5; + + animator_worker.front().get().set_anim(0); + animator_worker.back().get().set_anim(0); } else { sprite_worker.front().get().data.flip.flip_x = false; sprite_worker.back().get().data.flip.flip_x = false; @@ -97,6 +104,9 @@ void WorkerScript::fixed_update(duration_t dt) { = rb_worker.data.linear_velocity.x / 5; animator_worker.back().get().data.fps = rb_worker.data.linear_velocity.x / 5; + + animator_worker.front().get().set_anim(0); + animator_worker.back().get().set_anim(0); } } } -- cgit v1.2.3