You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
28 lines
796 B
C#
28 lines
796 B
C#
using UnityEngine;
|
|
|
|
public class BlockState : BlockParentState
|
|
{
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
{
|
|
base.UpdateLogic(player);
|
|
player.animation = "Block";
|
|
player.animationFrames++;
|
|
ToIdleState(player);
|
|
}
|
|
private void ToIdleState(PlayerNetwork player)
|
|
{
|
|
if (player.stunFrames <= 0)
|
|
{
|
|
BlockParentState.skipKnockback = false;
|
|
player.player.StopShakeCoroutine();
|
|
player.enter = false;
|
|
player.state = "Idle";
|
|
}
|
|
}
|
|
protected override void OnEnter(PlayerNetwork player)
|
|
{
|
|
base.OnEnter(player);
|
|
end = new Vector2(player.position.x + (hurtAttack.knockbackForce.x * -player.flip), (float)DemonicsPhysics.GROUND_POINT - 0.5f);
|
|
}
|
|
}
|