示例#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");
        }
    }
    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;
 }