interact

boolean interact(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.

Return

True if the entity was clicked, false otherwise

Parameters

action

The action to use when interacting with the entity (IE: "Attack", "Take", etc)

boolean interact(String action, 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.

Return

True if the entity was clicked, false otherwise

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