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); } }
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()); } }
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"); } }