28 #ifndef HPL_STATE_MACHINE_H 29 #define HPL_STATE_MACHINE_H 31 #include "hpl1/engine/game/GameTypes.h" 32 #include "hpl1/engine/system/SystemTypes.h" 34 #include "common/stablemap.h" 48 virtual void OnUpdate(
float afTime) = 0;
50 virtual void OnEnterState(
int alLastState) = 0;
51 virtual void OnLeaveState(
int alNextState) = 0;
53 int GetId() {
return mlId; }
54 const tString &GetName() {
return msName; }
55 float GetUpdateStep() {
return mfUpdateStep; }
57 void Sleep(
float afTime);
66 void Update(
float afTime);
67 void SetStateMachine(
cStateMachine *apStateMachine) { mpStateMachine = apStateMachine; }
82 void Update(
float afTime);
87 void AddState(
iAIState *apState,
const tString &asName,
int alId,
float afUpdateStep);
89 void ChangeState(
int alId);
91 void SetActive(
bool abX) { mbActive = abX; }
92 bool IsActive() {
return mbActive; }
101 tAIStateMap m_mapStates;
108 #endif // HPL_STATE_MACHINE_H
Definition: StateMachine.h:77
typename TreeT::BasicIterator iterator
Definition: stablemap.h:48
Definition: StateMachine.h:41