Esempio n. 1
0
 public void Close()
 {
     if (m_isOpen)
     {
         m_isOpen = false;
         m_canvas.gameObject.SetActive(false);
         PauseManager.UnPause();
     }
 }
Esempio n. 2
0
 public void Open()
 {
     if (!m_isOpen && !PauseManager.IsPaused)
     {
         m_isOpen = true;
         m_canvas.gameObject.SetActive(true);
         ChangeToMainPage();
         PauseManager.Pause();
     }
 }
Esempio n. 3
0
		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);
			}
		}
Esempio n. 4
0
 private void Awake()
 {
     if (_instance != null)
     {
         Destroy(this);
     }
     else
     {
         _instance  = this;
         _state     = PauseManagerState.Idle;
         _hardPause = false;
         if (_dontDestroyOnLoad)
         {
             DontDestroyOnLoad(gameObject);
         }
     }
 }
Esempio n. 5
0
        private void Awake()
        {
            if (_instance != null)
            {
                Destroy(this);
            }
            else
            {
                _instance  = this;
                _state     = PauseManagerState.Idle;
                _hardPause = false;
                SceneManager.sceneLoaded += HandleLevelWasLoaded;

                if (_dontDestroyOnLoad)
                {
                    DontDestroyOnLoad(gameObject);
                }
            }
        }