Files
2022-12-26 03:47:56 +02:00

22 lines
521 B
C#

public class WakeUpState : State
{
public override void UpdateLogic(PlayerNetwork player)
{
if (!player.enter)
{
player.enter = true;
player.animationFrames = 0;
}
player.animation = "WakeUp";
player.animationFrames++;
ToIdleState(player);
}
private void ToIdleState(PlayerNetwork player)
{
if (player.animationFrames >= 30)
{
player.enter = false;
player.state = "Idle";
}
}
}