예제 #1
0
 void Awake()
 {
     if (gc == null)
     {
         gc = this;
     }
     else
     {
         // if this one's a duplicate, destroy
         Destroy(this.gameObject);
         return;
     }
     DontDestroyOnLoad(this);
     titleText         = editorTitleText;
     dialogueUI        = GetComponentInChildren <DialogueUI>();
     signUI            = GetComponentInChildren <SignUI>();
     pc                = GetComponentInChildren <PlayerController>();
     rm                = GetComponent <RespawnManager>();
     playerFollower    = gc.GetComponentInChildren <PlayerFollower>();
     save              = gc.GetComponent <SaveWrapper>().save;
     blackoutUI        = GetComponentInChildren <BlackFadeUI>();
     pauseUI           = GetComponentInChildren <PauseUI>();
     abilityUIAnimator = GameObject.Find("AbilityGetUI").GetComponent <Animator>();
     inventory         = gc.GetComponentInChildren <InventoryController>();
     parallaxOption    = gc.GetComponentInChildren <ParallaxOption>();
     bossHealthUI      = GameObject.Find("BossHealthUI").GetComponent <BarUI>();
     bossHealthUI.gameObject.SetActive(false);
     playerMenu     = GameObject.Find("PlayerMenu");
     binarySaver    = gc.GetComponent <BinarySaver>();
     saveWrapper    = gc.GetComponent <SaveWrapper>();
     audioListener  = gc.GetComponentInChildren <AudioListener>();
     bossFightIntro = gc.GetComponentInChildren <BossFightIntro>(includeInactive: true);
 }
예제 #2
0
 void Awake()
 {
     if (gc == null)
     {
         gc = this;
     }
     else
     {
         // if this one's a duplicate, destroy
         Destroy(this.gameObject);
         return;
     }
     DontDestroyOnLoad(this);
     titleText         = editorTitleText;
     dialogueUI        = GetComponentInChildren <DialogueUI>();
     signUI            = GetComponentInChildren <SignUI>();
     pc                = GetComponentInChildren <PlayerController>();
     rm                = GetComponent <RespawnManager>();
     playerFollower    = gc.GetComponentInChildren <PlayerFollower>();
     save              = gc.GetComponent <Save>();
     blackoutUI        = GetComponentInChildren <BlackFadeUI>();
     pauseUI           = gc.transform.Find("PixelCanvas").transform.Find("PauseUI").GetComponent <Animator>();
     abilityUIAnimator = gc.transform.Find("PixelCanvas").transform.Find("AbilityGetUI").GetComponent <Animator>();
     inventory         = gc.GetComponentInChildren <InventoryController>();
     parallaxOption    = gc.GetComponentInChildren <ParallaxOption>();
 }
예제 #3
0
    public static void LoadScene(string sceneName, Beacon beacon = null)
    {
        if (beacon != null && beacon.leftScene != null)
        {
            string beaconSceneName = beacon.leftScene.scene.SceneName;

            if (SceneManager.GetActiveScene().path.Contains(beaconSceneName))
            {
                beaconSceneName = beacon.rightScene.scene.SceneName;
            }

            gc.GetComponent <TransitionManager>().LoadScene(beaconSceneName, beacon);
        }
        else
        {
            gc.GetComponent <TransitionManager>().LoadScene(sceneName, beacon);
        }
    }
 void Awake()
 {
     gc        = this;
     titleText = editorTitleText;
     DontDestroyOnLoad(this);
     dialogueUI     = GetComponentInChildren <DialogueUI>();
     signUI         = GetComponentInChildren <SignUI>();
     pc             = GetComponentInChildren <PlayerController>();
     rm             = GetComponent <RespawnManager>();
     playerFollower = gc.GetComponentInChildren <PlayerFollower>();
     save           = gc.GetComponent <Save>();
     blackoutUI     = GetComponentInChildren <BlackFadeUI>();
 }
 public static void LoadScene(string sceneName, string beaconName = null)
 {
     gc.GetComponent <TransitionManager>().LoadScene(sceneName, beaconName);
 }