Exemplo n.º 1
0
 void OnEnable()
 {
     diveManager          = FindObjectOfType <DiveManager>();
     collectionController = FindObjectOfType <CollectionController>();
     playerController     = FindObjectOfType <PlayerController4>();
     UpdateUI();
 }
Exemplo n.º 2
0
    private void Awake()
    {
        instance = this;

        playerController4 = FindObjectOfType <PlayerController4>();      //Find movement script
        playerRb          = playerGameObject.GetComponent <Rigidbody>(); //Find player Rigidbody

        playerInteraction  = FindObjectOfType <PlayerInteraction>();
        interactiveElement = FindObjectOfType <InteractiveElement>();
        fireOnBrazier      = FindObjectOfType <FireOnBrazier>();
        health             = FindObjectOfType <Health>();
        audioManager       = FindObjectOfType <AudioManager>();
        door2  = FindObjectOfType <Door2>();
        damage = FindObjectOfType <Damage>();

        if (YouAreInThePresent)
        {
            AudioManager.instance.PresentSnapshot();
        }
        else
        {
            AudioManager.instance.PastSnapshot();
        }
    }
Exemplo n.º 3
0
 void Awake()
 {
     playerController     = GetComponent <PlayerController4>();
     gameManager          = FindObjectOfType <GameManager>();
     gameManager.OnReset += GameManager_OnReset;
 }