private void UpdateScenePreload() { loadingGraphics?.SetActive(true); sceneLoadTask = SceneManager.LoadSceneAsync(nextSceneName); SceneTransitionHandler.HandleSceneTransition(currentSceneName, nextSceneName); sceneState = SceneState.Load; }
/// <summary> /// Awake /// If another version exists, destroy it and use the current version /// Set our scene state to INIT /// </summary> private void Awake() { if (sceneTransitionHandler != this && sceneTransitionHandler != null) { GameObject.Destroy(sceneTransitionHandler.gameObject); } sceneTransitionHandler = this; SetSceneState(SceneStates.Init); }
private void Awake() { //Singleton Pattern if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); }
void Awake() { if (singleton == null) { singleton = this; } else { Destroy(this.gameObject); } if (levelGraph == null) { levelGraph = GetComponent<Animator>(); } levelGraph.enabled = true; DontDestroyOnLoad(gameObject); }
public override void Interact() { //Debug.Log("sceneName: "+sceneName); CheckConditions(); if (isUsable) { SceneTransitionHandler.SceneGoto(sceneName, destinationPoint); } else { if (barkTrigger != null) { //Inject the player's transform before it is used barkTrigger.barker = SceneTransitionHandler.instance.spawnManager.player.transform; //barkTrigger.conversationActor = barkTrigger.barker; barkTrigger.gameObject.SetActive(true); } } }
private void LoadGame() { UI.Instance.LoadGameData(0); //Go to UI Test Room SceneTransitionHandler.SceneGoto("UITestScene", SpawnPoints.UITestRoomA); }
private void NewGame() { SceneTransitionHandler.SceneGoto("UITestScene", SpawnPoints.UITestRoomB); }