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