// Update is called once per frame void Update() { currentWave = GameObject.FindGameObjectsWithTag("Enemy"); // Find enemies in level // If enemies have been eliminated, spawn new wave if (currentWave.GetLength(0) <= 0) { newWave = true; gui.SetDrawMenu(true); } }