Question regarding.
I would like to put that main from url above in a dll
And have different instances running. Depending on external actions, the dll would be called and run that particular instance.
example
external Event1 (has some unique ID)
call Startup and play (after some other external event triggers, it will call Pause)
external Event2 (has some unique ID)
call Startup and play (after some other external event triggers, it will call Pause)
if(foo ==1)
stateMachine.Startup();
stateMachine.SendTriggerEvent(“Play”);
else if(foo ==2)
stateMachine.SendTriggerEvent(“Pause”);
else if(foo ==3)
stateMachine.SendTriggerEvent(“Stop”);
stateMachine.Finish();