Пример #1
0
    void Awake()
    {
        escena_actual = SceneManager.GetActiveScene().buildIndex;
        if (escena_actual != 16)
        {
            admintesoros      = GameObject.Find("AdminTesoros");
            gameobject_musica = GameObject.Find("Música");
            at = admintesoros.GetComponent <AdminTesoros>();
        }

        jugador    = GameObject.FindGameObjectWithTag("Player");
        scriptvida = jugador.GetComponent <VidaJoe> ();

        canvas = GetComponent <Canvas> ();
        au     = GetComponent <AudioSource> ();

        if ((escena_actual != 16))
        {
            if (escena_actual == 3)
            {
                au_gameobject_musica  = gameobject_musica.GetComponents <AudioSource>();
                au_gameobject_musica2 = null;
            }
            else
            {
                au_gameobject_musica2 = gameobject_musica.GetComponent <AudioSource>();
                au_gameobject_musica  = null;
            }
        }
    }
Пример #2
0
 void Awake()
 {
     anim         = GetComponent <Animator>();
     au           = GetComponent <AudioSource>();
     admintesoros = GameObject.Find("AdminTesoros");
     at           = admintesoros.GetComponent <AdminTesoros>();
 }
Пример #3
0
 void Awake()
 {
     jugador      = GameObject.FindGameObjectWithTag("Player");
     admintesoros = GameObject.Find("AdminTesoros");
     adm          = admintesoros.GetComponent <AdminTesoros>();
     scriptvida   = jugador.GetComponent <VidaJoe>();
     animator     = GetComponent <Animator>();
     au           = GetComponents <AudioSource>();
 }
Пример #4
0
 void Awake()
 {
     escenaact = SceneManager.GetActiveScene().buildIndex;
     mensaje   = GameObject.Find("NivelSuperado");
     if (escenaact != 16)
     {
         admintesoros = GameObject.Find("AdminTesoros");
         at           = admintesoros.GetComponent <AdminTesoros>();
         texto.text   = "$" + 0;
     }
     imagen         = mensaje.GetComponent <Canvas>();
     imagen.enabled = false;
 }
Пример #5
0
 void Awake()
 {
     sonidos      = GameObject.Find("Sonidos");
     au           = sonidos.GetComponents <AudioSource>();
     admintesoros = GameObject.Find("AdminTesoros");
     adm          = admintesoros.GetComponent <AdminTesoros>();
     muertos      = VidaFT.muerto;
     scriptcofre  = cofre.GetComponent <CofreHacha>();
     if (muertos && adm.getnuminv() < 3)
     {
         cofre.transform.position = scriptcofre.getpossuelo();
         cofre.SetActive(true);
     }
 }