From 58e93e333693b90f2a2238d8a5aecdd40d75c04c Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 29 Nov 2023 11:47:50 +0100 Subject: [PATCH] feat: PlayerStart now resets the animation --- game/src/Player.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/src/Player.c b/game/src/Player.c index fa420e2..8082e9b 100644 --- a/game/src/Player.c +++ b/game/src/Player.c @@ -109,7 +109,9 @@ void PlayerAttackInput(Player* self, InputEvent value) { self->attackInput = 1; } -void PlayerStart(Player* self) {} +void PlayerStart(Player* self) { + animation_sprite_play_from(self->currentAnimation, 0.0f); +} void PlayerUpdate(Player* self, float deltaTime) { state_machine_update(self->animationStateMachine, deltaTime);