public FSMCallfunc OnTranslationCallback; // 回调函数 public QFSMTranslation(string fromState, string name, string toState, FSMCallfunc onTranslationCallback) { FromState = fromState; ToState = toState; Name = name; OnTranslationCallback = onTranslationCallback; }
public FSMCallfunc callfunc; // 回调函数 public FSMTranslation(string fromState, string name, string toState, FSMCallfunc callfunc) { this.fromState = fromState; this.toState = toState; this.name = name; this.callfunc = callfunc; }
public FSMCallfunc callfunc; // 回调函数 public FSMTranslation(string fromState,string name, string toState,FSMCallfunc callfunc) { this.fromState = fromState; this.toState = toState; this.name = name; this.callfunc = callfunc; }
/// <summary> /// Adds the translation. /// </summary> /// <param name="fromState">From state.</param> /// <param name="name">Name.</param> /// <param name="toState">To state.</param> /// <param name="callfunc">Callfunc.</param> public void AddTranslation(string fromState, string name, string toState, FSMCallfunc callfunc) { mStateDict[fromState].TranslationDict[name] = new QFSMTranslation(fromState, name, toState, callfunc); }
/// <summary> /// 添加条转 /// </summary> /// <param name="translation">Translation.</param> public void AddTranslation(string fromState,string name,string toState,FSMCallfunc callfunc) { StateDict [fromState].TranslationDict [name] = new FSMTranslation (fromState, name, toState, callfunc); }
public void AddTranslation(string fromState, string actionName, string toState, FSMCallfunc callfunc = null) { mStateDict[fromState].TranslationDict[actionName] = new FSMTranslation(fromState, actionName, toState, callfunc); }
public FSMState(string name, FSMCallfunc enterCallback = null, FSMCallfunc exitCallback = null) { mName = name; OnEnterStateCallback = enterCallback; OnExitStateCallback = exitCallback; }