IEnumerator SetStage() { numGoals = 0; numClearedGoals = 0; TerrainGroup.ClearElements(); GoalGroup.ClearElements(); PushableGroup.ClearElements(); PlayerGroup.ClearElements(); CameraController.visibles.Clear(); yield return(new WaitForSeconds(0.1f)); if (stage == 1) { SetStage1(); } else if (stage == 2) { SetStage2(); } else if (stage == 3) { SetStage3(); } else if (stage == 4) { SetStage4(); } else { Outro(); } }