public FSM(IAgent pOwner, StateBase pGlobalState, StateBase pCurrState) { this.pOwner = pOwner; this.pGlobalState = pGlobalState; this.pCurrState = pCurrState; FSMUpdater.Create(); FSMUpdater.onUpdate += FSMUpdater_HandleOnUpdate; }
private void Start() { FSMUpdater.Create(); machine = new FSM(this); stateA = (pFSM, owner) => { Debug.Log("StateA"); }; stateB = (pFSM, owner) => { Debug.Log("StateB"); }; machine.PushState(stateA); }
public FSM(object owner) { this.owner = owner; FSMUpdater.Create(); FSMUpdater.onUpdate += HandleOnUpdate; }