2023-01-23 18:31:58 +02:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class GiveUpState : State
|
|
|
|
|
{
|
|
|
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
|
|
|
{
|
|
|
|
|
if (!player.enter)
|
|
|
|
|
{
|
2023-01-28 03:45:14 +02:00
|
|
|
GameSimulation.Run = false;
|
|
|
|
|
GameSimulation.GlobalHitstop = 1;
|
|
|
|
|
player.velocity = DemonicsVector2.Zero;
|
2023-01-23 18:31:58 +02:00
|
|
|
player.enter = true;
|
2023-01-28 03:45:14 +02:00
|
|
|
player.animationFrames = 0;
|
|
|
|
|
player.player.StopShakeCoroutine();
|
|
|
|
|
GameplayManager.Instance.RoundOver(true);
|
|
|
|
|
player.healthRecoverable = 0;
|
|
|
|
|
player.player.PlayerUI.UpdateHealthDamaged(player.healthRecoverable);
|
|
|
|
|
ResetCombo(player);
|
2023-04-04 21:43:30 +03:00
|
|
|
return;
|
2023-01-28 03:45:14 +02:00
|
|
|
}
|
|
|
|
|
player.velocity = new DemonicsVector2(player.velocity.x, player.velocity.y - DemonicsPhysics.GRAVITY);
|
|
|
|
|
player.animation = "Death";
|
|
|
|
|
player.animationFrames++;
|
|
|
|
|
if (player.animationFrames >= 725)
|
|
|
|
|
{
|
2023-03-11 15:57:01 +02:00
|
|
|
GameSimulation.Timer = GameSimulation._timerMax;
|
2023-01-28 03:45:14 +02:00
|
|
|
ResetPlayer(player);
|
|
|
|
|
ResetPlayer(player.otherPlayer);
|
|
|
|
|
EnterState(player, "Taunt");
|
|
|
|
|
EnterState(player.otherPlayer, "Taunt");
|
2023-01-23 18:31:58 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|