diff --git a/Assets/Scripts/LevelBlocks/Air.cs b/Assets/Scripts/LevelBlocks/Air.cs index d3c1ba3..281279a 100644 --- a/Assets/Scripts/LevelBlocks/Air.cs +++ b/Assets/Scripts/LevelBlocks/Air.cs @@ -5,8 +5,6 @@ using UnityEngine; public class Air : ActiveBlock { - private List FallenPlayers = new List(); - 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;