No-op specialization used when no custom states are declared.
More...
#include <Malena/Traits/Base/MultiCustomStateManager.h>
|
| StateEnums | getState () const |
| | Return the current state value.
|
| void | getState (...) |
| void | isState (...) |
| bool | isState (StateEnums state) const |
| | Return true if the current state equals state.
|
| void | onStateEnter (...) |
| void | onStateEnter (std::function< void(StateEnums)> cb) |
| | Register a callback invoked when any state is entered.
|
| void | onStateExit (...) |
| void | onStateExit (std::function< void(StateEnums)> cb) |
| | Register a callback invoked when any state is exited.
|
| void | setState (...) |
| void | setState (StateEnums newState) |
| | Transition to a new state.
|
| void | syncState (...) |
| void | syncState (StateEnums state) |
| | Set the current state silently, without firing any callbacks.
|
No-op specialization used when no custom states are declared.
Adds no storage. The variadic ... absorb accidental calls so that using declarations in ComponentCore still compile.
Definition at line 160 of file MultiCustomStateManager.h.
◆ getState() [1/2]
◆ getState() [2/2]
◆ isState() [1/2]
◆ isState() [2/2]
Return true if the current state equals state.
- Parameters
-
| state | State value to compare against. |
- Returns
true if currently in state.
Definition at line 68 of file MultiCustomStateManager.h.
◆ onStateEnter() [1/2]
◆ onStateEnter() [2/2]
Register a callback invoked when any state is entered.
The callback receives the newly entered state as its argument. Only one enter callback is active at a time; calling this again replaces the previous one.
- Parameters
-
| cb | Callback invoked with the new state after each transition. |
Definition at line 79 of file MultiCustomStateManager.h.
◆ onStateExit() [1/2]
◆ onStateExit() [2/2]
Register a callback invoked when any state is exited.
The callback receives the state being left as its argument. Only one exit callback is active at a time; calling this again replaces the previous one.
- Parameters
-
| cb | Callback invoked with the old state before each transition. |
Definition at line 90 of file MultiCustomStateManager.h.
◆ setState() [1/2]
◆ setState() [2/2]
Transition to a new state.
If an exit callback is registered, it is called with the current state before the transition. If an enter callback is registered, it is called with the new state after the transition.
- Parameters
-
| newState | The state to transition into. |
Definition at line 50 of file MultiCustomStateManager.h.
◆ syncState() [1/2]
◆ syncState() [2/2]
Set the current state silently, without firing any callbacks.
Used by SceneManager::start() to synchronise the state machine to the initial scene without triggering enter/exit callbacks.
- Parameters
-
| state | The state to set as current. |
Definition at line 100 of file MultiCustomStateManager.h.
The documentation for this class was generated from the following file: