static int Initialize(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); GlobalConfigTable obj = (GlobalConfigTable)ToLua.CheckObject <GlobalConfigTable>(L, 1); obj.Initialize(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void LoadTables() { globalConfigTable = LoadData <GlobalConfigTable>("Tables/GlobalConfigTable.bytes"); globalConfigTable.Initialize(); itemTable = LoadData <ItemTable>("Tables/ItemTable.bytes"); itemTable.Initialize(); npcTable = LoadData <NpcTable>("Tables/NpcTable.bytes"); npcTable.Initialize(); objectPoolTable = LoadData <ObjectPoolTable>("Tables/ObjectPoolTable.bytes"); objectPoolTable.Initialize(); qualityTable = LoadData <QualityTable>("Tables/QualityTable.bytes"); qualityTable.Initialize(); ///[APPEND_TABLE] }
static int AddItem(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); GlobalConfigTable obj = (GlobalConfigTable)ToLua.CheckObject <GlobalConfigTable>(L, 1); GlobalConfigTableItem arg0 = (GlobalConfigTableItem)ToLua.CheckObject <GlobalConfigTableItem>(L, 2); obj.AddItem(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetItems(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); GlobalConfigTable obj = (GlobalConfigTable)ToLua.CheckObject <GlobalConfigTable>(L, 1); System.Collections.Generic.List <GlobalConfigTableItem> o = obj.GetItems(); ToLua.PushSealed(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetItemByKey(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); GlobalConfigTable obj = (GlobalConfigTable)ToLua.CheckObject <GlobalConfigTable>(L, 1); string arg0 = ToLua.CheckString(L, 2); GlobalConfigTableItem o = obj.GetItemByKey(arg0); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_globalConfigTable(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); TableManager obj = (TableManager)o; GlobalConfigTable arg0 = (GlobalConfigTable)ToLua.CheckObject <GlobalConfigTable>(L, 2); obj.globalConfigTable = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index globalConfigTable on a nil value")); } }
static int get_globalConfigTable(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); TableManager obj = (TableManager)o; GlobalConfigTable ret = obj.globalConfigTable; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index globalConfigTable on a nil value")); } }
static int set_name(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); GlobalConfigTable obj = (GlobalConfigTable)o; string arg0 = ToLua.CheckString(L, 2); obj.name = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index name on a nil value")); } }
static int get_Items(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); GlobalConfigTable obj = (GlobalConfigTable)o; System.Collections.Generic.List <GlobalConfigTableItem> ret = obj.Items; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Items on a nil value")); } }
static int get_name(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); GlobalConfigTable obj = (GlobalConfigTable)o; string ret = obj.name; LuaDLL.lua_pushstring(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index name on a nil value")); } }
static int _CreateGlobalConfigTable(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { GlobalConfigTable obj = new GlobalConfigTable(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: GlobalConfigTable.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }