![]() |
AireEngine
A 3D Open-World Game Engine
|
#include <stateMachine.h>


Public Member Functions | |
| State (const std::string &name) | |
| virtual void | onActive ()=0 |
| void | linkStateAsDst (State *dstState) |
Public Attributes | |
| std::string | name |
| std::unordered_map< std::string, State * > | linkedStates |
Structure to represent some game state. The state can be connected to a list of destination states. Inherit from this if you require the state to have custom attributes.
|
inline |
Create a new state with a given name.
| name | Name of the state |
Link another state as a destination state. This means that a transtition from the current state to the destination state becomes possible. The transition can be ordered through a state machine.
| dstState | The destination state to attach to the current state. |
Method called when this state becomes the current state in a state machine. Override this to implement specific handling.
Implemented in BoidState.
