예제 #1
0
 public static KState GetState(this KCode kCode)
 {
     // prevent two-finger-right-click on touch screens, it messes with other right-click behaviour
     if (kCode == KCode.Mouse1 && UnityEngine.Input.touches != null && UnityEngine.Input.touches.Length >= 2)
     {
         return(KState.KeyReleased);
     }
     return(AppInput.GetKeyDown(kCode) ? KState.KeyDown :
            AppInput.GetKeyUp(kCode) ? KState.KeyUp :
            AppInput.GetKey(kCode) ? KState.KeyHeld :
            KState.KeyReleased);
 }
예제 #2
0
 public static bool IsUp(this KCode kCode)
 {
     return(AppInput.GetKeyUp(kCode));
 }