Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (_line[12].gameObject == false)
     {
         GameObject.Find("Canvas").transform.Find("Panel").gameObject.SetActive(true);
         Count2.stop();
     }
 }
Exemplo n.º 2
0
 void Start()
 {
     panelcon   = GameObject.FindGameObjectWithTag("PCon");
     countcon   = GameObject.FindGameObjectWithTag("Count");
     FlagChange = panelcon.GetComponent <PanelController2> ();
     FlagChange.InitFlag();
     FlagChange.SetPanelFlag();
     decrese = countcon.GetComponent <Count2> ();
 }
Exemplo n.º 3
0
 void OnTriggerEnter2D(Collider2D other)
 //rigidBody가 무언가와 충돌할때 호출되는 함수 입니다.
 //Collider2D other로 부딪힌 객체를 받아옵니다.
 {
     if (other.CompareTag("remover"))
     {
         Count2.count();
         Destroy(_blusher.gameObject);
         Destroy(other.gameObject);
     }
 }
Exemplo n.º 4
0
 void OnTriggerEnter2D(Collider2D other)
 //rigidBody가 무언가와 충돌할때 호출되는 함수 입니다.
 //Collider2D other로 부딪힌 객체를 받아옵니다.
 {
     if (other.CompareTag("nametag"))
     {
         Count2.count();
         _nametag.transform.position = new Vector3(-2.14f, -2.48f, -4f);
         Destroy(other.gameObject);
     }
 }
Exemplo n.º 5
0
 void OnTriggerEnter2D(Collider2D other)
 //rigidBody가 무언가와 충돌할때 호출되는 함수 입니다.
 //Collider2D other로 부딪힌 객체를 받아옵니다.
 {
     if (other.CompareTag("socks"))
     {
         Count2.count();
         _sock.transform.position = new Vector3(-2.67f, -6.06f, -2f);
         Destroy(this.gameObject);
         Destroy(other.gameObject);
     }
 }
Exemplo n.º 6
0
 void OnTriggerEnter2D(Collider2D other)
 //rigidBody가 무언가와 충돌할때 호출되는 함수 입니다.
 //Collider2D other로 부딪힌 객체를 받아옵니다.
 {
     if (other.CompareTag("uniformshirt"))
     {
         Count2.count();
         _uniformshirt.transform.position = this.transform.position;
         Destroy(this.gameObject);
         Destroy(other.gameObject);
     }
 }
Exemplo n.º 7
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            unchecked {
                hashCode += 1000000007 * Type.GetHashCode();
                hashCode += 1000000009 * Class.GetHashCode();
                hashCode += 1000000021 * Slot.GetHashCode();
                hashCode += 1000000033 * BreakRate.GetHashCode();
                hashCode += 1000000087 * Gender.GetHashCode();
                hashCode += 1000000093 * FreeHands.GetHashCode();
                hashCode += 1000000097 * LifePointsBonus.GetHashCode();
                hashCode += 1000000103 * SpellPointsBonus.GetHashCode();
                hashCode += 1000000123 * AttributeType.GetHashCode();
                hashCode += 1000000181 * AttributeBonus.GetHashCode();
                hashCode += 1000000207 * SkillTypeBonus.GetHashCode();
                hashCode += 1000000223 * SkillBonus.GetHashCode();
                hashCode += 1000000241 * PhysicalDamageProtection.GetHashCode();
                hashCode += 1000000271 * PhysicalDamageCaused.GetHashCode();
                hashCode += 1000000289 * AmmunitionType.GetHashCode();
                hashCode += 1000000297 * SkillType1Tax.GetHashCode();
                hashCode += 1000000321 * SkillType2Tax.GetHashCode();
                hashCode += 1000000349 * Skill1Tax.GetHashCode();
                hashCode += 1000000363 * Skill2Tax.GetHashCode();
                hashCode += 1000000403 * TorchIntensity.GetHashCode();
                hashCode += 1000000409 * AmmoAnimation.GetHashCode();
                hashCode += 1000000411 * Spell.GetHashCode();
                hashCode += 1000000427 * SpellID.GetHashCode();
                hashCode += 1000000433 * Charges.GetHashCode();
                hashCode += 1000000439 * NumRecharged.GetHashCode();
                hashCode += 1000000447 * MaxNumRecharged.GetHashCode();
                hashCode += 1000000453 * MaxCharges.GetHashCode();
                hashCode += 1000000459 * Count1.GetHashCode();
                hashCode += 1000000483 * Count2.GetHashCode();
                hashCode += 1000000513 * IconAnim.GetHashCode();
                hashCode += 1000000531 * Weight.GetHashCode();
                hashCode += 1000000579 * Value.GetHashCode();
                hashCode += 1000000007 * Icon.GetHashCode();
                hashCode += 1000000009 * UsingClass.GetHashCode();
                hashCode += 1000000021 * UsingRace.GetHashCode();
            }
            return(hashCode);
        }
