Files
Darklings-FightingGame/Assets/_Project/Scripts/SimulationScripts/StateScripts/StatesScripts/ExceptionStateScripts/KnockdownSoftState.cs
David Kalatzis 9297c6f2bb Minor update
2023-01-23 18:31:58 +02:00

26 lines
754 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.sound = "Landed";
player.SetEffect("Fall", player.position);
}
player.hurtbox.active = false;
player.animation = "Knockdown";
player.animationFrames++;
ToIdleState(player);
}
private void ToIdleState(PlayerNetwork player)
{
if (player.animationFrames >= 30)
{
EnterState(player, "WakeUp");
}
}
}