Beispiel #1
0
        private void Gameover()
        {
            vreme.Stop();
            SpawnTimer.Stop();
            MoveTimer.Stop();
            ReduceSpeed.Stop();
            GameOver     go  = new GameOver(lbScore.Text);
            DialogResult res = go.ShowDialog();

            if (res == System.Windows.Forms.DialogResult.Retry)
            {
                veg.Clear();
                score        = 0;
                lbTime.Text  = "60";
                lbScore.Text = "0";
                vreme.Start();
                SpawnTimer.Start();
                MoveTimer.Start();
                pb1.Visible = true;
                pb2.Visible = true;
                pb3.Visible = true;
                canvas.Invalidate();
                SpawnTimer.Interval = 10;
                progress.Value      = 60;
                isPressed           = false;
                ReduceSpeed.Start();
            }
        }
Beispiel #2
0
 private void Igra_Load(object sender, EventArgs e)
 {
     SetStyle(ControlStyles.ResizeRedraw, true);
     SetStyle(ControlStyles.UserPaint, true);
     SetStyle(ControlStyles.AllPaintingInWmPaint, true);
     SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
     vreme.Start();
     SpawnTimer.Start();
     MoveTimer.Start();
     ReduceSpeed.Start();
 }