Exemplo n.º 1
0
    public void CondicionVictoriaJ1TestSimplePasses()
    {
        int _FocosPrendidos = 5;
        int _FocosParaGanar = 5;

        var engine = new CondicionVictoriaJ1();

        bool result = engine.condiciondevictoria(_FocosPrendidos, _FocosParaGanar);

        Assert.IsTrue(result);
    }
Exemplo n.º 2
0
    void Update()
    {
        if (quienganoengine.Gano(J1Gano) == 1)
        {
            //////////////////////////////////////////////////// GANO / PERDIO EL JUGADOR
            TxtGanarJ1.SetActive(true);
            //Explocion.SetActive(true);
        }

        if (Tiempo_De_Espera_Despues_Del_Tap_1 >= 0 && DeltaTime > 0)
        {
            Tiempo_De_Espera_Despues_Del_Tap_1 = _deltaTime.restarTiempo(Tiempo_De_Espera_Despues_Del_Tap_1, Time.deltaTime);
            if (Tiempo_De_Espera_Despues_Del_Tap_1 <= 0)
            {
                Tap_Final         = Tap_Del_Jugador_1;
                Tap_Del_Jugador_1 = 0;
                condicion.RevisionResultado(Tap_Final, ListaNumeros[Numero_De_Focos_Prendidos], Numero_De_Focos_Prendidos);
                PrenderLed(Numero_De_Focos_Prendidos);
            }
        }
        if (Jugando == true && DeltaTime > 0)
        {
            TeclaESC();
            DeltaTime = _deltaTime.restarTiempo(DeltaTime, Time.deltaTime);
            MouseClik();
            tiempo.TiempoJuego(DeltaTime);
            victoriaEngin.condiciondevictoria(Numero_De_Focos_Prendidos, RevisarEscena.FocosParaNivel);
            derrotaEngine.RevisarTiempo(DeltaTime);
            TxtTiempo.text = DeltaTime.ToString("F0");
        }

        if (derrotaEngine.RevisarTiempo(DeltaTime) == true)
        {
            TxtEmpate.SetActive(true);
            TiempoParaProxEscena -= Time.deltaTime;
            Jugando = false;
            if (TiempoParaProxEscena <= 0)
            {
                SceneManager.LoadScene("00Main_Menu");
            }
        }
        TxtTiempo.text = DeltaTime.ToString("F0");

        TxtTaps.text = Tap_Del_Jugador_1.ToString();
    }
Exemplo n.º 3
0
    void Update()
    {
        if (quienganoengine.Gano(J1Gano) == 1)
        {
            TxtGanarJ1.active = true;
            TimeNexScene     -= Time.deltaTime * 1;
        }
        if (TimeNexScene <= 0)
        {
            SceneManager.LoadScene("02Menu");
        }

        if (Tiempo_De_Espera_Despues_Del_Tap >= 0 && DeltaTime > 0)
        {
            Tiempo_De_Espera_Despues_Del_Tap -= Time.deltaTime * 1;
            if (Tiempo_De_Espera_Despues_Del_Tap <= 0)
            {
                Tap_Final       = Tap_Del_Jugador;
                Tap_Del_Jugador = 0;
                condicion.RevisionResultado(Tap_Final, ListaNumeros[Numero_De_Focos_Prendidos], Numero_De_Focos_Prendidos);
                PrenderLed(Numero_De_Focos_Prendidos);
            }
        }

        if (Jugando == true && DeltaTime > 0)
        {
            MouseClik();
            DeltaTime -= Time.deltaTime * 1;
            tiempoEngine.TiempoJuego(DeltaTime);
            victoriaEngin.condiciondevictoria(Numero_De_Focos_Prendidos, RevisarEscena.FocosParaNivel);
            derrotaEngine.RevisarTiempo(DeltaTime);
            TxtTiempo.text = DeltaTime.ToString("F0");
        }

        TxtTaps.text = Tap_Del_Jugador.ToString();
    }