You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
31 lines
862 B
C#
31 lines
862 B
C#
using UnityEngine;
|
|
|
|
public class ShadowbreakState : State
|
|
{
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
{
|
|
CheckFlip(player);
|
|
if (!player.enter)
|
|
{
|
|
SetTopPriority(player);
|
|
CheckFlip(player);
|
|
player.player.PlayerUI.DisplayNotification(NotificationTypeEnum.Knockdown);
|
|
player.enter = true;
|
|
player.animationFrames = 0;
|
|
player.sound = "Landed";
|
|
player.SetEffect("Fall", player.position);
|
|
}
|
|
player.hurtbox.active = false;
|
|
player.animation = "HurtAir";
|
|
player.animationFrames++;
|
|
ToIdleState(player);
|
|
}
|
|
private void ToIdleState(PlayerNetwork player)
|
|
{
|
|
if (player.animationFrames >= 60)
|
|
{
|
|
player.enter = false;
|
|
player.state = "WakeUp";
|
|
}
|
|
}
|
|
} |