예제 #1
0
 /// <summary>
 /// 进入状态时的回调
 /// </summary>
 /// <param name="prev">上一个状态</param>
 public override void EnterCallback(IState prev)
 {
     base.EnterCallback(prev);
     _currentState.EnterCallback(prev);
 }
예제 #2
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public LStateMachine(string name, IState defaultState) : base(name)
 {
     _states       = new List <IState> ();
     _defaultState = defaultState;
 }
예제 #3
0
 /// <summary>
 /// 退出状态时的回调
 /// </summary>
 /// <param name="next">下一个状态</param>
 public override void ExitCallback(IState next)
 {
     base.ExitCallback(next);
     _currentState.ExitCallback(next);
 }
예제 #4
0
 //构造函数
 public Transition(string name, IState fromState, IState toState)
 {
     _name      = name;
     _fromState = fromState;
     _toState   = toState;
 }
예제 #5
0
 public LOStateMeachine(string name, IState state)
     : base(name)
 {
     _states      = new List <IState>();
     DefaultState = state;
 }
예제 #6
0
 //构造函数
 public SUNTransition(string name, IState from, IState to)
 {
     this._name = name;
     this._from = from;
     this._to   = to;
 }