public void PreviousScreen() { if (m_prevScreen != null) { if (m_currentScreen != null) { m_currentScreen.SetActive(false); GameObject temp = m_currentScreen; m_currentScreen = m_prevScreen; m_prevScreen = temp; } else { m_currentScreen = m_prevScreen; m_prevScreen = null; } ApplyPersistentScreen(); m_currentScreen.SetActive(true); backButton.SetActive(true); M_GameHelper.SPauseLevel(); } else { HideScreen(); } }
public void ChangeScreen(GameObject screen) { if (m_currentScreen == screen) { HideScreen(); } else { if (m_currentScreen != null) { m_currentScreen.SetActive(false); } m_prevScreen = m_currentScreen; m_currentScreen = screen; ApplyPersistentScreen(); m_currentScreen.SetActive(true); backButton.SetActive(true); M_GameHelper.SPauseLevel(); } }