// Spawn burst of enemies if win condition not met private void ContinueSpawningScoreNotReached() { if (score < scoreAtPhase3 + 10) { SetInt(0.8f); Invoke("StopSpawningEndLevel", 7.0f); } else { ui.LevelComplete(); } }
IEnumerator Descend() { while (true) { this.transform.position += new Vector3(0, -3.0f * Time.deltaTime, 0); yield return(new WaitForEndOfFrame()); if (this.transform.position.y < -30.0f) { break; } } ui.LevelComplete(); }