Interface Interactable

    • Method Detail

      • interact

        default boolean interact​(java.lang.String action)
        Attempts to interact with the entity using the given action. This method will adjust the camera to and walk to the entity if needed. As of now, the interactable entity must be reachable. In the future, support for obstacles such as doors may be added.
        Parameters:
        action - The action to use when interacting with the entity (IE: "Attack", "Take", etc)
        Returns:
        True if the entity was clicked, false otherwise
      • interact

        default boolean interact​(java.lang.String action,
                                 java.util.function.BooleanSupplier interruptCondition)
        Attempts to interact with the entity using the given action. This method will adjust the camera to and walk to the entity if needed. As of now, the interactable entity must be reachable. In the future, support for obstacles such as doors may be added.
        Parameters:
        action - The action to use when interacting with the entity (IE: "Attack", "Take", etc)
        interruptCondition - a condition to interrupt the interaction attempt - if this condition is ever true, when checked, the interaction attempt with return early with a result of false
        Returns:
        True if the entity was clicked, false otherwise