Files
2022-12-29 14:40:06 +02:00

24 lines
678 B
C#

public class BlueFrenzyState : State
{
public override void UpdateLogic(PlayerNetwork player)
{
if (!player.enter)
{
player.enter = true;
player.animationFrames = 0;
player.animation = "Parry";
player.attackFrames = DemonicsAnimator.GetMaxAnimationFrames(player.playerStats._animation, player.animation);
}
player.animationFrames++;
player.attackFrames--;
ToIdleState(player);
}
private void ToIdleState(PlayerNetwork player)
{
if (player.attackFrames <= 0)
{
player.enter = false;
player.state = "Idle";
}
}
}