server/game/src/FSM.h
2022-03-05 12:44:06 +02:00

35 lines
594 B
C++

#ifndef _fsm_fsm_h
#define _fsm_fsm_h
// Local Includes
#include "state.h"
// FSM Class
class CFSM
{
protected:
CState * m_pCurrentState; // Current State
CState * m_pNewState; // New State
CStateTemplate<CFSM> m_stateInitial; // Initial State
public:
// Constructor
CFSM();
// Destructor
virtual ~CFSM() {}
// Global Functions
virtual void Update();
// State Functions
bool IsState(CState &State) const;
bool GotoState(CState &NewState);
virtual void BeginStateInitial() {}
virtual void StateInitial() {}
virtual void EndStateInitial() {}
};
#endif