Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        isPaused = false;
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        disableControls = player.GetComponent <DisableControls>();
        UI = GameObject.FindGameObjectWithTag("UI");
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     intro           = true;
     main            = Camera.main;
     main.depth      = -100;
     idx             = -1;
     disableControls = GameObject.FindWithTag("Player").GetComponent <DisableControls>();
     canvas          = GameObject.FindWithTag("UI");
     print(canvas);
 }
Ejemplo n.º 3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         began           = true;
         intro           = true;
         main            = Camera.main;
         main.depth      = -100;
         idx             = -1;
         disableControls = GameObject.FindGameObjectWithTag("Player").GetComponent <DisableControls>();
         disableControls.Disable();
         Cursor.lockState = CursorLockMode.Locked;
         canvas           = GameObject.FindGameObjectWithTag("UI");
         FindObjectOfType <CrumbsBanksAI>().DelaySpotPlayer(spotDelay);
         src      = GameObject.FindGameObjectWithTag("CrumbsBanks").GetComponent <AudioSource>();
         src.clip = clip;
         src.Play();
     }
 }