Пример #1
0
    // Update is called once per frame
    void Update()
    {
        controlador = ControladorAudio.instance;

        verificar = controlador.GetComponent <ControladorAudio>().alto;

        // Player2 = Player2.instance;

        //Sereproduce = Player2.GetComponent<Player2>().Sereproduce;

        if (FindObjectOfType <AudioManager>().IsPlaying("MisionCables") == true)
        {
            Debug.Log("sa");

            cronometro = cronometro + 1 * Time.deltaTime;

            Ocupado = true;
        }

        else
        {
            Ocupado = false;
        }

        if (cronometro >= Stop)
        {
            FindObjectOfType <AudioManager>().Pause("MisionCables");
        }
    }
Пример #2
0
    void Awake()
    {
        Singleton = this;
        DontDestroyOnLoad(this.gameObject);


        //Debug.Log ("Awake Controlador Audio");
    }
 void Awake()
 {
     Singleton   = this;
     volumeSFX   = 1;
     volumeMusic = 1;
     auxSFX      = 1;
     auxMusic    = 1;
     Mudo        = false;
 }
Пример #4
0
 void Awake()
 {
     if (instancia == null)
     {
         instancia = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #5
0
    // Update is called once per frame
    void Update()
    {
        controlador = ControladorAudio.instance;

        verificar = controlador.GetComponent <ControladorAudio>().alto;

        PasaASiguienteNivel();
        m1 = mision1.GetComponent <Cables>().prenderLuces;
        m2 = mision2.GetComponent <ComprobadorPalanca>().ganaste;
        m3 = mision3.GetComponent <CompletarOxigeno>().misionCompleta;

        m4 = mision4.GetComponent <Cables>().prenderLuces;
        m5 = mision5.GetComponent <PlacaPresion>().misionCompleta;

        m6 = mision6.GetComponent <CabinaOxigeno>().misionCumplida;

        if (FindObjectOfType <AudioManager>().IsPlaying("MisionesNivel1Completadas"))
        {
            Niveles = true;

            cronometro = cronometro + 1 * Time.deltaTime;
        }
        else
        {
            Niveles = false;

            cronometro = 0;
        }

        if (cronometro >= Nivel1)
        {
            FindObjectOfType <AudioManager>().Pause("MisionesNivel1Completadas");
        }

        if (FindObjectOfType <AudioManager>().IsPlaying("MisionesNivel2Completadas"))
        {
            Niveles = true;

            cronometro = cronometro + 1 * Time.deltaTime;
        }
        else
        {
            Niveles = false;

            cronometro = 0;
        }

        if (cronometro >= Nivel2)
        {
            FindObjectOfType <AudioManager>().Pause("MisionesNivel2Completadas");
        }
    }
Пример #6
0
 void searchObjects()
 {
     optionsContoller   = GameObject.Find("GamePreferences").GetComponent <OptionsPreferences>();
     popUpNewAnimal     = GameObject.Find("PopUpAnimalNuevo");
     nameOfAnimal       = GameObject.Find("TextoAnimal").GetComponent <Text>();
     audioController    = GameObject.Find("AudioController").GetComponent <ControladorAudio>();
     soundOfAnimal      = GameObject.Find("TextoSonidoAnimal").GetComponent <Text>();
     imageOfAnimalPopUp = GameObject.Find("ImagePopUpAnimal").GetComponent <Image>();
     showHidePopUp(false);
     imagesAnimals = GameObject.FindGameObjectsWithTag("Imagen");
     instruction   = GameObject.Find("Instruccion");
     ocultarImagenes();
 }
Пример #7
0
    //public Animation anim;

    // Use this for initialization
    void Start()
    {
        bandera = FindObjectOfType <ControladorBandera>();
        audio   = FindObjectOfType <ControladorAudio>();
        vidas   = FindObjectOfType <ControladorVida>();
    }
Пример #8
0
 // Use this for initialization
 void Start()
 {
     audioController = GameObject.Find("AudioController").GetComponent <ControladorAudio>();
 }
Пример #9
0
 // Use this for initialization
 void Start()
 {
     audio = FindObjectOfType <ControladorAudio>();
 }
Пример #10
0
 void Start()
 {
     panelInstrucciones.SetActive(false);
     panelControles.SetActive(false);
     audioController = GameObject.Find("AudioController").GetComponent <ControladorAudio>();
 }
Пример #11
0
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
 }