GameObject GetScreen(EndGameScreenType screenType) { foreach (EndGameScreen screen in endGameScreens) { if (screen.screenType == screenType) { return(screen.screen); } } return(null); }
public void ShowEndGameScreen(EndGameScreenType screenType, bool shipUnlocked = false) { if (endScreenEnabled) { return; } GetScreen(screenType).SetActive(true); endScreenEnabled = true; if (screenType == EndGameScreenType.LooseAI) { showAdButton.SetActive(AdvertisingManager.Instance.isVideoReady && shipControllers.Count > 1); adButtonUsed.SetActive(false); } shipUnlockedLabel.SetActive(shipUnlocked); }