IEnumerator GetInstanceInformation() { yield return(null); instanceInformation = FindObjectOfType <GameInstanceInformation>(); SpawnInPlayer(instanceInformation.exitedSceneName); }
private void Start() { instanceInformation = FindObjectOfType <GameInstanceInformation>(); cartilidgeHealth = playerController.GetComponent <CartilidgeHealth>(); transitionManager = FindObjectOfType <SceneTransitionManager>(); halvedFore = playerController.pushForce * 0.5f; }
/// <summary> /// Call this once the scene fades in. /// </summary> public void SceneInitialization() { instanceInformation = FindObjectOfType <GameInstanceInformation>(); if (instanceInformation.hasEye) { Destroy(gameObject); } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
IEnumerator GetInstanceInformation() { yield return(null); instanceInformation = FindObjectOfType <GameInstanceInformation>(); treeLayer = instanceInformation.talkerTreeLayer; if (treeLayer > 2) { transform.root.gameObject.SetActive(false); colliderStopper.SetActive(false); } //Debug.Log(treeLayer); }
IEnumerator GetInstanceInformation() { yield return(null); instanceInformation = FindObjectOfType <GameInstanceInformation>(); if (instanceInformation.talkerTreeLayer > 1) { //Debug.Log("Open Sesame"); itemDoor.UpdateDoorStatus(true); } if (instanceInformation.talkerTreeLayer > 2) { exitDoor.UpdateDoorStatus(true); } }
/// <summary> /// Should be done once the scene is ready to be played. /// </summary> public void SceneInitialization() { instanceInformation = FindObjectOfType <GameInstanceInformation>(); currentHealth = instanceInformation.currentPlayerHealth; UpdateHealthGraphic(); }