public bool HandleEvent <TTransition>() { var transition = mTrasitionTable.TypeIndex.Get(typeof(TTransition)).First(); if (transition.SrcStateType == CurrentState.GetType()) { CurrentState.Exit(); CurrentState = mStates[transition.DstStateType]; CurrentState.Enter(); return(true); } return(false); }
public void StartState <T>() { CurrentState = mStates[typeof(T)]; CurrentState.Enter(); }
public void ChangeState <TState>() { CurrentState.Exit(); CurrentState = mStates[typeof(TState)]; CurrentState.Enter(); }
public void AddState(ActionKitFSMState state) { mStates.Add(state.GetType(), state); }
public virtual void OnTransition(ActionKitFSMState srcState, ActionKitFSMState dstState) { }