|
Mountain
1.0.0
Simple C++ 2D Game Framework
|
Inheritance diagram for Mountain::StateMachine< T >:
Collaboration diagram for Mountain::StateMachine< T >:Public Types | |
| using | Type = T |
| using | UnderlyingType = Meta::UnderlyingEnumType< T > |
Public Member Functions | |
| StateMachine (const StateMachine &)=delete | |
| StateMachine & | operator= (const StateMachine &)=delete |
| StateMachine (StateMachine &&other) noexcept | |
| StateMachine & | operator= (StateMachine &&other) noexcept |
| void | SetCallbacks (T state, StateMachineCallbacks &&callbacks) |
| Set the callbacks for when a state begins, updates and ends. | |
| void | Update () override |
| Updates the component. | |
| T | GetState () const |
| Get the current state. | |
| UnderlyingType | GetStateIntegral () const |
| Get the current state as an integral type. | |
| void | SetState (T newState) |
Set the new state if locked is not set. | |
| void | ForceState (T newState) |
| Force the new state. | |
| StateMachine & | operator= (T newState) |
Set the new state if locked is not set. | |
| T | GetPreviousState () const |
| Get the previous state. | |
| UnderlyingType | GetPreviousStateIntegral () const |
| Get the previous state as an integral type. | |
| bool_t | GetStateChanged () const |
| Get whether the current state changed since the last update. | |
| operator T () | |
Public Member Functions inherited from Mountain::Component | |
| virtual void | Added () |
| Called when the component is added to an Entity. | |
| virtual void | Removed () |
| Called when the component is removed from an Entity. | |
| virtual void | Render () |
| Renders the component. | |
| virtual void | DebugRender () |
| const Entity * | GetEntity () const |
| Get the Entity on which this Component is attached. | |
| Entity * | GetEntity () |
| Get the Entity on which this Component is attached. | |
Public Attributes | |
| bool_t | locked = false |
Additional Inherited Members | |
Protected Attributes inherited from Mountain::Component | |
| Entity * | m_Entity = nullptr |
| Entity bound to the component. | |
Definition at line 23 of file state_machine.hpp.