feat: PlayerStart now resets the animation

This commit is contained in:
Sara 2023-11-29 11:47:50 +01:00
parent c0203325b6
commit 58e93e3336

View file

@ -109,7 +109,9 @@ void PlayerAttackInput(Player* self, InputEvent value) {
self->attackInput = 1; 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) { void PlayerUpdate(Player* self, float deltaTime) {
state_machine_update(self->animationStateMachine, deltaTime); state_machine_update(self->animationStateMachine, deltaTime);