Exemple #1
0
 void PlayAnimation()
 {
     Da.SetActive(true); Db.SetActive(true); Dc.SetActive(true); Dd.SetActive(true); De.SetActive(true);
     Hand.SetActive(true);
     PlayTime = Time.time;
     MovieOn  = true;
 }
Exemple #2
0
        public void Reset(Control host)
        {
            H1.Reset(host);
            H2.Reset(host);
            H3.Reset(host);
            H4.Reset(host);
            H5.Reset(host);
            H6.Reset(host);
            BlockQuote.Reset(host);
            P.Reset(host);
            FigCaption.Reset(host);
            Pre.Reset(host);
            Dt.Reset(host);
            Dd.Reset(host);

            Li.Reset(host);

            A.Reset(host);
            Span.Reset(host);
            Label.Reset(host);
            Q.Reset(host);
            Cite.Reset(host);
            I.Reset(host);
            Em.Reset(host);
            Mark.Reset(host);
            Time.Reset(host);
            Code.Reset(host);
            Strong.Reset(host);
        }
Exemple #3
0
        public void Merge(params DocumentStyle[] styles)
        {
            if (styles != null)
            {
                foreach (var style in styles)
                {
                    Section.Merge(style.Section);
                    Article.Merge(style.Article);
                    Header.Merge(style.Header);
                    Footer.Merge(style.Footer);
                    Main.Merge(style.Main);
                    Figure.Merge(style.Figure);
                    Details.Merge(style.Details);
                    Summary.Merge(style.Summary);
                    Div.Merge(style.Div);
                    Ul.Merge(style.Ul);
                    Ol.Merge(style.Ol);
                    Dl.Merge(style.Dl);
                    Td.Merge(style.Td);

                    Table.Merge(style.Table);

                    Img.Merge(style.Img);
                    YouTube.Merge(style.YouTube);
                    Channel9.Merge(style.Channel9);

                    H1.Merge(style.H1);
                    H2.Merge(style.H2);
                    H3.Merge(style.H3);
                    H4.Merge(style.H4);
                    H5.Merge(style.H5);
                    H6.Merge(style.H6);
                    BlockQuote.Merge(style.BlockQuote);
                    P.Merge(style.P);
                    FigCaption.Merge(style.FigCaption);
                    Pre.Merge(style.Pre);
                    Dt.Merge(style.Dt);
                    Dd.Merge(style.Dd);

                    Li.Merge(style.Li);

                    A.Merge(style.A);
                    Span.Merge(style.Span);
                    Label.Merge(style.Label);
                    Q.Merge(style.Q);
                    Cite.Merge(style.Cite);
                    I.Merge(style.I);
                    Em.Merge(style.Em);
                    Mark.Merge(style.Mark);
                    Time.Merge(style.Time);
                    Code.Merge(style.Code);
                    Strong.Merge(style.Strong);
                }
            }
        }
Exemple #4
0
        private MCoordsDd GetMCoords(Coords coords)
        {
            Dd startX = new Dd(coords.StartX);
            Dd endX   = new Dd(coords.EndX);
            Dd startY = new Dd(coords.StartY);
            Dd endY   = new Dd(coords.EndY);

            PointDd start = new PointDd(startX, startY);
            PointDd end   = new PointDd(endX, endY);

            MCoordsDd result = new MCoordsDd(start, end);

            return(result);
        }
Exemple #5
0
        static void Main(string[] args)
        {
            DdFractalFunctions ddFractalFunctions = new DdFractalFunctions();

            //Dd ddRealVal = ddFractalFunctions.add(1.1, 2.2);
            //double hi = ddRealVal.hi;

            Dd a = ddFractalFunctions.parse("1.01234567890123456789012345674337250E-5");

            string digits = ddFractalFunctions.getDigits(a);

            Console.WriteLine($"A = {digits}; Hi = {a.hi}; Lo = {a.lo}.");
            //Dd[] samplePoints = ddFractalFunctions.getSamplePoints(ddRealVal, ddRealVal, 100);

            Console.WriteLine("Ran to end.");
        }
Exemple #6
0
        public void TestMethod1()
        {
            DdFractalFunctions ddFractalFunctions = new DdFractalFunctions();

            UInt32 mre = ddFractalFunctions.testMulDiv22();

            System.Diagnostics.Debug.WriteLine($"Mre = {mre}.");

            Dd     ddRealVal = ddFractalFunctions.add(1.1, 2.2);
            double hi        = ddRealVal.hi;

            Dd a = ddFractalFunctions.parse("1.01234567890123456789012345674337250E-5");

            string digits = ddFractalFunctions.getDigits(a);

            System.Diagnostics.Debug.WriteLine($"A = {digits}; Hi = {a.hi}; Lo = {a.lo}.");

            Dd[] samplePoints = ddFractalFunctions.getSamplePoints(ddRealVal, ddRealVal, 100);
        }
Exemple #7
0
 public Bb(Dd d)
 {
     D = d;
 }
