Files

33 lines
833 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)
{
2023-01-28 16:02:34 +02:00
if (player.otherPlayer.health <= 0)
{
player.comboLocked = true;
}
else
{
player.comboLocked = false;
}
2023-01-02 19:59:46 +02:00
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)
{
2023-01-28 16:02:34 +02:00
if (player.animationFrames >= 160 && !player.comboLocked)
2023-01-02 19:59:46 +02:00
{
2023-01-28 03:45:14 +02:00
GameSimulation.Run = true;
2023-01-23 18:31:58 +02:00
EnterState(player, "Idle");
2023-01-02 19:59:46 +02:00
}
}
}