Ejemplo n.º 1
0
 void showWinPicture()
 {
     Text.text = "you win";
     Pnon.SetActive(false);
     Pa.SetActive(false);
     Pb.SetActive(false);
     Pc.SetActive(false);
     Pd.SetActive(false);
     Pe.SetActive(false);
     Pwin.SetActive(false);
     KK = ShowPic(WINNUM + 1, WIN);
 }
Ejemplo n.º 2
0
    void showPicture(char WH)
    {
        switch (WH)
        {
        case 'S':
            Text.text = "you're in next LEVEL";
            Pnon.SetActive(false);
            Pwrong.SetActive(false);
            Pa.SetActive(false);
            Pb.SetActive(false);
            Pc.SetActive(false);
            Pd.SetActive(false);
            Pe.SetActive(false);
            Pwin.SetActive(false);
            Pnext.SetActive(true);
            Pnext1.SetActive(true);
            NEXTL.SetActive(false);
            break;

        case 'A':
            Text.text = "A" + "X " + positionX + "Y " + positionY + "Z " + positionZ;
            Pnon.SetActive(false);
            Pwrong.SetActive(false);
            Pa.SetActive(true);
            Pb.SetActive(false);
            Pc.SetActive(false);
            Pd.SetActive(false);
            Pe.SetActive(false);
            Pwin.SetActive(false);
            Pnext.SetActive(false);
            Pnext1.SetActive(false);
            NEXTL.SetActive(false);
            break;

        case 'B':
            Text.text = "B" + "X " + positionX + "Y " + positionY + "Z " + positionZ;
            Pnon.SetActive(false);
            Pwrong.SetActive(false);
            Pa.SetActive(false);
            Pb.SetActive(true);
            Pc.SetActive(false);
            Pd.SetActive(false);
            Pe.SetActive(false);
            Pwin.SetActive(false);
            Pnext.SetActive(false);
            Pnext1.SetActive(false);
            NEXTL.SetActive(false);
            break;

        case 'C':
            Text.text = "C" + "X " + positionX + "Y " + positionY + "Z " + positionZ;
            Pnon.SetActive(false);
            Pwrong.SetActive(false);
            Pa.SetActive(false);
            Pb.SetActive(false);
            Pc.SetActive(true);
            Pd.SetActive(false);
            Pe.SetActive(false);
            Pwin.SetActive(false);
            Pnext.SetActive(false);
            Pnext1.SetActive(false);
            NEXTL.SetActive(false);
            break;

        case 'D':
            Text.text = "D" + "X " + positionX + "Y " + positionY + "Z " + positionZ;
            Pnon.SetActive(false);
            Pwrong.SetActive(false);
            Pa.SetActive(false);
            Pb.SetActive(false);
            Pc.SetActive(false);
            Pd.SetActive(true);
            Pe.SetActive(false);
            Pwin.SetActive(false);
            Pnext.SetActive(false);
            Pnext1.SetActive(false);
            NEXTL.SetActive(false);
            break;

        case 'E':
            Text.text = "E" + "X " + positionX + "Y " + positionY + "Z " + positionZ;
            Pnon.SetActive(false);
            Pwrong.SetActive(false);
            Pa.SetActive(false);
            Pb.SetActive(false);
            Pc.SetActive(false);
            Pd.SetActive(false);
            Pe.SetActive(true);
            Pwin.SetActive(false);
            Pnext.SetActive(false);
            Pnext1.SetActive(false);
            NEXTL.SetActive(false);
            break;

        case 'N':
            Text.text = "NON" + "X " + positionX + "Y " + positionY + "Z " + positionZ;
            Pnon.SetActive(true);
            Pwrong.SetActive(false);
            Pa.SetActive(false);
            Pb.SetActive(false);
            Pc.SetActive(false);
            Pd.SetActive(false);
            Pe.SetActive(false);
            Pwin.SetActive(false);
            Pnext.SetActive(false);
            Pnext1.SetActive(false);
            NEXTL.SetActive(false);
            break;

        case 'W':
            Pnon.SetActive(false);
            Pwrong.SetActive(true);
            Pa.SetActive(false);
            Pb.SetActive(false);
            Pc.SetActive(false);
            Pd.SetActive(false);
            Pe.SetActive(false);
            Pwin.SetActive(false);
            Pnext.SetActive(false);
            Pnext1.SetActive(false);
            NEXTL.SetActive(false);
            //KKKEEP = false;
            break;
        }
    }
Ejemplo n.º 3
0
    //int frameRate = 250;

    // Use this for initialization
    void Start()
    {
        //  Time.captureFramerate = frameRate;

        Time.fixedDeltaTime = 1.0f;
        Pa.SetActive(false);
        Pb.SetActive(false);
        Pc.SetActive(false);
        Pd.SetActive(false);
        Pe.SetActive(false);
        Pwin.SetActive(false);
        Pnon.SetActive(true);
        Pwrong.SetActive(false);
        Pnext.SetActive(false);
        Pnext1.SetActive(false);
        NEXTL.SetActive(false);

        animatorhand = Hand.GetComponent <Animator>();
        //print(animatorhand.GetInstanceID ());

        La.SetActive(false); Ld.SetActive(false);
        Da.SetActive(false); Db.SetActive(false); Dc.SetActive(false); Dd.SetActive(false); De.SetActive(false); Hand.SetActive(false);
        whichF       = 0;
        nowKeep      = 0;
        showcount    = 0;
        playercount  = 0;
        currentlevel = 0;

        Last       = 'F';
        nowplaying = false;

        int temptnum;

        #region random
        System.Random randNum = new System.Random();


        for (int i = 0; i < flowerlight_L0.Length;)
        {
            temptnum = randNum.Next(Min, Max);
            if (i == 0)
            {
                flowerlight_L0[i] = 0;
                i++;
            }

            else if (i == 1)
            {
                flowerlight_L0[i] = 1;
                i++;
            }

            else if (i == 2)
            {
                flowerlight_L0[i] = 4;
                i++;
            }
        }

        for (int i = 0; i < flowerlight_L1.Length;)
        {
            temptnum = randNum.Next(Min, Max);
            if (i == 0)
            {
                flowerlight_L1[i] = 0;
                i++;
            }

            else if (temptnum != flowerlight_L1[i - 1])
            {
                flowerlight_L1[i] = temptnum;
                i++;
            }
        }

        for (int i = 0; i < flowerlight_L2.Length;)
        {
            temptnum = randNum.Next(Min, Max);
            if (i == 0)
            {
                flowerlight_L2[i] = 0;
                i++;
            }

            else if (temptnum != flowerlight_L2[i - 1])
            {
                flowerlight_L2[i] = temptnum;
                i++;
            }
        }

        for (int i = 0; i < flowerlight_L3.Length;)
        {
            temptnum = randNum.Next(Min, Max);
            if (i == 0)
            {
                flowerlight_L3[i] = 0;
                i++;
            }

            else if (temptnum != flowerlight_L3[i - 1])
            {
                flowerlight_L3[i] = temptnum;
                i++;
            }
        }
        #endregion
        cantouch = false;
        tempkeep = false;

        #region show WIN
        for (int i = 0; i < WINNUM; i++)
        {
            WIN[i].SetActive(false);
        }
        KK = false;
        #endregion
    }