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