Files
David Kalatzis c9dfff0f21 Minor fix
2023-03-07 16:42:36 +02:00

27 lines
699 B
C#

using UnityEngine;
public class BlockState : BlockParentState
{
public override void UpdateLogic(PlayerNetwork player)
{
base.UpdateLogic(player);
player.animation = "Block";
player.animationFrames++;
player.velocity = new DemonicsVector2(player.velocity.x, 0);
ToIdleState(player);
}
private void ToIdleState(PlayerNetwork player)
{
if (player.stunFrames <= 0)
{
BlockParentState.skipKnockback = false;
player.player.StopShakeCoroutine();
EnterState(player, "Idle");
}
}
protected override void OnEnter(PlayerNetwork player)
{
base.OnEnter(player);
}
}