public Callfunc onTranslationCallback; // 回调函数

            public FSMTranslation(string fromState, string name, string toState, Callfunc onTranslationCallback)
            {
                this.fromState             = fromState;
                this.toState               = toState;
                this.name                  = name;
                this.onTranslationCallback = onTranslationCallback;
            }
示例#2
0
        void MakeCodeFromModule(List <string> modules, bool bIsClient)
        {
            if (modules.Count == 0)
            {
                return;
            }

            this.treeView1.Nodes.Clear();

            if (bIsClient)
            {
                func = LoadMoudleForClient;
            }
            else
            {
                func = LoadMoudleForServ;
            }

            foreach (var xmoduleName in modules)
            {
                func(xmoduleName);
            }

            if (bIsClient)
            {
                ClientMakeCode(bIsClient);
            }
            else
            {
                ServerMakeCode(bIsClient);
            }
        }
 public void AddTranslation(string fromState, string name, string toState, Callfunc callfunc)
 {
     stateDict[fromState].TranslationDict[name] = new FSMTranslation(fromState, name, toState, callfunc);
 }