You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using UnityEngine;
|
|
|
|
public class GiveUpState : State
|
|
{
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
{
|
|
if (!player.enter)
|
|
{
|
|
GameSimulation.Run = false;
|
|
GameSimulation.GlobalHitstop = 1;
|
|
player.velocity = DemonicsVector2.Zero;
|
|
player.enter = true;
|
|
player.animationFrames = 0;
|
|
player.player.StopShakeCoroutine();
|
|
GameplayManager.Instance.RoundOver(true);
|
|
player.healthRecoverable = 0;
|
|
player.player.PlayerUI.UpdateHealthDamaged(player.healthRecoverable);
|
|
ResetCombo(player);
|
|
}
|
|
player.velocity = new DemonicsVector2(player.velocity.x, player.velocity.y - DemonicsPhysics.GRAVITY);
|
|
player.animation = "Death";
|
|
player.animationFrames++;
|
|
if (player.animationFrames >= 725)
|
|
{
|
|
GameSimulation.Timer = GameSimulation._timerMax;
|
|
ResetPlayer(player);
|
|
ResetPlayer(player.otherPlayer);
|
|
EnterState(player, "Taunt");
|
|
EnterState(player.otherPlayer, "Taunt");
|
|
}
|
|
}
|
|
} |