Beispiel #1
0
        private void Level2_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < 5; i++)
            {
                B[i] = new newball(i + 130 + i * 120, i + 120, this);
            }

            playR.Enabled  = true;
            timer2.Enabled = true;
            timer3.Enabled = true;
            timer4.Enabled = true;
            timer5.Enabled = true;
        }
        private void Level4_Load(object sender, EventArgs e)
        {
            Chance.Text = "Chance : " + chances + "/30";
            Random rand = new Random();

            x  = rand.Next(0, this.ClientSize.Width - 50);
            y  = rand.Next(0, this.ClientSize.Height - 50);
            x1 = rand.Next(0, this.ClientSize.Width - 50);
            y1 = rand.Next(0, this.ClientSize.Height - 50);

            // 4,19 - moving 2ana5e more than 2ofke.
            b  = new newball(x, y, 4, 19, this);
            b2 = new newball(x1, y1, 4, 19, this);
        }
Beispiel #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "Death : " + chances + "/30";
            B[0] = new newball(0 + 130 + 0 * 120, 0 + 105, this, 1);
            B[1] = new newball(1 + 130 + 1 * 120, 1 + 180, this, 1);

            if (isWork == true)            //STOPWATCH timer code
            {
                isWork = false;            //stop work
                sw.Stop();                 //stop stopwatch
                sw.Reset();                //reset read value
                tmSW.Stop();               //stop sw timer
                lblTimer.Text = "0:00:00"; //reset label
            }
            else
            {
                isWork = true; //start work
                sw.Start();    //start stopwatch
                tmSW.Start();  //start sw timer
            }
        }