예제 #1
0
 public static void SetCancelListenerOnce(this InputAction action, Action <InputAction.CallbackContext> context, bool enable)
 {
     if (enable)
     {
         action.AddCancelListenerOnce(context);
     }
     else
     {
         action.RemoveCancelListener(context);
     }
 }
예제 #2
0
 public static void AddAnyListenerOnce(this InputAction action, Action <InputAction.CallbackContext> context)
 {
     action.AddPerformListenerOnce(context);
     action.AddCancelListenerOnce(context);
 }