|
|
@ -5,8 +5,6 @@ using UnityEngine; |
|
|
|
public class Air : ActiveBlock |
|
|
|
{ |
|
|
|
|
|
|
|
private List<Character> FallenPlayers = new List<Character>(); |
|
|
|
|
|
|
|
public override int GetInitative() |
|
|
|
{ |
|
|
|
return -1; |
|
|
@ -15,7 +13,7 @@ public class Air : ActiveBlock |
|
|
|
public override IEnumerator OnWalkedOnByPlayer(Character player, Vector3 moveDirection) |
|
|
|
{ |
|
|
|
player.stuck = true; |
|
|
|
FallenPlayers.Add(player); |
|
|
|
player.respawnNeeded = true; |
|
|
|
|
|
|
|
StartCoroutine(player.AnimateToPosition(transform.position + Vector3.down * 10,Character.Animation.Hit, 1)); |
|
|
|
StartCoroutine(LerpScale(player.transform, Vector3.zero, 1)); |
|
|
@ -29,16 +27,6 @@ public class Air : ActiveBlock |
|
|
|
|
|
|
|
public override IEnumerator OnRoundEnd(PlayerData[] allPlayers) |
|
|
|
{ |
|
|
|
|
|
|
|
foreach (Character player in FallenPlayers) |
|
|
|
{ |
|
|
|
player.gameObject.SetActive(true); |
|
|
|
player.respawnCharacter(transform.position); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
FallenPlayers.Clear(); |
|
|
|
|
|
|
|
isFinished = true; |
|
|
|
Destroy(gameObject); |
|
|
|
yield break; |
|
|
|