You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
public class State
|
|
{
|
|
public float Gravity;
|
|
public virtual void Enter(PlayerNetwork player)
|
|
{
|
|
player.animationFrames = 0;
|
|
}
|
|
public virtual void UpdateLogic(PlayerNetwork player) { }
|
|
public virtual void Exit() { }
|
|
public virtual bool ToAttackState() { return false; }
|
|
public virtual bool ToDashState(PlayerNetwork player) { return false; }
|
|
public virtual bool ToAttackState(PlayerNetwork player) { return false; }
|
|
public virtual bool ToArcanaState(PlayerNetwork player) { return false; }
|
|
public virtual bool ToRedFrenzyState(PlayerNetwork player) { return false; }
|
|
public virtual bool ToBlueFrenzyState(PlayerNetwork player) { return false; }
|
|
public virtual bool ToHurtState(PlayerNetwork player, AttackSO attack) { return false; }
|
|
public virtual bool ToBlockState(PlayerNetwork player, AttackSO attack) { return false; }
|
|
public void CheckFlip(PlayerNetwork player)
|
|
{
|
|
if (player.otherPlayer.position.x > player.position.x)
|
|
{
|
|
player.flip = 1;
|
|
}
|
|
else if (player.otherPlayer.position.x < player.position.x)
|
|
{
|
|
player.flip = -1;
|
|
}
|
|
}
|
|
public void SetTopPriority(PlayerNetwork player)
|
|
{
|
|
player.spriteOrder = 1;
|
|
player.otherPlayer.spriteOrder = 0;
|
|
}
|
|
}; |