} // Instantiates the chosen miniontype public void NewRound() { if (gameControllerScript.playerType == "alien" && playerEnemyScript == null) { playerEnemyScript = GameObject.Find("Enemy(Clone)").GetComponent<PlayerEnemy>(); } callNewRound = false; gameControllerScript.waveOutcome = GameController.WaveOutcomes.Ongoing; if (gameControllerScript.roundNumber < gameControllerScript.lastRound && gameControllerScript.playerType == "pilot") { playerHUDScript = GameObject.Find("PlayerHUD(Clone)").GetComponent<PlayerHUD>(); if (!playerHUDScript.readyBool) { playerHUDScript.Ready(); } ChoosePattern(); ChooseUpgrades(); ChooseMinion(); nextRound.Enabled = false; spawnTimer.Enabled = true; canSpawn = true; SpawnMinion(); } else if (gameControllerScript.roundNumber < gameControllerScript.lastRound && gameControllerScript.playerType == "alien") { enemyHUDScript = GameObject.Find("EnemyHUD(Clone)").GetComponent<EnemyHUD>(); enemyHUDScript.Ready(); if (!enemyHUDScript.choseMinion) { ChooseMinion(); } if (!enemyHUDScript.chosePattern) { ChoosePattern(); } enemyHUDScript.choseMinion = false; enemyHUDScript.chosePattern = false; nextRound.Enabled = false; spawnTimer.Enabled = true; canSpawn = true; SpawnMinion(); } else if (gameControllerScript.roundNumber == gameControllerScript.lastRound && gameControllerScript.playerType == "alien") { enemyHUDScript = GameObject.Find("EnemyHUD(Clone)").GetComponent<EnemyHUD>(); enemyHUDScript.Ready(); chosenMinionTag = "boss"; nextRound.Enabled = false; spawnTimer.Enabled = false; canSpawn = false; countMinions = 10; Instantiate(boss, new Vector2(7.50f, 0), Quaternion.Euler(0, 0, 0)); } else if (gameControllerScript.roundNumber == gameControllerScript.lastRound && gameControllerScript.playerType == "pilot") { playerHUDScript = GameObject.Find("PlayerHUD(Clone)").GetComponent<PlayerHUD>(); playerHUDScript.Ready(); chosenMinionTag = "boss"; nextRound.Enabled = false; spawnTimer.Enabled = false; canSpawn = false; countMinions = 10; Instantiate(bossAI, new Vector2(10f, 0), Quaternion.Euler(0, 0, 0)); } } // Starts a new round, choosing patterns, upgrades and minions