2023-01-02 22:29:32 +02:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
2022-12-26 03:47:56 +02:00
|
|
|
public class DeathState : State
|
|
|
|
|
{
|
|
|
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
|
|
|
{
|
|
|
|
|
if (!player.enter)
|
|
|
|
|
{
|
|
|
|
|
player.enter = true;
|
|
|
|
|
player.animationFrames = 0;
|
|
|
|
|
player.player.StopShakeCoroutine();
|
2023-01-01 04:39:49 +02:00
|
|
|
GameplayManager.Instance.RoundOver(false);
|
2023-01-02 19:59:46 +02:00
|
|
|
GameSimulation.IntroFrame = 360;
|
2023-01-01 04:39:49 +02:00
|
|
|
player.health = 1;
|
2023-01-02 22:29:32 +02:00
|
|
|
if (!SceneSettings.IsTrainingMode)
|
|
|
|
|
{
|
|
|
|
|
GameSimulation.Run = false;
|
|
|
|
|
}
|
2022-12-26 03:47:56 +02:00
|
|
|
}
|
2023-01-03 00:31:55 +02:00
|
|
|
player.velocity = DemonicsVector2.Zero;
|
2022-12-26 03:47:56 +02:00
|
|
|
player.animation = "Knockdown";
|
|
|
|
|
player.animationFrames++;
|
2023-01-03 00:31:55 +02:00
|
|
|
if (player.animationFrames >= 250)
|
|
|
|
|
{
|
|
|
|
|
if (player.otherPlayer.state != "Taunt")
|
|
|
|
|
{
|
|
|
|
|
player.otherPlayer.enter = false;
|
|
|
|
|
player.otherPlayer.state = "Taunt";
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-01-02 22:29:32 +02:00
|
|
|
if (SceneSettings.IsTrainingMode)
|
2023-01-02 19:59:46 +02:00
|
|
|
{
|
2023-01-02 22:29:32 +02:00
|
|
|
if (player.animationFrames >= 105)
|
|
|
|
|
{
|
|
|
|
|
player.enter = false;
|
|
|
|
|
player.state = "Idle";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (player.animationFrames >= 370)
|
|
|
|
|
{
|
2023-01-03 00:31:55 +02:00
|
|
|
player.otherPlayer.enter = false;
|
|
|
|
|
player.otherPlayer.state = "Taunt";
|
2023-01-02 22:29:32 +02:00
|
|
|
player.enter = false;
|
2023-01-03 00:31:55 +02:00
|
|
|
player.state = "Taunt";
|
2023-01-02 22:29:32 +02:00
|
|
|
}
|
2023-01-02 19:59:46 +02:00
|
|
|
}
|
2022-12-26 03:47:56 +02:00
|
|
|
}
|
|
|
|
|
}
|