IEnumerator playerWon() { print("Player Won!"); print("Player Won!"); print("Player Won!"); print("Player Won!"); print("Player Won!"); text.text = "you won!"; PersistantDataManager.Instance.previousGameWinner = PersistantDataManager.PreviousGameWinner.player; for (int i = 0; i < playerHangar.GetHangar().Count; i++) { Ship ship = playerHangar.GetHangar().ElementAt(i).Value.GetComponent <Ship>(); ship.resetHealth(); } yield return(new WaitForSeconds(2)); SCM.GoToScene("GalaxyMap"); }
private void goToScene(string name) { PersistantDataManager.Instance.SetPlayerHangar(fleetSelectionUIElement.GetComponent <FleetSelectionManager>().getPlayerHangar()); fleetSelectionUIElement.SetActive(false); SCM.GoToScene(name); }