Files

24 lines
563 B
C#
Raw Normal View History

2023-01-02 19:59:46 +02:00
using UnityEngine;
public class TauntState : State
{
public override void UpdateLogic(PlayerNetwork player)
{
if (!player.enter)
{
player.enter = true;
player.animationFrames = 0;
player.animation = "Taunt";
}
2023-01-03 00:31:55 +02:00
player.velocity = DemonicsVector2.Zero;
2023-01-02 19:59:46 +02:00
player.animationFrames++;
ToIdleState(player);
}
private void ToIdleState(PlayerNetwork player)
{
if (player.animationFrames >= 160)
{
2023-01-23 18:31:58 +02:00
EnterState(player, "Idle");
2023-01-02 19:59:46 +02:00
}
}
}