Beispiel #1
0
 private void updateBTN_Click(object sender, EventArgs e)
 {
     //TODO
     SnakeGame.changeBackground(previewBox.BackgroundImage);
     GameInput.ChangeState(Keys.U, true);
     MessageBox.Show("تم تغيير الخريطة بنجاح");
 }
Beispiel #2
0
 private void updateBTN_Click(object sender, EventArgs e)
 {
     //TODO
     SnakeGame.changeBackground(previewBox.BackgroundImage);
     GameInput.ChangeState(Keys.U, true);
     MessageBox.Show("Background has been updated, close this window to apply changes");
 }
Beispiel #3
0
 private void Form1_KeyDown(object sender, KeyEventArgs e)
 {
     GameInput.ChangeState(e.KeyCode, true);
     if (GameInput.PressedKey(Keys.U))
     {
         canvas.BackgroundImage = background;
     }
 }
Beispiel #4
0
 private void Form1_KeyUp(object sender, KeyEventArgs e)
 {
     GameInput.ChangeState(e.KeyCode, false);
 }
Beispiel #5
0
 private void Form1_KeyDown(object sender, KeyEventArgs e)
 {
     GameInput.ChangeState(e.KeyCode, true);
 }