示例#1
0
 private void Form1_KeyDown(object sender, KeyEventArgs e)
 {
     GameInput.ChangeState(e.KeyCode, true);
     mode          = moveSnake();
     lblDebug.Text = mode;
     if (!isStarted || isPaused)
     {
         if (GameInput.PressedKey(Keys.Enter))
         {
             clock.Start(); isStarted = true;
         }
     }
     if (!isPaused && isStarted)
     {
         mode = moveSnake();
     }
     pauseGame();
 }
示例#2
0
 private void Form1_KeyUp(object sender, KeyEventArgs e)
 {
     GameInput.ChangeState(e.KeyCode, false);
 }