2022-12-27 18:21:12 +02:00
|
|
|
public class KnockdownSoftState : State
|
2022-12-26 03:47:56 +02:00
|
|
|
{
|
|
|
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
|
|
|
{
|
2022-12-27 13:12:53 +02:00
|
|
|
CheckFlip(player);
|
2022-12-26 03:47:56 +02:00
|
|
|
if (!player.enter)
|
|
|
|
|
{
|
2022-12-27 18:21:12 +02:00
|
|
|
player.player.PlayerUI.DisplayNotification(NotificationTypeEnum.SoftKnockdown);
|
2022-12-26 03:47:56 +02:00
|
|
|
player.enter = true;
|
|
|
|
|
player.animationFrames = 0;
|
|
|
|
|
}
|
2022-12-27 13:12:53 +02:00
|
|
|
player.hurtbox.active = false;
|
2022-12-26 03:47:56 +02:00
|
|
|
player.animation = "Knockdown";
|
|
|
|
|
player.animationFrames++;
|
|
|
|
|
ToIdleState(player);
|
|
|
|
|
}
|
|
|
|
|
private void ToIdleState(PlayerNetwork player)
|
|
|
|
|
{
|
2022-12-27 18:21:12 +02:00
|
|
|
if (player.animationFrames >= 30)
|
2022-12-26 03:47:56 +02:00
|
|
|
{
|
|
|
|
|
player.enter = false;
|
|
|
|
|
player.state = "WakeUp";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|