Exemplo n.º 1
0
 void Start()
 {
     luaenv = new LuaEnv();
     luaenv.AddLoader((ref string filename) =>
     {
         string path = Application.dataPath + "/../../XClientLua/lua/" + filename + ".lua";
         if (File.Exists(path))
         {
             return(File.ReadAllBytes(path));
         }
         else
         {
             path = Application.dataPath + "/../../XCommon/lua/" + filename + ".lua";
             if (File.Exists(path))
             {
                 return(File.ReadAllBytes(path));
             }
             else
             {
                 return(null);
             }
         }
     });
     luaenv.DoString("require('main/startup')");
     BTDebug.Init(luaenv);
 }
Exemplo n.º 2
0
 protected override void OnInit()
 {
     if (Application.platform == RuntimePlatform.Android ||
         Application.platform == RuntimePlatform.WindowsPlayer ||
         Application.platform == RuntimePlatform.IPhonePlayer)
     {
         IsAbRes = true;
         IsAbLua = true;
         IsAbCfg = true;
     }
     XLog.Instance.Init();
     ABMgr.Instance.Init();
     XLuaMgr.Instance.Init();
     BTDebug.Init(XLuaMgr.Instance.GetLuaEnv());
 }