/// <summary> /// If the player is in vicinity of the door, another room is loaded and the current room is unloaded, bringing the player avatar to a new room. /// </summary> public void Enter() { if (this.isRandomDestination) { if (PedagogicalComponent_v2.Instance.CurrentTopic() == SceneTopic.NONE) { this.goingTo = SceneNames.BETA_TESTING_PRE_BOSS; } else { this.goingTo = SceneNames.RandomSceneName(); if (GameController_v7.Instance.RoomCountCheck()) { this.goingTo = SceneNames.BETA_TESTING_RANDOM_END; } } } Debug.Log("Player Went In " + goingTo + " " + doorNumber); // spawnPointManager.UpdatePreviousScene (SceneManager.GetActiveScene ().name, this.doorNumber); GameController_v7.Instance.UpdatePreviousScene(SceneManager.GetActiveScene().name, this.doorNumber); GameController_v7.Instance.GetObjectStateManager().RecordPlayerStats(); // objectStateManager.RecordPlayerStats (); Parameters parameters = new Parameters(); parameters.PutExtra("IS_HARD_SAVE", false); EventBroadcaster.Instance.PostEvent(EventNames.SAVE_DATA, parameters); // EventManager.RemoveHintOnTrigger (); EventBroadcaster.Instance.PostEvent(EventNames.REMOVE_HINT); EventManager.ResetTriggerSceneTitle(); #if UNITY_ANDROID // EventManager.EnableBothButtons (); #endif //Load Scene Connected to this entrance. LoadingScreen loadingScreen = FindObjectOfType <LoadingScreen>(); if (loadingScreen != null) { loadingScreen.LoadScene(goingTo, false); } else { Instantiate(loadingScreenPrefab); } // SceneManager.LoadScene (goingTo); }