/// <summary> /// 资源初始化结束 /// </summary> public void OnResourceInited() { LuaManager.InitStart(); LuaManager.DoFile("Logic/Network"); //加载网络 LuaManager.DoFile("Logic/GameManager"); //加载游戏 NetManager.OnInit(); //初始化网络 LuaComponent.Initailize(); Util.CallMethod("GameManager", "OnInitOK"); //初始化完成 initialize = true; //初始化完 }
static int Destroy(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.LuaComponent obj = (LuaFramework.LuaComponent)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaComponent)); obj.Destroy(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetLuaObject(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.LuaComponent obj = (LuaFramework.LuaComponent)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaComponent)); LuaInterface.LuaTable o = obj.GetLuaObject(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SetLuaObject(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.LuaComponent obj = (LuaFramework.LuaComponent)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaComponent)); LuaTable arg0 = ToLua.CheckLuaTable(L, 2); obj.SetLuaObject(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_m_LuaClassName(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaFramework.LuaComponent obj = (LuaFramework.LuaComponent)o; string arg0 = ToLua.CheckString(L, 2); obj.m_LuaClassName = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_LuaClassName on a nil value" : e.Message)); } }
static int get_m_LuaClassName(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaFramework.LuaComponent obj = (LuaFramework.LuaComponent)o; string ret = obj.m_LuaClassName; LuaDLL.lua_pushstring(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_LuaClassName on a nil value" : e.Message)); } }