ezEngine  Release 25.03
ezStateMachineState Class Referenceabstract

Base class for a state in a state machine. More...

#include <StateMachine.h>

Inheritance diagram for ezStateMachineState:

Public Member Functions

 ezStateMachineState (ezStringView sName=ezStringView())
 
void SetName (ezStringView sName)
 
ezStringView GetName () const
 
const ezHashedStringGetNameHashed () const
 
virtual void OnEnter (ezStateMachineInstance &ref_instance, void *pInstanceData, const ezStateMachineState *pFromState) const =0
 
virtual void OnExit (ezStateMachineInstance &ref_instance, void *pInstanceData, const ezStateMachineState *pToState) const
 
virtual void Update (ezStateMachineInstance &ref_instance, void *pInstanceData, ezTime deltaTime) const
 
virtual ezResult Serialize (ezStreamWriter &inout_stream) const
 
virtual ezResult Deserialize (ezStreamReader &inout_stream)
 
virtual bool GetInstanceDataDesc (ezInstanceDataDesc &out_desc)
 Returns whether this state needs additional instance data and if so fills the out_desc. More...
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Additional Inherited Members

- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 

Detailed Description

Base class for a state in a state machine.

Note that states are shared between multiple instances and thus shouldn't modify any data on their own but always operate on the passed instance and instance data.

See also
ezStateMachineInstanceDataDesc

Member Function Documentation

◆ GetInstanceDataDesc()

bool ezStateMachineState::GetInstanceDataDesc ( ezInstanceDataDesc out_desc)
virtual

Returns whether this state needs additional instance data and if so fills the out_desc.

See also
ezStateMachineInstanceDataDesc

Reimplemented in ezStateMachineState_Compound, ezStateMachineState_Script, and ezStateMachineState_NestedStateMachine.


The documentation for this class was generated from the following files: