Files
Darklings-FightingGame/Assets/_Project/Scripts/SimulationScripts/StateScripts/StatesScripts/ExceptionStateScripts/KnockdownSoftState.cs
2022-12-27 18:21:12 +02:00

25 lines
691 B
C#

public class KnockdownSoftState : State
{
public override void UpdateLogic(PlayerNetwork player)
{
CheckFlip(player);
if (!player.enter)
{
player.player.PlayerUI.DisplayNotification(NotificationTypeEnum.SoftKnockdown);
player.enter = true;
player.animationFrames = 0;
}
player.hurtbox.active = false;
player.animation = "Knockdown";
player.animationFrames++;
ToIdleState(player);
}
private void ToIdleState(PlayerNetwork player)
{
if (player.animationFrames >= 30)
{
player.enter = false;
player.state = "WakeUp";
}
}
}