Пример #1
0
 //////
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == (Keys.A))//west
     {
         West.PerformClick();
     }
     if (keyData == (Keys.W))//north
     {
         North.PerformClick();
     }
     if (keyData == (Keys.D))//east
     {
         East.PerformClick();
     }
     if (keyData == (Keys.S))//south
     {
         South.PerformClick();
     }
     if (keyData == (Keys.R)) //rest
     {
         Restandsleep.PerformClick();
     }
     if (keyData == (Keys.Q))
     {
         Attack.PerformClick();
     }
     if (keyData == (Keys.I))
     {
         Inventor.PerformClick();
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }