Beispiel #1
0
        private void EkraniYenile(object sender, EventArgs e)
        {
            if (GameSettings.OyunBitti == true)
            {
                if (Tuslar.TusaBasildi(Keys.Enter))
                {
                    OyunuBaslat();
                }
            }
            else
            {
                if (Tuslar.TusaBasildi(Keys.D) && GameSettings.Yon != Yon.Left)
                {
                    GameSettings.Yon = Yon.Right;
                }

                else if (Tuslar.TusaBasildi(Keys.A) && GameSettings.Yon != Yon.Right)
                {
                    GameSettings.Yon = Yon.Left;
                }

                else if (Tuslar.TusaBasildi(Keys.W) && GameSettings.Yon != Yon.Down)
                {
                    GameSettings.Yon = Yon.Up;
                }

                else if (Tuslar.TusaBasildi(Keys.S) && GameSettings.Yon != Yon.Up)
                {
                    GameSettings.Yon = Yon.Down;
                }

                HareketEt();
            }
            pbGameArea.Invalidate();
        }
Beispiel #2
0
 private void EasyForm_KeyUp(object sender, KeyEventArgs e)
 {
     Tuslar.DurumDegisti(e.KeyCode, false);
 }
Beispiel #3
0
 private void EasyForm_KeyDown(object sender, KeyEventArgs e)
 {
     Tuslar.DurumDegisti(e.KeyCode, true);
 }