示例#1
0
        /// <summary>
        /// 로드 Scene 시작
        /// </summary>
        public void LoadedScene()
        {
            _currentScenePage = _nextScenePage;     // Scene 상태 전환

            if (_currentScenePage == ScenePage.GAMEPLAY)
            {
                GameManager.Instance.GameStart();
            }
        }
示例#2
0
        private void Start()
        {
            SceneManager.sceneLoaded += SceneManager_sceneLoaded;

            _currentScenePage = startScenePage;
            //if (_currentScenePage == ScenePage.GAMEPLAY)
            //{
            //    // GAMEPLAY Scene의 경우 무조건 GameManager실행하도록 함
            //    GameManager.Instance.ChangeGameState(ScriptableObjects.GameStateType.Init);
            //    GameManager.Instance.ChangeGameState(ScriptableObjects.GameStateType.MainMenu);
            //}
        }
示例#3
0
        private void Awake()
        {
            if (Instance != null)
            {
                Destroy(gameObject);
                return;
            }

            Instance = this;
            DontDestroyOnLoad(gameObject);
            _currentScenePage = ScenePage.NONE;
        }
示例#4
0
        /// <summary>
        /// Scene 전환
        /// </summary>
        /// <param name="_nextScenePage">다음 Scene</param>
        public void ChangeScene(ScenePage _nextScenePage, bool isFade = true)
        {
            this.isFade = isFade;

            Time.timeScale      = 0;
            this._nextScenePage = _nextScenePage;

            if (this.isFade)
            {
                // 숨기고
                FadeAction(FadeType.FADEIN, LoadScene);
                //StartCoroutine("RunFadeAction", FadeType.FADEIN);
            }
            else
            {
                LoadScene();
            }
        }