ezEngine  Release 25.03
ezStateMachineInstance Class Reference

The state machine instance represents the actual state machine. Typically it is created from a description but for small use cases it can also be used without a description. More...

#include <StateMachine.h>

Public Member Functions

 ezStateMachineInstance (ezReflectedClass &ref_owner, const ezSharedPtr< const ezStateMachineDescription > &pDescription=nullptr)
 
ezResult SetState (ezStateMachineState *pState)
 
ezResult SetState (ezUInt32 uiStateIndex)
 
ezResult SetState (const ezHashedString &sStateName)
 
ezResult SetStateOrFallback (const ezHashedString &sStateName, ezUInt32 uiFallbackStateIndex=0)
 
ezStateMachineStateGetCurrentState ()
 
void Update (ezTime deltaTime)
 
ezReflectedClassGetOwner ()
 
ezWorldGetOwnerWorld ()
 
void SetBlackboard (const ezSharedPtr< ezBlackboard > &pBlackboard)
 
const ezSharedPtr< ezBlackboard > & GetBlackboard () const
 
ezTime GetTimeInCurrentState () const
 Returns how long the state machine is in its current state.
 
void FireTransitionEvent (ezStringView sEvent)
 Sends a named event that state transitions can react to.
 
ezStringView GetCurrentTransitionEvent () const
 

Detailed Description

The state machine instance represents the actual state machine. Typically it is created from a description but for small use cases it can also be used without a description.


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