示例#1
0
文件: GameForm.cs 项目: JnKhB/.Net
 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);
     }
 }
示例#2
0
文件: App.xaml.cs 项目: JnKhB/.Net
 private void ViewModel_MoveLeft(object sender, EventArgs e)
 {
     m_model.Move(Direction.Left);
 }