/// <summary> /// Setups the single player modals. /// </summary> private void SetupSinglePlayerModals() { //Cache the offline rules processor OfflineRulesProcessor offlineRulesProcessor = m_RulesProcessor as OfflineRulesProcessor; //Get the end game modal EndGameModal endGame = offlineRulesProcessor.endGameModal; //If an end game modal is not specified then use the default if (endGame == null) { endGame = m_DefaultSinglePlayerModal; } InstantiateEndGameModal(endGame); if (m_EndGameModal != null) { m_EndGameModal.SetRulesProcessor(m_RulesProcessor); } //Handle start game modal if (offlineRulesProcessor.startGameModal != null) { m_StartGameModal = Instantiate(offlineRulesProcessor.startGameModal); m_StartGameModal.transform.SetParent(m_EndGameUiParent, false); m_StartGameModal.gameObject.SetActive(false); m_StartGameModal.Setup(offlineRulesProcessor); m_StartGameModal.Show(); LazyLoadLoadingPanel(); //The loading screen must always be the last sibling m_LoadingScreen.transform.SetAsLastSibling(); } }
// Setups the single player modals. private void SetupSinglePlayerModals() { OfflineRulesProcessor offlineRulesProcessor = m_RulesProcessor as OfflineRulesProcessor; EndGameModal endGame = offlineRulesProcessor.endGameModal; if (endGame == null) { endGame = m_DefaultSinglePlayerModal; } InstantiateEndGameModal(endGame); if (m_EndGameModal != null) { m_EndGameModal.SetRulesProcessor(m_RulesProcessor); } // Handle start game modal if (offlineRulesProcessor.startGameModal != null) { m_StartGameModal = Instantiate(offlineRulesProcessor.startGameModal); m_StartGameModal.transform.SetParent(m_EndGameUiParent, false); m_StartGameModal.gameObject.SetActive(false); m_StartGameModal.Setup(offlineRulesProcessor); m_StartGameModal.Show(); LazyLoadLoadingPanel(); m_LoadingScreen.transform.SetAsLastSibling(); } }