示例#1
0
 /// <summary>
 /// Press the current active key
 /// </summary>
 public void PressKey()
 {
     if (ActiveKey != null)
     {
         ActiveKey.Press();
     }
 }
示例#2
0
 /// <summary>
 /// Activate the selected key and press it
 /// </summary>
 /// <param name="key"></param>
 public void PressKey(KeyboardKey key)
 {
     if (key != null)
     {
         EventSystem.current.SetSelectedGameObject(key.gameObject);
         ActiveKey = key;
         key.Press();
     }
 }