You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
37 lines
939 B
C#
37 lines
939 B
C#
using UnityEngine;
|
|
|
|
public class TauntState : State
|
|
{
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
{
|
|
CheckFlip(player);
|
|
if (!player.enter)
|
|
{
|
|
if (player.otherPlayer.health <= 0)
|
|
{
|
|
player.comboLocked = true;
|
|
}
|
|
else
|
|
{
|
|
player.comboLocked = false;
|
|
}
|
|
player.enter = true;
|
|
player.animationFrames = 0;
|
|
player.animation = "Taunt";
|
|
return;
|
|
}
|
|
player.velocity = DemonicsVector2.Zero;
|
|
player.animationFrames++;
|
|
if (GameSimulation.Timer <= 0)
|
|
return;
|
|
ToIdleState(player);
|
|
}
|
|
private void ToIdleState(PlayerNetwork player)
|
|
{
|
|
if (player.animationFrames >= 160 && !player.comboLocked)
|
|
{
|
|
GameSimulation.Run = true;
|
|
EnterState(player, "Idle");
|
|
}
|
|
}
|
|
} |