public void SetStateProcessCanEnter(int state, CanEnter fn) { if (!states.ContainsKey(state)) { Logger.LogWarning("Failed to add state process can enter: Bad state: " + state); return; } states[state] = new StateProcess(fn, states[state].onEnterFn, states[state].onExitFn); }
public StateProcess(CanEnter _canEnterFn, OnEnter _onEnterFn, OnExit _onExitFn) { canEnterFn = _canEnterFn; onEnterFn = _onEnterFn; onExitFn = _onExitFn; }