Exemple #8
0
 public Aa(Dd d)
 {
     D = d;
 }
        static void Main(string[] args)
        {
            string A, B, C, D, E, F, G, H;
            string Aa, Bb, Cc, Dd, Ee, Ff, Gg, Hh, Ii, Jj, Kk, Ll, Mm, Nn, Oo;

            String[] ArrStr = new String[7];

            A = "Rizky Khapidsyah";
            B = "Nama Saya : ";
            C = A.Insert(0, B);
            D = " itu siapa?";
            E = A.Insert(16, D);
            F = "Ini Adalah: ";
            G = "Hari Rabu";
            H = G.Replace("Rabu", "Jum'at");

            ArrStr[0] = "Senin";
            ArrStr[1] = "Selasa";
            ArrStr[2] = "Rabu";
            ArrStr[3] = "Kamis";
            ArrStr[4] = "Jum'at";
            ArrStr[5] = "Sabtu";
            ArrStr[6] = "Minggu";

            /* Saya Sengaja tidak menggunakan variabel array untuk bagian ini (Aa, Bb, Cc dst..), agar kebih mudah dipahami.
             * Namun lebih disarankan menggunakan array dan statement for jika bekerja di lingkungan komersil
             */

            Aa = ", ";
            Bb = ".";
            Cc = Bb.Insert(0, ArrStr[6]);
            Dd = Cc.Insert(0, Aa);
            Ee = Dd.Insert(0, ArrStr[5]);
            Ff = Ee.Insert(0, Aa);
            Gg = Ff.Insert(0, ArrStr[4]);
            Hh = Gg.Insert(0, Aa);
            Ii = Hh.Insert(0, ArrStr[3]);
            Jj = Ii.Insert(0, Aa);
            Kk = Jj.Insert(0, ArrStr[2]);
            Ll = Kk.Insert(0, Aa);
            Mm = Ll.Insert(0, ArrStr[1]);
            Nn = Mm.Insert(0, Aa);
            Oo = Nn.Insert(0, ArrStr[0]);

            Console.WriteLine(A);
            Console.WriteLine(A.Length);
            Console.WriteLine(A.IndexOf('p'));
            Console.WriteLine(A[9]);
            Console.WriteLine(C);
            Console.WriteLine(E);
            Console.WriteLine(Oo);
            Console.WriteLine(F, G);
            Console.WriteLine(H);

            if (!H.Contains("Kamis"))
            {
                Console.WriteLine("Tidak Ditemukan Hari: Kamis");
            }
            else
            {
                Console.WriteLine("Ditemukan Hari: Kamis");
            }

            H = H.Remove(2);
            Console.WriteLine(H);

            Console.ReadLine();
        }
Exemple #10
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
    }
Exemple #11
0
    // Update is called once per frame
    void Update()
    {
        //SHOW MOVE
        if (MovieOn)
        {
            //  print(Math.Round(Time.time - PlayTime, 1));
            if (Math.Round(Time.time - PlayTime, 1) == 1.2)
            {
                showPicture('A');
                print("inshowA");
            }
            if (Math.Round(Time.time - PlayTime, 1) == 3.3)
            {
                showPicture('D');
                print("inshowD");
            }
        }

        if ((Time.time - KKKEEP) > 1.0f && tempkeep)
        {
            showcount   = 0;
            playercount = 0;
            cantouch    = false;
            tempkeep    = false;
        }

        //SHOW WIN
        if (KK && counti < WINNUM && counti >= 0)
        {
            WIN[counti].SetActive(true);
            Text.text = "counti" + counti;
        }
        else if (counti == WINNUM)
        {
            SceneManager.LoadScene("G2End", LoadSceneMode.Single);
        }

        #region if cantouch
        if (cantouch)
        {
            if (currentlevel == 0)
            {
                if (!nowplaying)
                {
                    PlayAnimation();
                    winwintime = Time.time;
                    nowplaying = true;
                }

                else if (Time.time - winwintime > 4.8 && currentlevel == 0)
                {
                    Da.SetActive(false); Db.SetActive(false); Dc.SetActive(false); Dd.SetActive(false); De.SetActive(false);
                    Hand.SetActive(false);
                    currentlevel++;
                    showcount   = 0;
                    cantouch    = false;
                    playercount = 0;
                    Last        = 'F';
                }
            }

            else
            {
                //	print("level up!");

                if ((A && Last != 'A') || Input.GetKeyDown(KeyCode.A))
                {
                    Last = 'A';
                    PlayLightBall(1);
                }
                else if ((B && Last != 'B') || Input.GetKeyDown(KeyCode.B))
                {
                    Last = 'B';
                    PlayLightBall(2);
                }
                else if ((C && Last != 'C') || Input.GetKeyDown(KeyCode.C))
                {
                    Last = 'C';
                    PlayLightBall(3);
                }

                else if ((D && Last != 'D') || Input.GetKeyDown(KeyCode.D))
                {
                    Last = 'D';
                    PlayLightBall(4);
                }

                else if ((E && Last != 'E') || Input.GetKeyDown(KeyCode.E))
                {
                    Last = 'E';
                    PlayLightBall(5);
                }

                //else if (!A && !B && !C && !D && !E)
                //{
                //    showPicture('N');
                //}
            }

            // print(Last);

            //實際測試要記得打開,要記得調Timer設定
        }
        #endregion
    }