Beispiel #1
0
    public void CountTime()
    {
        Count     -= Time.deltaTime;
        CountInt   = (int)Count;
        Timer.text = CountInt.ToString();

        if (CountInt == 0 || p2Lose || p1Lose)
        {
            winnercheck();


            if (checknumber)
            {
                Count = 20;
                HealthBarP1.Health = 120;
                HealthBarP2.Health = 120;
                RoundNumber[i].SetActive(true);

                StartCoroutine(Rounds());
                TimerO.SetActive(false);

                Destroy(Player2);
                Destroy(Player1);

                Debug.Log("cro");
            }
        }
    }
 private void PMainForm_Load(object sender, EventArgs e)
 {
     Resol = "######";
     //WDTF=new WriteDataToFile();
     WKL  = new WorkLogic(Application.StartupPath);
     sett = new Setting(WKL);
     //timer1.Start();
     WKL.GlobalTimeTicTac    += WKL_GlobalTimeTicTac;
     WKL.InitEvent           += () => { P_TSB_GO.Enabled = true; };
     WKL.StartEvent          += WKL_StartEvent;
     WKL.MeasCountTimerEvent += (int CountInt) => PTSL_CountTime.Text = CountInt.ToString();
     WKL.ActionEvent         += WKL_ActionEvent;
     WKL.StopEvent           += WKL_StopEvent;
     WKL.PauseEvent          += () => { P_TSB_Pause.Enabled = false; P_TSB_GO.Enabled = true; };
     sett.SplineChange       += (bool Sp) => { PDataChart.Series[0].ChartType = Sp ? SeriesChartType.Spline : SeriesChartType.Line; };
     sett.ResolChange        += (int Res) => { Resol = MakeString(Res); };
 }
Beispiel #3
0
    public IEnumerator Rounds()
    {
        yield return(new WaitForSeconds(4f));

        RoundNumber[i].SetActive(false);
        i++;
        Count = 100;
        TimerO.SetActive(true);

        Count             -= Time.deltaTime;
        Timer.text         = CountInt.ToString();
        HealthBarP1.Health = 120;
        HealthBarP2.Health = 120;
        Gamemanager.InstantiatesAi();
        HUD1.SetActive(true);
        HUD2.SetActive(true);
        triangle.SetActive(true);
        counter.SetActive(true);

        EndAnim = true;
        RoundN  = true;
    }