public void Close() { if (m_isOpen) { m_isOpen = false; m_canvas.gameObject.SetActive(false); PauseManager.UnPause(); } }
public void Open() { if (!m_isOpen && !PauseManager.IsPaused) { m_isOpen = true; m_canvas.gameObject.SetActive(true); ChangeToMainPage(); PauseManager.Pause(); } }
private void Awake() { if(m_instance != null) { Destroy(this); } else { m_instance = this; m_state = PauseManagerState.Idle; m_hardPause = false; if(m_dontDestroyOnLoad) DontDestroyOnLoad(gameObject); } }
private void Awake() { if (_instance != null) { Destroy(this); } else { _instance = this; _state = PauseManagerState.Idle; _hardPause = false; if (_dontDestroyOnLoad) { DontDestroyOnLoad(gameObject); } } }
private void Awake() { if (_instance != null) { Destroy(this); } else { _instance = this; _state = PauseManagerState.Idle; _hardPause = false; SceneManager.sceneLoaded += HandleLevelWasLoaded; if (_dontDestroyOnLoad) { DontDestroyOnLoad(gameObject); } } }