2023-01-09 18:16:00 +02:00
|
|
|
public class GrabbedState : State
|
|
|
|
|
{
|
|
|
|
|
public override void UpdateLogic(PlayerNetwork player)
|
|
|
|
|
{
|
|
|
|
|
if (!player.enter)
|
|
|
|
|
{
|
2023-01-10 18:39:07 +02:00
|
|
|
player.otherPlayer.enter = false;
|
|
|
|
|
player.otherPlayer.state = "Throw";
|
2023-01-09 18:16:00 +02:00
|
|
|
player.enter = true;
|
|
|
|
|
player.animationFrames = 0;
|
|
|
|
|
player.player.StopShakeCoroutine();
|
|
|
|
|
}
|
2023-01-10 18:39:07 +02:00
|
|
|
player.velocity = DemonicsVector2.Zero;
|
|
|
|
|
player.animation = "HurtAir";
|
2023-01-09 18:16:00 +02:00
|
|
|
player.animationFrames++;
|
2023-01-10 20:10:11 +02:00
|
|
|
ThrowBreak(player);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ThrowBreak(PlayerNetwork player)
|
|
|
|
|
{
|
2023-01-11 00:22:37 +02:00
|
|
|
if (player.grabPress && player.animationFrames <= 6)
|
2023-01-10 20:10:11 +02:00
|
|
|
{
|
|
|
|
|
player.enter = false;
|
|
|
|
|
player.otherPlayer.enter = false;
|
|
|
|
|
player.state = "Knockback";
|
|
|
|
|
player.otherPlayer.state = "Knockback";
|
|
|
|
|
}
|
2023-01-09 18:16:00 +02:00
|
|
|
}
|
|
|
|
|
}
|