You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
25 lines
629 B
C#
25 lines
629 B
C#
public class WakeUpState : State
|
|
{
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
{
|
|
CheckFlip(player);
|
|
if (!player.enter)
|
|
{
|
|
player.enter = true;
|
|
player.animationFrames = 0;
|
|
}
|
|
player.hurtbox.active = false;
|
|
player.animation = "WakeUp";
|
|
player.animationFrames++;
|
|
ToIdleState(player);
|
|
}
|
|
private void ToIdleState(PlayerNetwork player)
|
|
{
|
|
if (player.animationFrames >= 30)
|
|
{
|
|
player.hurtbox.active = true;
|
|
player.enter = false;
|
|
player.state = "Idle";
|
|
}
|
|
}
|
|
} |