StateControl.h
void OnDraw()
Function that is called upon each Draw iteration. Component Draw()s are run before the entity's draw ...
void RemoveLoop(const std::string &tag, StateLoop)
Specifically removes the given stateloop if associated with the given state tag.
StateLoop(Component::EventHandler step=nullptr, Component::EventHandler draw=nullptr, Component::EventHandler init=nullptr, void *data_=nullptr)
Creates a new StateLoop.
Definition: StateControl.h:82
bool(*)(void *, Component *component, Entity::ID self, Entity::ID source, const std::vector< std::string > &args) EventHandler
A handler for an event.
Definition: Component.h:132
void ConnectState(const std::string &tag, StateLoop)
Adds an additional StateLoop to be associated with a state.
void CreateState(const std::string &tag, StateLoop)
Sets up a new valid state.
Definition: AssetID.h:37
std::string GetInfo()
Returns a string containing human-readable information on the state of the component.
void Execute(const std::string &beginState)
Begins the state machine execution loop from the given state.
bool IsHalted()
Returns whether or not the machine is in a halted state.
Designates execution instructions for a state.
Definition: StateControl.h:78
std::string GetCurrentState()
Returns the current state tag. If no execution state is active, the empty string is returned...
void OnStep()
Function that is called upon each Run iteration. Component Run()s are run before the entity's run fun...
Class that extends the functionality of an Entity, but as a removable and addable object...
Definition: Component.h:66