//this source code was auto-generated by tolua#, do not modify it using System; using LuaInterface; public class SkillParamWrap { public static void Register(LuaState L) { L.BeginClass(typeof(SkillParam), null); L.RegFunction("ToJson", ToJson); L.RegFunction("New", _CreateSkillParam); L.RegFunction("__tostring", ToLua.op_ToString); L.RegVar("skillId", get_skillId, set_skillId); L.RegVar("skillLv", get_skillLv, set_skillLv); L.RegVar("skillRate", get_skillRate, set_skillRate); L.EndClass(); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _CreateSkillParam(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { JSONObject arg0 = (JSONObject)ToLua.CheckObject(L, 1); SkillParam obj = new SkillParam(arg0); ToLua.PushValue(L, obj); return 1; } else if (count == 2) { int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); int arg1 = (int)LuaDLL.luaL_checknumber(L, 2); SkillParam obj = new SkillParam(arg0, arg1); ToLua.PushValue(L, obj); return 1; } else if (count == 3) { int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); int arg1 = (int)LuaDLL.luaL_checknumber(L, 2); int arg2 = (int)LuaDLL.luaL_checknumber(L, 3); SkillParam obj = new SkillParam(arg0, arg1, arg2); ToLua.PushValue(L, obj); return 1; } else if (count == 0) { SkillParam obj = new SkillParam(); ToLua.PushValue(L, obj); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: SkillParam.New"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int ToJson(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); SkillParam obj = (SkillParam)ToLua.CheckObject(L, 1, typeof(SkillParam)); JSONObject o = obj.ToJson(); ToLua.PushObject(L, o); ToLua.SetBack(L, 1, obj); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_skillId(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SkillParam obj = (SkillParam)o; int ret = obj.skillId; LuaDLL.lua_pushinteger(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillId on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_skillLv(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SkillParam obj = (SkillParam)o; int ret = obj.skillLv; LuaDLL.lua_pushinteger(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillLv on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_skillRate(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SkillParam obj = (SkillParam)o; int ret = obj.skillRate; LuaDLL.lua_pushinteger(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillRate on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_skillId(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SkillParam obj = (SkillParam)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.skillId = arg0; ToLua.SetBack(L, 1, obj); return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillId on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_skillLv(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SkillParam obj = (SkillParam)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.skillLv = arg0; ToLua.SetBack(L, 1, obj); return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillLv on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_skillRate(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SkillParam obj = (SkillParam)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.skillRate = arg0; ToLua.SetBack(L, 1, obj); return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillRate on a nil value"); } } }