Ejemplo n.º 1
0
            public FSMCallfunc OnTranslationCallback;   // 回调函数

            public QFSMTranslation(string fromState, string name, string toState, FSMCallfunc onTranslationCallback)
            {
                FromState             = fromState;
                ToState               = toState;
                Name                  = name;
                OnTranslationCallback = onTranslationCallback;
            }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
		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;
		}
Ejemplo n.º 4
0
 /// <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);
 }
Ejemplo n.º 5
0
	/// <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);
	}
Ejemplo n.º 6
0
 public void AddTranslation(string fromState, string actionName, string toState, FSMCallfunc callfunc = null)
 {
     mStateDict[fromState].TranslationDict[actionName] =
         new FSMTranslation(fromState, actionName, toState, callfunc);
 }
Ejemplo n.º 7
0
 public FSMState(string name, FSMCallfunc enterCallback = null, FSMCallfunc exitCallback = null)
 {
     mName = name;
     OnEnterStateCallback = enterCallback;
     OnExitStateCallback  = exitCallback;
 }