コード例 #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);
 }