UnityHFSM
UnityHFSM copied to clipboard
Make OnAction() return true or false based on whether an action was performed
This PR makes it so IActionable.OnAction() returns true if an action was actually performed, and false if not. This can be used to easily create "default behaviors" that can be overridden by defining the action.
Basic example:
if (!sm.OnAction(TestAction.Attack))
print(Time.time + ": Not attacking :(");
This is meant to be an alternative to my other PR like this. You can use the one you think would be most performant in most situations.