#include <StateManager.hh>
Base class that represents different "states" for an object.
Some objects inherit from this class in order to define unique behavior depending on what the current "state" of the object is. For example, FireSnakes may be falling from the sun, resting, or jumping. Each state has an "enter" and a "calc" function. The object that inherits this class is responsible for defining how many states there are and must specify the enter and calc functions for each of those states. The object is also responsible for defining the transition points (i.e. the criteria to move from one state to another).
Definition at line 29 of file StateManager.hh.
Protected Member Functions | |
| StateManager (void *obj, const std::span< const StateManagerEntry > &entries) | |
| void | calc () |
Protected Attributes | |
| u16 | m_currentStateId |
| s32 | m_nextStateId |
| u32 | m_currentFrame |
| std::span< u16 > | m_entryIds |
| std::span< const StateManagerEntry > | m_entries |
| void * | m_obj |
|
inlineprotected |
Definition at line 31 of file StateManager.hh.
|
inlineprotectedvirtual |
Definition at line 46 of file StateManager.hh.
|
inlineprotected |
Definition at line 50 of file StateManager.hh.
|
protected |
Definition at line 68 of file StateManager.hh.
|
protected |
Definition at line 66 of file StateManager.hh.
|
protected |
Definition at line 70 of file StateManager.hh.
|
protected |
Definition at line 69 of file StateManager.hh.
|
protected |
Definition at line 67 of file StateManager.hh.
|
protected |
Definition at line 71 of file StateManager.hh.