public void RegisterHandlers()
{
string handlePath = "";
if (AppConst.LuaBundleMode)
{
handlePath = Util.DataPath + "lua/protocol/handlers.txt";
}
else
{
handlePath = AppConst.FrameworkRoot + "/Lua/protocol/handlers.txt";
}
string text = File.ReadAllText(handlePath);
string[] handlers = text.Split(';');
for (int i = 0; i < handlers.Length; ++i)
{
if (string.IsNullOrEmpty(handlers[i]))
{
continue;
}
string fileName = string.Format("protocol/handler/{0}", handlers[i]);
LuaManager.DoFile(fileName);
}
}