예제 #1
0
 public static void InteractHold(InputAction action)
 {
     if (Input.GetAxisRaw("Interact") != 0f)
     {
         action.Invoke();
     }
 }
예제 #2
0
    public static bool InteractButton(InputAction action)
    {
        if (Input.GetAxisRaw("Interact") != 0f)
        {
            if (interactDown == false)
            {
                action.Invoke();
                interactDown = true;
            }
        }

        if (Input.GetAxisRaw("Interact") == 0f)
        {
            interactDown = false;
        }

        return(interactDown);
    }
예제 #3
0
 public void Execute(object parameter)
 {
     action?.Invoke(parameter);
 }