/// <summary> /// 로드 Scene 시작 /// </summary> public void LoadedScene() { _currentScenePage = _nextScenePage; // Scene 상태 전환 if (_currentScenePage == ScenePage.GAMEPLAY) { GameManager.Instance.GameStart(); } }
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); //} }
private void Awake() { if (Instance != null) { Destroy(gameObject); return; } Instance = this; DontDestroyOnLoad(gameObject); _currentScenePage = ScenePage.NONE; }
/// <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(); } }