Beispiel #1
0
 public LanguageSplit()
 {
     _jsonToLua      = new JsonToLua();
     _mainKeyRecords = new HashSet <string>();
     // _excelTxt = new System.Text.StringBuilder(1024);
     _colInfo         = new Dictionary <string, ColInfo>();
     _sheetClientDefs = new SortedDictionary <int, ClientDef>(
         new CustomComparer <int>((l, r) => { return(l.CompareTo(r)); })
         );
 }
Beispiel #2
0
 public MoeConvertTable()
 {
     // _startRow = 5;
     _jsonToLua       = new JsonToLua();
     _mainKeyRecords  = new HashSet <string>();
     _excelTxt        = new System.Text.StringBuilder(1024);
     _sheetClientDefs = new SortedDictionary <int, ClientDef>(
         new CustomComparer <int>((l, r) => { return(l.CompareTo(r)); })
         );
 }
        static void ExportToLua(PlayableSetting setting)
        {
            Debug.Log("ExportToLua");
            string cfgPath = jsonFilePath + setting.skillID + ".json";
            var    json    = JsonUtility.ToJson(setting);

            byte[] bs = Encoding.UTF8.GetBytes(json);
            Utils.WriteFile(cfgPath, bs);
            CSharpToLuaCfg cfg = new CSharpToLuaCfg();

            cfg.cfgPath     = cfgPath;
            cfg.luaFilePath = luaFilePath + setting.skillID + ".lua";
            cfg.typeName    = "DH.IM.PlayableSetting";
            JsonToLua.ConvertCfg(cfg);
            AssetDatabase.Refresh();
        }