private void DownButton_Click(object sender, RoutedEventArgs e) { if (isGameRun) { UI_GameManagerComunicate.controlMove(this, GAME_MOVE.MOVE_UP); } }
private void Window_KeyDown(object sender, KeyEventArgs e) { if (isGameRun) { if (e.Key == Key.D || e.Key == Key.Right) { UI_GameManagerComunicate.controlMove(this, GAME_MOVE.MOVE_LEFT); } if (e.Key == Key.A || e.Key == Key.Left) { UI_GameManagerComunicate.controlMove(this, GAME_MOVE.MOVE_RIGHT); } if (e.Key == Key.W || e.Key == Key.Up) { UI_GameManagerComunicate.controlMove(this, GAME_MOVE.MOVE_DOWN); } if (e.Key == Key.S || e.Key == Key.Down) { UI_GameManagerComunicate.controlMove(this, GAME_MOVE.MOVE_UP); } } }