예제 #1
0
    private void Awake()
    {
        instance = this;

        playerController3 = FindObjectOfType <PlayerController3>();      //Find movement script
        playerGameObject  = GameObject.Find("Player");                   //Find player GameObject
        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>();
    }
예제 #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();
        }
    }