You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
30 lines
975 B
C#
30 lines
975 B
C#
using System.Numerics;
|
|
using Demonics;
|
|
|
|
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.SetParticle("KnockdownSoft", new DemonVector2(player.position.x, player.position.y - 15));
|
|
player.framedataEnum = FramedataTypesEnum.Knockdown;
|
|
return;
|
|
}
|
|
player.animationFrames++;
|
|
player.framedataEnum = FramedataTypesEnum.Knockdown;
|
|
player.hurtbox.active = false;
|
|
player.animation = "Knockdown";
|
|
ToIdleState(player);
|
|
}
|
|
private void ToIdleState(PlayerNetwork player)
|
|
{
|
|
if (player.animationFrames >= 30)
|
|
EnterState(player, "WakeUp");
|
|
}
|
|
} |