// generates an external event. called once per external event
// to start the state machine executing
void StateMachine::ExternalEvent(unsigned char newState, EventData* pData)
{
    // if we are supposed to ignore this event
    if (newState == EVENT_IGNORED)
    {
        // just delete the event data, if any
        if (pData) delete pData;
    }
    else
    {
        // generate the event and execute the state engine
        InternalEvent(newState, pData);
        StateEngine();
    }
}
Пример #2
0
void JankyStateMachine::Run(){
	StateEngine(currentState);
}