Action
Inherits: RefCounted
Abstract base class for queuable player actions.
Actions represent discrete player operations (move, attack, animate) that are queued and executed sequentially by ActionManager.
Each action returns an ActionStatus from execute(): - RUNNING: the action is still in progress, call again next frame. - ENDED: the action is complete, advance to the next in queue.
Monsters use the Behavior Tree system instead of this class.
Methods
void |
clean() |
Enumerations
enum ActionStatus: 🔗
ActionStatus RUNNING = 0
Action is still in progress. ActionManager will call execute() again next physics frame.
ActionStatus ENDED = 1
Action is complete. ActionManager advances to the next queued action.
Method Descriptions
ActionStatus execute() |abstract| 🔗
Called each physics frame by ActionManager until it returns ENDED.
Override in subclasses to implement the actual behavior. Returns: ActionStatus — RUNNING if still in progress, ENDED when done.
void clean() 🔗
Clean up when the action is forcibly interrupted (e.g., turn ends).
Override in subclasses that allocate temporary nodes or particles.