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(); }