IEnumerator GetInstanceInformation()
    {
        yield return(null);

        instanceInformation = FindObjectOfType <GameInstanceInformation>();
        SpawnInPlayer(instanceInformation.exitedSceneName);
    }
Пример #2
0
 private void Start()
 {
     instanceInformation = FindObjectOfType <GameInstanceInformation>();
     cartilidgeHealth    = playerController.GetComponent <CartilidgeHealth>();
     transitionManager   = FindObjectOfType <SceneTransitionManager>();
     halvedFore          = playerController.pushForce * 0.5f;
 }
Пример #3
0
 /// <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);
    }
Пример #6
0
    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);
        }
    }
Пример #7
0
 /// <summary>
 /// Should be done once the scene is ready to be played.
 /// </summary>
 public void SceneInitialization()
 {
     instanceInformation = FindObjectOfType <GameInstanceInformation>();
     currentHealth       = instanceInformation.currentPlayerHealth;
     UpdateHealthGraphic();
 }