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(); }
private void Form1_KeyUp(object sender, KeyEventArgs e) { GameInput.ChangeState(e.KeyCode, false); }