コード例 #1
0
ファイル: volteo2.cs プロジェクト: JohanaMedina/TestAlzheimer
    void Update()
    {
        aux   = contr1 + contr2 + contp1 + contp2 + conte1 + conte2 + contc1 + contc2;
        count = ce + cc + cp + cr;
        t    += Time.deltaTime;
        if (fc1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            tc1 -= Time.deltaTime;
        }
        if (fr1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            tr1 -= Time.deltaTime;
        }
        if (fc2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            tc2 -= Time.deltaTime;
        }
        if (fr2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            tr2 -= Time.deltaTime;
        }
        if (fp1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            tp1 -= Time.deltaTime;
        }
        if (fp2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            tp2 -= Time.deltaTime;
        }
        if (fe1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            te1 -= Time.deltaTime;
        }
        if (fe2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying)
        {
            te2 -= Time.deltaTime;
        }
        if (tc1 <= 0 && sc1 == 0)
        {
            Up1.Play();
            vuelta.Play();
            contc1 = 1;
            sc1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tr1 <= 0 && sr1 == 0)
        {
            Up2.Play();
            vuelta.Play();
            contr1 = 1;
            sr1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tr2 <= 0 && sr2 == 0)
        {
            Up8.Play();
            vuelta.Play();
            contr2 = 1;
            sr2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tc2 <= 0 && sc2 == 0)
        {
            Up5.Play();
            vuelta.Play();
            contc2 = 1;
            sc2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tp2 <= 0 && sp2 == 0)
        {
            Up7.Play();
            vuelta.Play();
            contp2 = 1;
            sp2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tp1 <= 0 && sp1 == 0)
        {
            Up4.Play();
            vuelta.Play();
            contp1 = 1;
            sp1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (te2 <= 0 && se2 == 0)
        {
            Up6.Play();
            vuelta.Play();
            conte2 = 1;
            se2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (te1 <= 0 && se1 == 0)
        {
            Up3.Play();
            vuelta.Play();
            conte1 = 1;
            se1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }

        if (volteo1 == 1 && voltear2 == 1 && aux == 2 && !Up1.isPlaying && !Up2.isPlaying && !Up5.isPlaying && !Up4.isPlaying && !Up8.isPlaying && !Up3.isPlaying && !Up6.isPlaying && !Up7.isPlaying)
        {
            if (contr1 == 1 && contr2 == 0)
            {
                carta2Down();
                volteo1  = 0;
                voltear2 = 0;
                sr1      = 0;
                contr1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contr1 == 0 && contr2 == 1)
            {
                carta8Down();
                volteo1  = 0;
                voltear2 = 0;
                sr2      = 0;
                contr2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contr1 == 1 && contr2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cr       = 1;
                contr1   = 0;
                contr2   = 0;
                acierto.Play();
                pr1.SetActive(true);
                pr2.SetActive(true);
                c_aciertos++;
            }
            if (contc1 == 1 && contc2 == 0)
            {
                carta1Down();
                volteo1  = 0;
                voltear2 = 0;
                sc1      = 0;
                contc1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contc1 == 0 && contc2 == 1)
            {
                carta5Down();
                volteo1  = 0;
                voltear2 = 0;
                sc2      = 0;
                contc2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contc1 == 1 && contc2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cc       = 1;
                contc1   = 0;
                contc2   = 0;
                acierto.Play();
                pc1.SetActive(true);
                pc2.SetActive(true);
                c_aciertos++;
            }
            if (contp1 == 1 && contp2 == 0)
            {
                carta4Down();
                volteo1  = 0;
                voltear2 = 0;
                sp1      = 0;
                contp1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contp1 == 0 && contp2 == 1)
            {
                carta7Down();
                volteo1  = 0;
                voltear2 = 0;
                sp2      = 0;
                contp2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contp1 == 1 && contp2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cp       = 1;
                contp1   = 0;
                contp2   = 0;
                acierto.Play();
                pp1.SetActive(true);
                pp2.SetActive(true);
                c_aciertos++;
            }
            if (conte1 == 1 && conte2 == 0)
            {
                carta3Down();
                volteo1  = 0;
                voltear2 = 0;
                se1      = 0;
                conte1   = 0;
                mal.Play();
                c_errores++;
            }
            if (conte1 == 0 && conte2 == 1)
            {
                carta6Down();
                volteo1  = 0;
                voltear2 = 0;
                se2      = 0;
                conte2   = 0;
                mal.Play();
                c_errores++;
            }
            if (conte1 == 1 && conte2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                ce       = 1;
                conte1   = 0;
                conte2   = 0;
                acierto.Play();
                pe1.SetActive(true);
                pe2.SetActive(true);
                c_aciertos++;
            }

            aux = 0;
        }
        if (count == 4)
        {
            count = 0;
            cc    = 0;
            b     = 1;
        }
        if (b == 1)
        {
            if (f == 0 && c_errores != 0)
            {
                c_errores = c_errores / 2;
                f         = 1;
            }

            PlayerPrefs.SetString(tc, t.ToString("f0"));
            PlayerPrefs.SetString(ec, c_errores.ToString());
            PlayerPrefs.SetString(ac, c_aciertos.ToString());
            // Application.LoadLevel("secuencias4");
        }
    }
コード例 #2
0
ファイル: volteo4.cs プロジェクト: JohanaMedina/TestAlzheimer
    void Update()
    {
        t    += Time.deltaTime;
        aux   = contr1 + contr2 + contp1 + contp2 + conte1 + conte2 + contc1 + contc2 + contpa1 + contpa2 + contg1 + contg2 + conta1 + conta2 + contb1 + contb2;
        count = ce + cc + cp + cr + cpa + cg + ca + cb;

        if (fc1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tc1 -= Time.deltaTime;
        }
        if (fr1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tr1 -= Time.deltaTime;
        }
        if (fc2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tc2 -= Time.deltaTime;
        }
        if (fr2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tr2 -= Time.deltaTime;
        }
        if (fp1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tp1 -= Time.deltaTime;
        }
        if (fp2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tp2 -= Time.deltaTime;
        }
        if (fe1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            te1 -= Time.deltaTime;
        }
        if (fe2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            te2 -= Time.deltaTime;
        }
        if (fg2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tg2 -= Time.deltaTime;
        }
        if (fpa1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tpa1 -= Time.deltaTime;
        }
        if (fpa2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tpa2 -= Time.deltaTime;
        }
        if (fg1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tg1 -= Time.deltaTime;
        }
        if (fa1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            ta1 -= Time.deltaTime;
        }
        if (fa2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            ta2 -= Time.deltaTime;
        }
        if (fb1 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tb1 -= Time.deltaTime;
        }
        if (fb2 == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying && !Down3.isPlaying && !Down6.isPlaying && !Down7.isPlaying && !Down9.isPlaying && !Down10.isPlaying && !Down11.isPlaying && !Down12.isPlaying && !Down13.isPlaying && !Down14.isPlaying && !Down15.isPlaying && !Down16.isPlaying)
        {
            tb2 -= Time.deltaTime;
        }
        if (tc1 <= 0 && sc1 == 0)
        {
            Up5.Play();
            vuelta.Play();
            contc1 = 1;
            sc1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tr1 <= 0 && sr1 == 0)
        {
            Up2.Play();
            vuelta.Play();
            contr1 = 1;
            sr1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tr2 <= 0 && sr2 == 0)
        {
            Up6.Play();
            vuelta.Play();
            contr2 = 1;
            sr2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tc2 <= 0 && sc2 == 0)
        {
            Up12.Play();
            vuelta.Play();
            contc2 = 1;
            sc2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tp2 <= 0 && sp2 == 0)
        {
            Up14.Play();
            vuelta.Play();
            contp2 = 1;
            sp2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tp1 <= 0 && sp1 == 0)
        {
            Up4.Play();
            vuelta.Play();
            contp1 = 1;
            sp1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (te2 <= 0 && se2 == 0)
        {
            Up15.Play();
            vuelta.Play();
            conte2 = 1;
            se2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (te1 <= 0 && se1 == 0)
        {
            Up3.Play();
            vuelta.Play();
            conte1 = 1;
            se1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tpa1 <= 0 && spa1 == 0)
        {
            Up7.Play();
            vuelta.Play();
            contpa1 = 1;
            spa1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tpa2 <= 0 && spa2 == 0)
        {
            Up16.Play();
            vuelta.Play();
            contpa2 = 1;
            spa2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tg1 <= 0 && sg1 == 0)
        {
            Up10.Play();
            vuelta.Play();
            contg1 = 1;
            sg1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tg2 <= 0 && sg2 == 0)
        {
            Up13.Play();
            vuelta.Play();
            contg2 = 1;
            sg2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (ta1 <= 0 && sa1 == 0)
        {
            Up1.Play();
            vuelta.Play();
            conta1 = 1;
            sa1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (ta2 <= 0 && sa2 == 0)
        {
            Up11.Play();
            vuelta.Play();
            conta2 = 1;
            sa2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tb1 <= 0 && sb1 == 0)
        {
            Up8.Play();
            vuelta.Play();
            contb1 = 1;
            sb1    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (tb2 <= 0 && sb2 == 0)
        {
            Up9.Play();
            vuelta.Play();
            contb2 = 1;
            sb2    = 1;
            if (volteo1 == 1)
            {
                voltear2 = 1;
            }
            volteo1 = 1;
        }
        if (volteo1 == 1 && voltear2 == 1 && aux == 2 && !Up1.isPlaying && !Up2.isPlaying && !Up5.isPlaying && !Up4.isPlaying && !Up8.isPlaying && !Up3.isPlaying && !Up6.isPlaying && !Up7.isPlaying && !Up9.isPlaying && !Up10.isPlaying && !Up11.isPlaying && !Up12.isPlaying && !Up13.isPlaying && !Up14.isPlaying && !Up14.isPlaying && !Up15.isPlaying && !Up16.isPlaying)
        {
            if (contr1 == 1 && contr2 == 0)
            {
                carta2Down();
                volteo1  = 0;
                voltear2 = 0;
                sr1      = 0;
                contr1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contr1 == 0 && contr2 == 1)
            {
                carta6Down();
                volteo1  = 0;
                voltear2 = 0;
                sr2      = 0;
                contr2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contr1 == 1 && contr2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cr       = 1;
                contr1   = 0;
                contr2   = 0;
                acierto.Play();
                pr1.SetActive(true);
                pr2.SetActive(true);
                c_aciertos++;
            }
            if (contc1 == 1 && contc2 == 0)
            {
                carta5Down();
                volteo1  = 0;
                voltear2 = 0;
                sc1      = 0;
                contc1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contc1 == 0 && contc2 == 1)
            {
                carta12Down();
                volteo1  = 0;
                voltear2 = 0;
                sc2      = 0;
                contc2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contc1 == 1 && contc2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cc       = 1;
                contc1   = 0;
                contc2   = 0;
                acierto.Play();
                pc1.SetActive(true);
                pc2.SetActive(true);
                c_aciertos++;
            }
            if (contp1 == 1 && contp2 == 0)
            {
                carta4Down();
                volteo1  = 0;
                voltear2 = 0;
                sp1      = 0;
                contp1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contp1 == 0 && contp2 == 1)
            {
                carta14Down();
                volteo1  = 0;
                voltear2 = 0;
                sp2      = 0;
                contp2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contp1 == 1 && contp2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cp       = 1;
                contp1   = 0;
                contp2   = 0;
                acierto.Play();
                pp1.SetActive(true);
                pp2.SetActive(true);
                c_aciertos++;
            }
            if (conte1 == 1 && conte2 == 0)
            {
                carta3Down();
                volteo1  = 0;
                voltear2 = 0;
                se1      = 0;
                conte1   = 0;
                mal.Play();
                c_errores++;
            }
            if (conte1 == 0 && conte2 == 1)
            {
                carta15Down();
                volteo1  = 0;
                voltear2 = 0;
                se2      = 0;
                conte2   = 0;
                mal.Play();
                c_errores++;
            }
            if (conte1 == 1 && conte2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                ce       = 1;
                conte1   = 0;
                conte2   = 0;
                acierto.Play();
                pe1.SetActive(true);
                pe2.SetActive(true);
                c_aciertos++;
            }
            if (contpa1 == 1 && contpa2 == 0)
            {
                carta7Down();
                volteo1  = 0;
                voltear2 = 0;
                spa1     = 0;
                contpa1  = 0;
                mal.Play();
                c_errores++;
            }
            if (contpa1 == 0 && contpa2 == 1)
            {
                carta16Down();
                volteo1  = 0;
                voltear2 = 0;
                spa2     = 0;
                contpa2  = 0;
                mal.Play();
                c_errores++;
            }
            if (contpa1 == 1 && contpa2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cpa      = 1;
                contpa1  = 0;
                contpa2  = 0;
                acierto.Play();
                ppa1.SetActive(true);
                ppa2.SetActive(true);
                c_aciertos++;
            }
            if (contg1 == 1 && contg2 == 0)
            {
                carta10Down();
                volteo1  = 0;
                voltear2 = 0;
                sg1      = 0;
                contg1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contg1 == 0 && contg2 == 1)
            {
                carta13Down();
                volteo1  = 0;
                voltear2 = 0;
                sg2      = 0;
                contg2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contg1 == 1 && contg2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cg       = 1;
                contg1   = 0;
                contg2   = 0;
                acierto.Play();
                pg1.SetActive(true);
                pg2.SetActive(true);
                c_aciertos++;
            }
            if (conta1 == 1 && conta2 == 0)
            {
                carta1Down();
                volteo1  = 0;
                voltear2 = 0;
                sa1      = 0;
                conta1   = 0;
                mal.Play();
                c_errores++;
            }
            if (conta1 == 0 && conta2 == 1)
            {
                carta11Down();
                volteo1  = 0;
                voltear2 = 0;
                sa2      = 0;
                conta2   = 0;
                mal.Play();
                c_errores++;
            }
            if (conta1 == 1 && conta2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                ca       = 1;
                conta1   = 0;
                conta2   = 0;
                acierto.Play();
                pa1.SetActive(true);
                pa2.SetActive(true);
                c_aciertos++;
            }
            if (contb1 == 1 && contb2 == 0)
            {
                carta8Down();
                volteo1  = 0;
                voltear2 = 0;
                sb1      = 0;
                contb1   = 0;
                mal.Play();
                c_errores++;
            }
            if (contb1 == 0 && contb2 == 1)
            {
                carta9Down();
                volteo1  = 0;
                voltear2 = 0;
                sb2      = 0;
                contb2   = 0;
                mal.Play();
                c_errores++;
            }
            if (contb1 == 1 && contb2 == 1)
            {
                volteo1  = 0;
                voltear2 = 0;
                cb       = 1;
                contb1   = 0;
                contb2   = 0;
                acierto.Play();
                pb1.SetActive(true);
                pb2.SetActive(true);
                c_aciertos++;
            }

            aux = 0;
        }
        if (count == 8)
        {
            count = 0;
            cc    = 0;
            b     = 1;
        }
        if (b == 1)
        {
            if (f == 0 && c_errores != 0)
            {
                c_errores = c_errores / 2;
                f         = 1;
            }

            PlayerPrefs.SetString(tc, t.ToString("f0"));
            PlayerPrefs.SetString(ec, c_errores.ToString());
            PlayerPrefs.SetString(ac, c_aciertos.ToString());
            // Application.LoadLevel("caras3");
        }
    }
コード例 #3
0
        void ReleaseDesignerOutlets()
        {
            if (AdvancedSearchBox != null)
            {
                AdvancedSearchBox.Dispose();
                AdvancedSearchBox = null;
            }

            if (AngebotNr != null)
            {
                AngebotNr.Dispose();
                AngebotNr = null;
            }

            if (ArchiveButton1 != null)
            {
                ArchiveButton1.Dispose();
                ArchiveButton1 = null;
            }

            if (AufWunsch != null)
            {
                AufWunsch.Dispose();
                AufWunsch = null;
            }

            if (AusstattungDo != null)
            {
                AusstattungDo.Dispose();
                AusstattungDo = null;
            }

            if (AusstattungOd != null)
            {
                AusstattungOd.Dispose();
                AusstattungOd = null;
            }

            if (Bezeichnung != null)
            {
                Bezeichnung.Dispose();
                Bezeichnung = null;
            }

            if (Binderabstand != null)
            {
                Binderabstand.Dispose();
                Binderabstand = null;
            }

            if (Binderabstand2 != null)
            {
                Binderabstand2.Dispose();
                Binderabstand2 = null;
            }

            if (BinderabstandCa != null)
            {
                BinderabstandCa.Dispose();
                BinderabstandCa = null;
            }

            if (Breite != null)
            {
                Breite.Dispose();
                Breite = null;
            }

            if (Breite2 != null)
            {
                Breite2.Dispose();
                Breite2 = null;
            }

            if (BreiteCa != null)
            {
                BreiteCa.Dispose();
                BreiteCa = null;
            }

            if (BreiteN != null)
            {
                BreiteN.Dispose();
                BreiteN = null;
            }

            if (Cena1 != null)
            {
                Cena1.Dispose();
                Cena1 = null;
            }

            if (CenaMontaz != null)
            {
                CenaMontaz.Dispose();
                CenaMontaz = null;
            }

            if (ComboBox1 != null)
            {
                ComboBox1.Dispose();
                ComboBox1 = null;
            }

            if (ComboBox2 != null)
            {
                ComboBox2.Dispose();
                ComboBox2 = null;
            }

            if (ComboBox5 != null)
            {
                ComboBox5.Dispose();
                ComboBox5 = null;
            }

            if (ComboBoxRaport != null)
            {
                ComboBoxRaport.Dispose();
                ComboBoxRaport = null;
            }

            if (Dach != null)
            {
                Dach.Dispose();
                Dach = null;
            }

            if (Data != null)
            {
                Data.Dispose();
                Data = null;
            }

            if (DataOferty != null)
            {
                DataOferty.Dispose();
                DataOferty = null;
            }

            if (DataPotwierdzenia != null)
            {
                DataPotwierdzenia.Dispose();
                DataPotwierdzenia = null;
            }

            if (DeleteButton0 != null)
            {
                DeleteButton0.Dispose();
                DeleteButton0 = null;
            }

            if (DeleteButton1 != null)
            {
                DeleteButton1.Dispose();
                DeleteButton1 = null;
            }

            if (DeleteButton2 != null)
            {
                DeleteButton2.Dispose();
                DeleteButton2 = null;
            }

            if (DeleteButton3 != null)
            {
                DeleteButton3.Dispose();
                DeleteButton3 = null;
            }

            if (DeleteButton5 != null)
            {
                DeleteButton5.Dispose();
                DeleteButton5 = null;
            }

            if (Down1 != null)
            {
                Down1.Dispose();
                Down1 = null;
            }

            if (Down2 != null)
            {
                Down2.Dispose();
                Down2 = null;
            }

            if (Down3 != null)
            {
                Down3.Dispose();
                Down3 = null;
            }

            if (Firma != null)
            {
                Firma.Dispose();
                Firma = null;
            }

            if (Firsthohe != null)
            {
                Firsthohe.Dispose();
                Firsthohe = null;
            }

            if (Firsthohe2 != null)
            {
                Firsthohe2.Dispose();
                Firsthohe2 = null;
            }

            if (FirsthoheCa != null)
            {
                FirsthoheCa.Dispose();
                FirsthoheCa = null;
            }

            if (FirsthoheN != null)
            {
                FirsthoheN.Dispose();
                FirsthoheN = null;
            }

            if (Gesamtpreis != null)
            {
                Gesamtpreis.Dispose();
                Gesamtpreis = null;
            }

            if (Gewicht != null)
            {
                Gewicht.Dispose();
                Gewicht = null;
            }

            if (Gewicht2 != null)
            {
                Gewicht2.Dispose();
                Gewicht2 = null;
            }

            if (Hauptprofil1 != null)
            {
                Hauptprofil1.Dispose();
                Hauptprofil1 = null;
            }

            if (Hauptprofil2 != null)
            {
                Hauptprofil2.Dispose();
                Hauptprofil2 = null;
            }

            if (Hauptprofil3 != null)
            {
                Hauptprofil3.Dispose();
                Hauptprofil3 = null;
            }

            if (HauptProfilGewicht != null)
            {
                HauptProfilGewicht.Dispose();
                HauptProfilGewicht = null;
            }

            if (Ilosc1 != null)
            {
                Ilosc1.Dispose();
                Ilosc1 = null;
            }

            if (InfoLabel1 != null)
            {
                InfoLabel1.Dispose();
                InfoLabel1 = null;
            }

            if (Kedernut != null)
            {
                Kedernut.Dispose();
                Kedernut = null;
            }

            if (Komentarz != null)
            {
                Komentarz.Dispose();
                Komentarz = null;
            }

            if (KWert1 != null)
            {
                KWert1.Dispose();
                KWert1 = null;
            }

            if (LabelTest1 != null)
            {
                LabelTest1.Dispose();
                LabelTest1 = null;
            }

            if (LabelTest2 != null)
            {
                LabelTest2.Dispose();
                LabelTest2 = null;
            }

            if (Lange2 != null)
            {
                Lange2.Dispose();
                Lange2 = null;
            }

            if (Lange3 != null)
            {
                Lange3.Dispose();
                Lange3 = null;
            }

            if (LangeCa != null)
            {
                LangeCa.Dispose();
                LangeCa = null;
            }

            if (LangeN != null)
            {
                LangeN.Dispose();
                LangeN = null;
            }

            if (Leichbauhalle != null)
            {
                Leichbauhalle.Dispose();
                Leichbauhalle = null;
            }

            if (Liefertermin != null)
            {
                Liefertermin.Dispose();
                Liefertermin = null;
            }

            if (Lieferungskosten != null)
            {
                Lieferungskosten.Dispose();
                Lieferungskosten = null;
            }

            if (Lieferzeit != null)
            {
                Lieferzeit.Dispose();
                Lieferzeit = null;
            }

            if (ListaOferty != null)
            {
                ListaOferty.Dispose();
                ListaOferty = null;
            }

            if (Mail != null)
            {
                Mail.Dispose();
                Mail = null;
            }

            if (Mail_cena != null)
            {
                Mail_cena.Dispose();
                Mail_cena = null;
            }

            if (Mail_miasto != null)
            {
                Mail_miasto.Dispose();
                Mail_miasto = null;
            }

            if (Mail_mm != null)
            {
                Mail_mm.Dispose();
                Mail_mm = null;
            }

            if (MontageAGB != null)
            {
                MontageAGB.Dispose();
                MontageAGB = null;
            }

            if (MontageBox != null)
            {
                MontageBox.Dispose();
                MontageBox = null;
            }

            if (MontageSwitch != null)
            {
                MontageSwitch.Dispose();
                MontageSwitch = null;
            }

            if (Name != null)
            {
                Name.Dispose();
                Name = null;
            }

            if (NHN != null)
            {
                NHN.Dispose();
                NHN = null;
            }

            if (NrPotwierdzenia != null)
            {
                NrPotwierdzenia.Dispose();
                NrPotwierdzenia = null;
            }

            if (OpenButton1 != null)
            {
                OpenButton1.Dispose();
                OpenButton1 = null;
            }

            if (Plec != null)
            {
                Plec.Dispose();
                Plec = null;
            }

            if (Postlietzahl != null)
            {
                Postlietzahl.Dispose();
                Postlietzahl = null;
            }

            if (PriceText1 != null)
            {
                PriceText1.Dispose();
                PriceText1 = null;
            }

            if (PriceText2 != null)
            {
                PriceText2.Dispose();
                PriceText2 = null;
            }

            if (RaportType != null)
            {
                RaportType.Dispose();
                RaportType = null;
            }

            if (ReadyButton1 != null)
            {
                ReadyButton1.Dispose();
                ReadyButton1 = null;
            }

            if (SaveButton1 != null)
            {
                SaveButton1.Dispose();
                SaveButton1 = null;
            }

            if (Schneelast != null)
            {
                Schneelast.Dispose();
                Schneelast = null;
            }

            if (Schneelast2 != null)
            {
                Schneelast2.Dispose();
                Schneelast2 = null;
            }

            if (SearchCheckBox != null)
            {
                SearchCheckBox.Dispose();
                SearchCheckBox = null;
            }

            if (SearchDlugosc != null)
            {
                SearchDlugosc.Dispose();
                SearchDlugosc = null;
            }

            if (SearchSchneelast != null)
            {
                SearchSchneelast.Dispose();
                SearchSchneelast = null;
            }

            if (SearchSzerokosc != null)
            {
                SearchSzerokosc.Dispose();
                SearchSzerokosc = null;
            }

            if (SearchText != null)
            {
                SearchText.Dispose();
                SearchText = null;
            }

            if (SearchTextField != null)
            {
                SearchTextField.Dispose();
                SearchTextField = null;
            }

            if (SearchTypHali != null)
            {
                SearchTypHali.Dispose();
                SearchTypHali = null;
            }

            if (SearchWindlast != null)
            {
                SearchWindlast.Dispose();
                SearchWindlast = null;
            }

            if (SearchWysokosc != null)
            {
                SearchWysokosc.Dispose();
                SearchWysokosc = null;
            }

            if (Select2 != null)
            {
                Select2.Dispose();
                Select2 = null;
            }

            if (Stadt != null)
            {
                Stadt.Dispose();
                Stadt = null;
            }

            if (Stallhalle != null)
            {
                Stallhalle.Dispose();
                Stallhalle = null;
            }

            if (Starke1 != null)
            {
                Starke1.Dispose();
                Starke1 = null;
            }

            if (Starke2 != null)
            {
                Starke2.Dispose();
                Starke2 = null;
            }

            if (StraBe != null)
            {
                StraBe.Dispose();
                StraBe = null;
            }

            if (Suma1 != null)
            {
                Suma1.Dispose();
                Suma1 = null;
            }

            if (Switch3 != null)
            {
                Switch3.Dispose();
                Switch3 = null;
            }

            if (SwitchTab1 != null)
            {
                SwitchTab1.Dispose();
                SwitchTab1 = null;
            }

            if (Tab0 != null)
            {
                Tab0.Dispose();
                Tab0 = null;
            }

            if (Tab1 != null)
            {
                Tab1.Dispose();
                Tab1 = null;
            }

            if (Tab2 != null)
            {
                Tab2.Dispose();
                Tab2 = null;
            }

            if (Tab3 != null)
            {
                Tab3.Dispose();
                Tab3 = null;
            }

            if (Tab4 != null)
            {
                Tab4.Dispose();
                Tab4 = null;
            }

            if (Tab5 != null)
            {
                Tab5.Dispose();
                Tab5 = null;
            }

            if (Tab6 != null)
            {
                Tab6.Dispose();
                Tab6 = null;
            }

            if (Tab7 != null)
            {
                Tab7.Dispose();
                Tab7 = null;
            }

            if (Tabela1 != null)
            {
                Tabela1.Dispose();
                Tabela1 = null;
            }

            if (Tabela2 != null)
            {
                Tabela2.Dispose();
                Tabela2 = null;
            }

            if (Tabela3 != null)
            {
                Tabela3.Dispose();
                Tabela3 = null;
            }

            if (Tabela5 != null)
            {
                Tabela5.Dispose();
                Tabela5 = null;
            }

            if (TabNavi != null)
            {
                TabNavi.Dispose();
                TabNavi = null;
            }

            if (TechnischeDaten != null)
            {
                TechnischeDaten.Dispose();
                TechnischeDaten = null;
            }

            if (Telefonnummer != null)
            {
                Telefonnummer.Dispose();
                Telefonnummer = null;
            }

            if (ToreUndTuren != null)
            {
                ToreUndTuren.Dispose();
                ToreUndTuren = null;
            }

            if (Traufhohe != null)
            {
                Traufhohe.Dispose();
                Traufhohe = null;
            }

            if (Traufhohe2 != null)
            {
                Traufhohe2.Dispose();
                Traufhohe2 = null;
            }

            if (TraufhoheCa != null)
            {
                TraufhoheCa.Dispose();
                TraufhoheCa = null;
            }

            if (TraufhoheN != null)
            {
                TraufhoheN.Dispose();
                TraufhoheN = null;
            }

            if (Unterlagen != null)
            {
                Unterlagen.Dispose();
                Unterlagen = null;
            }

            if (UnterlagenBox != null)
            {
                UnterlagenBox.Dispose();
                UnterlagenBox = null;
            }

            if (UnterlagenSwitch != null)
            {
                UnterlagenSwitch.Dispose();
                UnterlagenSwitch = null;
            }

            if (Up1 != null)
            {
                Up1.Dispose();
                Up1 = null;
            }

            if (Up2 != null)
            {
                Up2.Dispose();
                Up2 = null;
            }

            if (Up3 != null)
            {
                Up3.Dispose();
                Up3 = null;
            }

            if (UWert1 != null)
            {
                UWert1.Dispose();
                UWert1 = null;
            }

            if (UWert2 != null)
            {
                UWert2.Dispose();
                UWert2 = null;
            }

            if (Vat2 != null)
            {
                Vat2.Dispose();
                Vat2 = null;
            }

            if (Vorname != null)
            {
                Vorname.Dispose();
                Vorname = null;
            }

            if (Windlast != null)
            {
                Windlast.Dispose();
                Windlast = null;
            }

            if (Windlast2 != null)
            {
                Windlast2.Dispose();
                Windlast2 = null;
            }

            if (WypChange1 != null)
            {
                WypChange1.Dispose();
                WypChange1 = null;
            }

            if (WypChange2 != null)
            {
                WypChange2.Dispose();
                WypChange2 = null;
            }

            if (WypChange3 != null)
            {
                WypChange3.Dispose();
                WypChange3 = null;
            }

            if (X1 != null)
            {
                X1.Dispose();
                X1 = null;
            }

            if (Y1 != null)
            {
                Y1.Dispose();
                Y1 = null;
            }

            if (Zugbandhohe != null)
            {
                Zugbandhohe.Dispose();
                Zugbandhohe = null;
            }

            if (Zugbandhohe2 != null)
            {
                Zugbandhohe2.Dispose();
                Zugbandhohe2 = null;
            }

            if (ZugbandhoheCa != null)
            {
                ZugbandhoheCa.Dispose();
                ZugbandhoheCa = null;
            }

            if (SearchList != null)
            {
                SearchList.Dispose();
                SearchList = null;
            }

            if (SearchEmail != null)
            {
                SearchEmail.Dispose();
                SearchEmail = null;
            }
        }
コード例 #4
0
ファイル: voltear.cs プロジェクト: JohanaMedina/TestAlzheimer
    // Update is called once per frame
    void Update()
    {
        aux   = contr1 + contr2 + contp1 + contp2 + conte1 + conte2 + contc1 + contc2;
        count = ce + cc + cp + cr;

        if (t == 1 && !Down1.isPlaying && !Down2.isPlaying && !Down5.isPlaying && !Down4.isPlaying && !Down8.isPlaying)
        {
            tiempo -= Time.deltaTime;
        }
        if (corona1 == 1 && tiempo <= 0 && sc1 == 0)
        {
            Up1.Play();
            contc1 = 1;
            tiempo = 5.0f;
            t      = 0;
            sc1    = 1;
            if (volteo1 == 1)
            {
                volteo2 = 1;
            }
            volteo1 = 1;
        }
        if (rosa1 == 1 && tiempo <= 0 && sr1 == 0)
        {
            Up2.Play();
            contr1 = 1;
            tiempo = 5.0f;
            t      = 0;
            sr1    = 1;
            if (volteo1 == 1)
            {
                volteo2 = 1;
            }
            volteo1 = 1;
        }
        if (corona2 == 1 && tiempo <= 0 && sc2 == 0)
        {
            Up5.Play();
            contc2 = 0;
            tiempo = 5.0f;
            t      = 0;
            sc2    = 1;
            if (volteo1 == 1)
            {
                volteo2 = 1;
            }
            volteo1 = 1;
        }
        if (rosa2 == 1 && tiempo <= 0 && sr2 == 0)
        {
            Up8.Play();
            contr2 = 1;
            tiempo = 5.0f;
            t      = 0;
            sr2    = 1;
            if (volteo1 == 1)
            {
                volteo2 = 1;
            }
            volteo1 = 1;
        }
        if (pera1 == 1 && tiempo <= 0 && sp1 == 0)
        {
            Up4.Play();
            contp1 = 1;
            tiempo = 5.0f;
            t      = 0;
            sp1    = 1;
            if (volteo1 == 1)
            {
                volteo2 = 1;
            }
            volteo1 = 1;
        }
        if (volteo1 == 1 && volteo2 == 1 && aux == 2 && !Up1.isPlaying && !Up2.isPlaying && !Up5.isPlaying && !Up4.isPlaying && !Up8.isPlaying)
        {
            aux = 0;
            if (rosa1 == 1 && rosa2 == 0)
            {
                carta2Down();
                volteo1 = 0;
                volteo2 = 0;
                rosa1   = 0;
                sr1     = 0;
                contr1  = 0;
            }
            if (rosa1 == 0 && rosa2 == 1)
            {
                carta8Down();
                volteo1 = 0;
                volteo2 = 0;
                rosa2   = 0;
                sr2     = 0;
                contr2  = 0;
            }
            if (pera1 == 1 && pera2 == 0)
            {
                carta4Down();
                volteo1 = 0;
                volteo2 = 0;
                pera1   = 0;
                sp1     = 0;
                contp1  = 0;
            }

            if (corona1 == 1 && corona2 == 0)
            {
                carta1Down();
                volteo1 = 0;
                volteo2 = 0;
                corona1 = 0;
                sc1     = 0;
                contc1  = 0;
            }
            if (corona1 == 0 && corona2 == 1)
            {
                carta5Down();
                volteo1 = 0;
                volteo2 = 0;
                corona2 = 0;
                sc2     = 0;
                contc2  = 0;
            }

            if (rosa1 == 1 && rosa2 == 1)
            {
                volteo1 = 0;
                volteo2 = 0;
                cr      = 1;
                contr1  = 0;
                contr2  = 0;
            }

            if (corona1 == 1 && corona2 == 1)
            {
                volteo1 = 0;
                volteo2 = 0;
                cc      = 1;
                contc1  = 0;
                contc2  = 0;
            }
        }
    }