Example #1
0
 public void DoDirection(string path)
 {
     CLog.Debug("DoDirection=>" + path);
     string[] fileNames = Directory.GetFiles(path, "*.txt");
     for (var i = 0; i < fileNames.Length; i++)
     {
         string fullPath = fileNames[i];
         DoFileByFullPath(fullPath);
     }
 }
Example #2
0
 public void DoFileByFullPath(string path)
 {
     CLog.Debug("DoLua=>" + path);
     try
     {
         path = Encoding.Unicode.GetString(Encoding.Unicode.GetBytes(path));
         Lua.DoFile(path);
     }
     catch (Exception e)
     {
         CLog.Error("文件<" + path + ">编译错误" + e.ToString());
     }
 }
Example #3
0
 public virtual void DoString(string luaStr, string fileName = "", bool isLogFileName = true)
 {
     if (fileName != "" && isLogFileName)
     {
         CLog.Debug("DoString=>" + fileName);
     }
     try
     {
         Lua.DoString(luaStr);
     }
     catch (Exception e)
     {
         CLog.Error("文件<" + fileName + ">编译错误" + e.ToString() + "\n");
     }
 }