Beispiel #1
0
 public FSM(IAgent pOwner, StateBase pGlobalState, StateBase pCurrState)
 {
     this.pOwner       = pOwner;
     this.pGlobalState = pGlobalState;
     this.pCurrState   = pCurrState;
     FSMUpdater.Create();
     FSMUpdater.onUpdate += FSMUpdater_HandleOnUpdate;
 }
Beispiel #2
0
    private void Start()
    {
        FSMUpdater.Create();
        machine = new FSM(this);

        stateA = (pFSM, owner) => {
            Debug.Log("StateA");
        };

        stateB = (pFSM, owner) => {
            Debug.Log("StateB");
        };
        machine.PushState(stateA);
    }
Beispiel #3
0
 public FSM(object owner)
 {
     this.owner = owner;
     FSMUpdater.Create();
     FSMUpdater.onUpdate += HandleOnUpdate;
 }