コード例 #1
0
 private void UpdateScenePreload()
 {
     loadingGraphics?.SetActive(true);
     sceneLoadTask = SceneManager.LoadSceneAsync(nextSceneName);
     SceneTransitionHandler.HandleSceneTransition(currentSceneName, nextSceneName);
     sceneState = SceneState.Load;
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 private void Awake()
 {
     //Singleton Pattern
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
         return;
     }
     instance = this;
     DontDestroyOnLoad(gameObject);
 }
コード例 #4
0
    void Awake()
    {
        if (singleton == null) { singleton = this; }
        else { Destroy(this.gameObject); }

        if (levelGraph == null) {
            levelGraph = GetComponent<Animator>();
        }
        levelGraph.enabled = true;

        DontDestroyOnLoad(gameObject);
    }
コード例 #5
0
 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);
         }
     }
 }
コード例 #6
0
 private void LoadGame()
 {
     UI.Instance.LoadGameData(0);
     //Go to UI Test Room
     SceneTransitionHandler.SceneGoto("UITestScene", SpawnPoints.UITestRoomA);
 }
コード例 #7
0
 private void NewGame()
 {
     SceneTransitionHandler.SceneGoto("UITestScene", SpawnPoints.UITestRoomB);
 }