12345678910111213
class FSM { public: FSM(); ~FSM(); void Update(); std::vector<FSMState*> statesMap; public: FSMState *currentState; };
12345678
//Constructor FSM::FSM() { FSMState* attack = new AttackEnemy(); currentState = attack; statesMap.push_back(attack); }