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