aboutsummaryrefslogtreecommitdiff
path: root/game/workers/WorkerScript.cpp
diff options
context:
space:
mode:
authorMax-001 <maxsmits21@kpnmail.nl>2025-01-07 14:34:12 +0100
committerMax-001 <maxsmits21@kpnmail.nl>2025-01-07 14:34:12 +0100
commit1f0edff951e7580163d8c987d4a021b24d45e9f1 (patch)
treea4ffd4334f24b2d72fdd44daef4294f1a2fbf234 /game/workers/WorkerScript.cpp
parent80fc064c77bb61d9b329b58532c9cacd99038e0a (diff)
Added panic from player
Diffstat (limited to 'game/workers/WorkerScript.cpp')
-rw-r--r--game/workers/WorkerScript.cpp10
1 files changed, 10 insertions, 0 deletions
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);
}
}
}