Exemplo n.º 8
0
        public void InitializeGetCountData()
        {
            GetCountData();

            //주차가능한 자리 수
            label1.Text = Count1.ToString(); label2.Text = Count2.ToString();
            label3.Text = Count3.ToString(); label4.Text = Count4.ToString();
            label5.Text = Count5.ToString();

            label16.Text = Count11.ToString();
            label17.Text = Count12.ToString(); label18.Text = Count13.ToString();
            label19.Text = Count14.ToString(); label20.Text = Count15.ToString();


            //주차되어진 자리 수
            label6.Text  = Count6.ToString(); label7.Text = Count7.ToString();
            label8.Text  = Count8.ToString(); label9.Text = Count9.ToString();
            label10.Text = Count10.ToString();

            label21.Text = Count16.ToString();
            label22.Text = Count17.ToString(); label23.Text = Count18.ToString();
            label24.Text = Count19.ToString(); label25.Text = Count20.ToString();

            //총 주차면 수
            label11.Text = Total1.ToString(); label12.Text = Total2.ToString();
            label13.Text = Total3.ToString(); label14.Text = Total4.ToString();
            label15.Text = Total5.ToString();

            label26.Text = Total6.ToString();
            label27.Text = Total7.ToString(); label28.Text = Total8.ToString();
            label29.Text = Total9.ToString(); label30.Text = Total10.ToString();


            //지우지 말 것
            Count1  = 0; Count2 = 0; Count3 = 0; Count4 = 0; Count5 = 0;
            Count6  = 0; Count7 = 0; Count8 = 0; Count9 = 0; Count10 = 0;
            Count11 = 0; Count12 = 0; Count13 = 0; Count14 = 0; Count15 = 0;
            Count16 = 0; Count17 = 0; Count18 = 0; Count19 = 0; Count20 = 0;

            Total1 = 0; Total2 = 0; Total3 = 0; Total4 = 0; Total5 = 0;
            Total6 = 0; Total7 = 0; Total8 = 0; Total9 = 0; Total10 = 0;
        }
Exemplo n.º 9
0
 public override string ToString()
 {
     return("Array_byte: " + PointerDataIndex.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")");
 }
Exemplo n.º 10
0
 public override string ToString()
 {
     return("CharPointer: " + Pointer.ToString() + " (" + Count1.ToString() + "/" + Count2.ToString() + ")");
 }
