2023-01-02 19:59:46 +02:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class TauntState : State
|
|
|
|
|
{
|
|
|
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
|
|
|
{
|
2023-04-04 21:43:30 +03:00
|
|
|
CheckFlip(player);
|
2023-01-02 19:59:46 +02:00
|
|
|
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-07-02 23:17:37 +03:00
|
|
|
player.velocity = DemonVector2.Zero;
|
2023-01-02 19:59:46 +02:00
|
|
|
player.animationFrames++;
|
2023-03-11 15:57:01 +02:00
|
|
|
if (GameSimulation.Timer <= 0)
|
|
|
|
|
return;
|
2023-01-02 19:59:46 +02:00
|
|
|
ToIdleState(player);
|
|
|
|
|
}
|
|
|
|
|
private void ToIdleState(PlayerNetwork player)
|
|
|
|
|
{
|
2023-04-06 15:16:02 +03:00
|
|
|
if (player.animationFrames >= 100 && !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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|