Ejemplo n.º 1
0
        void button1_Click(object sender, EventArgs e)
        {
            Skor.BilgileriAl(textBox1.Text, dakika, saniye);
            Skor.Sirala();
            Skor.Kaydet();


            NesneTut.Close();
        }
Ejemplo n.º 2
0
        private void timer1_Tick(object sender, EventArgs e)
        {//topun karakter kismi,характеристика мяча,где куда и как будет вести себя.
            if (top.Location.X <= 0)
            {
                top.hiz_X *= -1;
            }

            if (top.Location.X + top.Width >= this.Width - 10)
            {
                top.hiz_X *= -1;
            }

            if (top.Location.Y <= 59)
            {
                top.hiz_Y *= -1;
            }

            if (top.Location.X + top.Width / 2 >= raket.Location.X && top.Location.X + top.Width / 2 <= raket.Location.X + raket.Width && top.Location.Y + top.Height >= this.Height - 70)
            {
                top.hiz_Y *= -1;
                top.hiz_X += top.hiz_X / 10;
                top.hiz_Y += top.hiz_Y / 10;
                SystemSounds.Beep.Play();
            }

            else if (top.Location.Y + top.Height >= this.Height - 60)
            {
                timer1.Stop();
                label3.Visible = true;
                timer2.Stop();
                Cursor.Show();
                top.Visible  = false;
                Click_sayisi = 0;
                top.hiz_X    = 3;
                top.hiz_Y    = -3;
                SystemSounds.Hand.Play();
                //oyun bitis kismi,конец игры,характеристики ее

                ykr_skr.dakika = Dakika;
                ykr_skr.saniye = Saniye;

                if (Skor.BilgileriAl("12345", Dakika, Saniye))
                {
                    ykr_skr.FormAc();
                }

                Dakika = 0;
                Saniye = 0;
            }

            top.Location = new System.Drawing.Point(top.Location.X + (int)top.hiz_X, top.Location.Y + (int)top.hiz_Y);//sürekli yeni konuma çiziliyor
        }