Exemplo n.º 11
0
        private void Timer_Tick(object sender, EventArgs e)
        {
            if (Running == true)
            {
                //Lauf ist wurde beendet
                if (Run == "stopped")
                {
                    Run = "inactiv";

                    Console.WriteLine("Run had been finished");
                    log.Items.Insert(0, "Lauf beendet");
                    logTime.Items.Insert(0, "--:--");
                    logTime2.Items.Insert(0, "---");

                    Console.WriteLine("==========================");
                    log.Items.Insert(0, "=====================");
                    logTime.Items.Insert(0, "==:==");
                    logTime2.Items.Insert(0, "===");

                    //Abfrage von streamdata.php
                    WebClient wc         = new WebClient();
                    string    livetiming = wc.DownloadString("http://erzgebirgsschwimmcup.de/Livetiming/streamdata.php");
                    Console.WriteLine(livetiming);

                    //streamdata auswerten
                    string[] words         = livetiming.Split('?');
                    string   lane          = "0";
                    string   lane_1_meters = "0";
                    string   lane_2_meters = "0";
                    string   lane_3_meters = "0";
                    string   lane_4_meters = "0";
                    string   lane_1_time   = "0";
                    string   lane_2_time   = "0";
                    string   lane_3_time   = "0";
                    string   lane_4_time   = "0";
                    foreach (string word in words)
                    {
                        string[] words2 = word.Split('#');
                        foreach (string word2 in words2)
                        {
                            if (word2 == "1")
                            {
                                lane = "1";
                            }
                            if (word2 == "2")
                            {
                                lane = "2";
                            }
                            if (word2 == "3")
                            {
                                lane = "3";
                            }
                            if (word2 == "4")
                            {
                                lane = "4";
                            }
                            if (word2 == "50" || word2 == "100" || word2 == "200")
                            {
                                if (lane == "1")
                                {
                                    lane_1_meters = word2;
                                }
                                if (lane == "2")
                                {
                                    lane_2_meters = word2;
                                }
                                if (lane == "3")
                                {
                                    lane_3_meters = word2;
                                }
                                if (lane == "4")
                                {
                                    lane_4_meters = word2;
                                }
                            }

                            if (lane != "0" || word2 != "1" || word2 != "2" || word2 != "3" || word2 != "4" || word2 != "50" || word2 != "100" || word2 != "200")
                            {
                                if (lane == "1")
                                {
                                    lane_1_time = word2;
                                }
                                if (lane == "2")
                                {
                                    lane_2_time = word2;
                                }
                                if (lane == "3")
                                {
                                    lane_3_time = word2;
                                }
                                if (lane == "4")
                                {
                                    lane_4_time = word2;
                                }
                            }
                        }
                    }

                    Console.WriteLine("=====================");
                    Console.WriteLine("Run before:");
                    Console.WriteLine("=====================");
                    Console.WriteLine("Lane 1:");
                    Console.WriteLine("Meters: " + lane_1_meters);
                    Console.WriteLine("Time:   " + lane_1_time);
                    Console.WriteLine("=====================");
                    Console.WriteLine("Lane 2:");
                    Console.WriteLine("Meters: " + lane_2_meters);
                    Console.WriteLine("Time:   " + lane_2_time);
                    Console.WriteLine("=====================");
                    Console.WriteLine("Lane 3:");
                    Console.WriteLine("Meters: " + lane_3_meters);
                    Console.WriteLine("Time:   " + lane_3_time);
                    Console.WriteLine("=====================");
                    Console.WriteLine("Lane 4:");
                    Console.WriteLine("Meters: " + lane_4_meters);
                    Console.WriteLine("Time:   " + lane_4_time);
                    Console.WriteLine("=====================");

                    //streamdata auswerten
                    string[] words3 = livetiming.Split('#');
                    Wk_l   = "0";
                    Meters = "0";
                    int forcount = 0;
                    foreach (string word3 in words3)
                    {
                        forcount++;
                        if (forcount == 1)
                        {
                            Wk_l = word3;
                        }
                        if (forcount == 2)
                        {
                            int      forcount2 = 0;
                            string[] words4    = word3.Split('m');
                            foreach (string word4 in words4)
                            {
                                forcount2++;
                                if (forcount2 == 1)
                                {
                                    Meters = word4;
                                }
                            }
                        }
                    }

                    Console.WriteLine("");
                    Console.WriteLine("WK:      " + Wk_l);
                    Console.WriteLine("Strecke: " + Meters + "m");
                    Console.WriteLine("");
                    Console.WriteLine("=====================");

                    //Zeiten mit richtigen Metern in Array
                    string StrRuntimes = "";

                    if (lane_1_meters == Meters)
                    {
                        StrRuntimes = StrRuntimes + "#" + lane_1_time;
                        Console.WriteLine(StrRuntimes);
                    }

                    if (lane_2_meters == Meters)
                    {
                        StrRuntimes = StrRuntimes + "#" + lane_2_time;
                        Console.WriteLine(StrRuntimes);
                    }

                    if (lane_3_meters == Meters)
                    {
                        StrRuntimes = StrRuntimes + "#" + lane_3_time;
                        Console.WriteLine(StrRuntimes);
                    }

                    if (lane_4_meters == Meters)
                    {
                        StrRuntimes = StrRuntimes + "#" + lane_4_time;
                        Console.WriteLine(StrRuntimes);
                    }

                    string[] Runtimes = StrRuntimes.Split('#');

                    int TimeFast = 10000000;

                    foreach (string Time in Runtimes)
                    {
                        if (!String.IsNullOrEmpty(Time))
                        {
                            Console.WriteLine("Zeit:");
                            Console.WriteLine(Time);

                            //Sekunden berechnen
                            string Time_min_str = Time.Substring(0, 2);
                            string Time_sek_str = Time.Substring(3, 2);

                            int Time_min = Int32.Parse(Time_min_str);
                            int Time_sek = Int32.Parse(Time_sek_str);

                            if (Time_min == 1)
                            {
                                Time_sek = Time_sek + 60;
                            }

                            if (Time_min == 02)
                            {
                                Time_sek = Time_sek + 120;
                            }

                            if (Time_min == 03)
                            {
                                Time_sek = Time_sek + 180;
                            }

                            if (Time_sek <= TimeFast)
                            {
                                TimeFast = Time_sek;
                            }
                        }
                    }

                    Run_sek = TimeFast;
                }
                //während keinem Lauf
                if (Run == "inactiv")
                {
                    //Abfrage, ob Lauf wieder gestartet
                    WebClient wc2         = new WebClient();
                    string    livetimingD = wc2.DownloadString("http://erzgebirgsschwimmcup.de/Livetiming/livetime2.php");
                    if (livetimingD.Contains("Bahn"))
                    {
                        Run = "started";
                    }
                }

                //wenn Lauf gestartet:
                if (Run == "started")
                {
                    Run = "activ";
                    //Abfrage welche Strecke geschwommen wird
                    WebClient wc3         = new WebClient();
                    string    livetimingD = wc3.DownloadString("http://erzgebirgsschwimmcup.de/Livetiming/streamdata.php");
                    Console.WriteLine(livetimingD);
                    Console.WriteLine("Run has been started!");
                    Console.WriteLine("");

                    log.Items.Insert(0, "Lauf wurde gestartet");
                    logTime.Items.Insert(0, "00:00");
                    logTime2.Items.Insert(0, "0");

                    //Werte aktueller Lauf
                    string distance = Meters;

                    //Szenenwechsel berechnen

                    //für 50m Stecken
                    if (distance == "50")
                    {
                        T1         = Math.Round(Run_sek * 0.3);
                        T2         = Math.Round(Run_sek * 0.7);
                        Time1.Text = T1.ToString();
                        Time2.Text = T2.ToString();
                        Time3.Text = " ";
                        Time4.Text = " ";
                        Time5.Text = " ";
                        Time6.Text = " ";
                        Time7.Text = " ";
                        Time8.Text = " ";
                    }
                    if (distance == "100")
                    {
                        T1         = Math.Round(Run_sek * 0.15);
                        T2         = Math.Round(Run_sek * 0.35);
                        T3         = Math.Round(Run_sek * 0.65);
                        T4         = Math.Round(Run_sek * 0.85);
                        Time1.Text = T1.ToString();
                        Time2.Text = T2.ToString();
                        Time3.Text = T3.ToString();
                        Time4.Text = T4.ToString();
                        Time5.Text = " ";
                        Time6.Text = " ";
                        Time7.Text = " ";
                        Time8.Text = " ";
                    }
                    if (distance == "200")
                    {
                        T1         = Math.Round(Run_sek * 0.075);
                        T2         = Math.Round(Run_sek * 0.175);
                        T3         = Math.Round(Run_sek * 0.325);
                        T4         = Math.Round(Run_sek * 0.425);
                        T5         = Math.Round(Run_sek * 0.575);
                        T6         = Math.Round(Run_sek * 0.675);
                        T7         = Math.Round(Run_sek * 0.825);
                        T8         = Math.Round(Run_sek * 0.925);
                        Time1.Text = T1.ToString();
                        Time2.Text = T2.ToString();
                        Time3.Text = T3.ToString();
                        Time4.Text = T4.ToString();
                        Time5.Text = T5.ToString();
                        Time6.Text = T6.ToString();
                        Time7.Text = T7.ToString();
                        Time8.Text = T8.ToString();
                    }


                    Console.WriteLine(Run_sek);
                    log.Items.Insert(0, "Sekunden: " + Run_sek);
                    logTime.Items.Insert(0, "00:00");
                    logTime2.Items.Insert(0, "0");

                    progressBar.Maximum = Run_sek;

                    TimeCount  = 0;
                    Count      = 0;
                    Count2     = 0;
                    clock.Text = "00:00";

                    //Auslesen streamdata.php für WK
                    WebClient wc         = new WebClient();
                    string    livetiming = wc.DownloadString("http://erzgebirgsschwimmcup.de/Livetiming/streamdata.php");

                    //WK ermitteln
                    string[] words3 = livetiming.Split('#');
                    Wk_c   = "0";
                    Meters = "0";
                    int forcount = 0;
                    foreach (string word3 in words3)
                    {
                        forcount++;
                        if (forcount == 1)
                        {
                            Wk_c = word3;
                        }

                        if (forcount == 2)
                        {
                            int      forcount2 = 0;
                            string[] words4    = word3.Split('m');
                            foreach (string word4 in words4)
                            {
                                forcount2++;
                                if (forcount2 == 1)
                                {
                                    Meters_c = word4;
                                }
                            }
                        }
                    }
                    Console.WriteLine("WK:      " + Wk_c);
                    Console.WriteLine("WK (l):  " + Wk_l);

                    WkBox.Text = Wk_c;

                    DistanceBox.Text = Meters_c + "m";
                }

                //während des Laufes:
                if (Run == "activ")
                {
                    //timer hochzählen
                    TimeCount = TimeCount + 1;
                    Console.WriteLine(TimeCount);
                    Count = Count + 1;
                    string display;
                    string display2;
                    if (Count >= 60)
                    {
                        Count = 0;
                        Count2++;
                    }

                    if (Count < 10)
                    {
                        display = "0" + Count.ToString();
                    }
                    else
                    {
                        display = Count.ToString();
                    }

                    if (Count2 < 10)
                    {
                        display2 = "0" + Count2.ToString();
                    }
                    else
                    {
                        display2 = Count2.ToString();
                    }

                    string output = display2 + ":" + display;
                    clock.Text   = output;
                    TimeBox.Text = "" + TimeCount;



                    //wenn stichzeiten gleich aktueller Zeit Kamera wechseln
                    if (Wk_c == Wk_l)
                    {
                        if (TimeCount == T1)
                        {
                            Console.WriteLine("Change Scene to webcam 2");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 2");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^M");

                            T1 = 0;
                        }
                        if (TimeCount == T2)
                        {
                            Console.WriteLine("Change Scene to webcam 1");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 1");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^N");

                            T2 = 0;
                        }
                        if (TimeCount == T3)
                        {
                            Console.WriteLine("Change Scene to webcam 2");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 2");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^M");

                            T3 = 0;
                        }
                        if (TimeCount == T4)
                        {
                            Console.WriteLine("Change Scene to webcam 1");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 1");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^N");

                            T4 = 0;
                        }
                        if (TimeCount == T5)
                        {
                            Console.WriteLine("Change Scene to webcam 2");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 2");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^M");

                            T5 = 0;
                        }
                        if (TimeCount == T6)
                        {
                            Console.WriteLine("Change Scene to webcam 1");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 1");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^N");

                            T6 = 0;
                        }
                        if (TimeCount == T7)
                        {
                            Console.WriteLine("Change Scene to webcam 2");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 2");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^M");

                            T7 = 0;
                        }
                        if (TimeCount == T8)
                        {
                            Console.WriteLine("Change Scene to webcam 1");
                            log.Items.Insert(0, "Wechsle Szene zu Webcam 1");
                            logTime.Items.Insert(0, output);
                            logTime2.Items.Insert(0, TimeCount);

                            //OBS Anweisungen
                            SendKeys.Send("^N");

                            T8 = 0;
                        }
                    }
                    //Lauffortschritt in Progressbar
                    if (TimeCount <= Run_sek)
                    {
                        progressBar.Value = TimeCount;
                    }

                    //Abfrage, ob Lauf beendet
                    WebClient wc2         = new WebClient();
                    string    livetimingD = wc2.DownloadString("http://erzgebirgsschwimmcup.de/Livetiming/livetime2.php");
                    if (!livetimingD.Contains("Bahn"))
                    {
                        Run = "stopped";
                    }
                }
            }
            else
            {
                textBox1.Text = "angehalten";
            }
        }
Exemplo n.º 12
0
 public static void stop()
 {
     Time.timeScale = 0;
     Count2.stop();
 }