Exemplo n.º 1
0
 void Start()
 {
     //Access multiple different scripts and components here
     PCV3          = GameObject.FindWithTag("Player").GetComponent <PlayerControllerV3>();
     anim          = GameObject.FindWithTag("Player").GetComponent <Animator>();
     levelChanger2 = GameObject.Find("LevelChanger").GetComponent <LevelChanger2> ();
     audioManager  = GameObject.Find("AudioManager").GetComponent <AudioManager>();
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        //References the PlayerControllerV3 Script on the PlayerTest Object so that components from PlayerTest can be used.
        PCV3Script = GameObject.Find("Squire").GetComponent <PlayerControllerV3>();

        //References the ItemPickup script so that I can use the boolean to check if the item has been collected.
        IPScript = GameObject.Find("DialogueSpot3/ItemCollect").GetComponent <ItemPickup>();

        audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>();
    }
Exemplo n.º 3
0
    void Start()
    {
        //References the PlayerControllerV3 Script by finding the GameObject with the "Player" tag so that components from the Player GameObject can be used.
        PCV3Script = GameObject.FindWithTag("Player").GetComponent <PlayerControllerV3>();

        //Now able to access the Player's animator.
        anim = GameObject.FindWithTag("Player").GetComponent <Animator>();

        //References the DoorSceneTransition Script by finding the ClosedDoor GameObject.
        DSTScript = GameObject.Find("ClosedDoor").GetComponent <DoorSceneTransition>();

        //Used to later reset the movementSpeed value back to whatever it was previously set to.
        movementSpeedReset = PCV3Script.movementSpeed;
    }
Exemplo n.º 4
0
 void Start()
 {
     audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>();
     PCV3         = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControllerV3>();
     anim         = GameObject.FindWithTag("Player").GetComponent <Animator>();
 }