Example #1
0
 private void GameForm_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Right)
     {
         Direction direction = Direction.Right;
         m_model.Move(direction);
     }
     else if (e.KeyCode == Keys.Left)
     {
         Direction direction = Direction.Left;
         m_model.Move(direction);
     }
 }
Example #2
0
 private void ViewModel_MoveLeft(object sender, EventArgs e)
 {
     m_model.Move(Direction.Left);
 }