2022-12-26 03:47:56 +02:00
|
|
|
public class WakeUpState : State
|
|
|
|
|
{
|
|
|
|
|
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)
|
|
|
|
|
{
|
2023-04-04 21:43:30 +03:00
|
|
|
player.animation = "WakeUp";
|
2022-12-26 03:47:56 +02:00
|
|
|
player.enter = true;
|
|
|
|
|
player.animationFrames = 0;
|
2023-04-04 21:43:30 +03:00
|
|
|
return;
|
2022-12-26 03:47:56 +02:00
|
|
|
}
|
2022-12-27 13:12:53 +02:00
|
|
|
player.hurtbox.active = false;
|
2022-12-26 03:47:56 +02:00
|
|
|
player.animationFrames++;
|
|
|
|
|
ToIdleState(player);
|
|
|
|
|
}
|
|
|
|
|
private void ToIdleState(PlayerNetwork player)
|
|
|
|
|
{
|
2023-02-16 20:28:15 +02:00
|
|
|
if (player.animationFrames >= DemonicsAnimator.GetMaxAnimationFrames(player.playerStats._animation, player.animation))
|
2022-12-26 03:47:56 +02:00
|
|
|
{
|
2022-12-27 13:12:53 +02:00
|
|
|
player.hurtbox.active = true;
|
2023-03-06 13:56:15 +02:00
|
|
|
if (AIHurt(player))
|
|
|
|
|
return;
|
2023-01-23 18:31:58 +02:00
|
|
|
EnterState(player, "Idle");
|
2022-12-26 03:47:56 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|