SkillParamWrap.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class SkillParamWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(SkillParam), null, "SkillParam");
  9. L.RegFunction("ToJson", ToJson);
  10. L.RegFunction("New", _CreateSkillParam);
  11. L.RegFunction("__tostring", ToLua.op_ToString);
  12. L.RegVar("skillId", get_skillId, set_skillId);
  13. L.RegVar("skillLv", get_skillLv, set_skillLv);
  14. L.RegVar("skillRate", get_skillRate, set_skillRate);
  15. L.EndClass();
  16. }
  17. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  18. static int _CreateSkillParam(IntPtr L)
  19. {
  20. try
  21. {
  22. int count = LuaDLL.lua_gettop(L);
  23. if (count == 1)
  24. {
  25. JSONObject arg0 = (JSONObject)ToLua.CheckObject<JSONObject>(L, 1);
  26. SkillParam obj = new SkillParam(arg0);
  27. ToLua.PushValue(L, obj);
  28. return 1;
  29. }
  30. else if (count == 2)
  31. {
  32. int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
  33. int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
  34. SkillParam obj = new SkillParam(arg0, arg1);
  35. ToLua.PushValue(L, obj);
  36. return 1;
  37. }
  38. else if (count == 3)
  39. {
  40. int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
  41. int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
  42. int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
  43. SkillParam obj = new SkillParam(arg0, arg1, arg2);
  44. ToLua.PushValue(L, obj);
  45. return 1;
  46. }
  47. else if (count == 0)
  48. {
  49. SkillParam obj = new SkillParam();
  50. ToLua.PushValue(L, obj);
  51. return 1;
  52. }
  53. else
  54. {
  55. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: SkillParam.New");
  56. }
  57. }
  58. catch (Exception e)
  59. {
  60. return LuaDLL.toluaL_exception(L, e);
  61. }
  62. }
  63. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  64. static int ToJson(IntPtr L)
  65. {
  66. try
  67. {
  68. ToLua.CheckArgsCount(L, 1);
  69. SkillParam obj = (SkillParam)ToLua.CheckObject(L, 1, typeof(SkillParam));
  70. JSONObject o = obj.ToJson();
  71. ToLua.PushObject(L, o);
  72. ToLua.SetBack(L, 1, obj);
  73. return 1;
  74. }
  75. catch (Exception e)
  76. {
  77. return LuaDLL.toluaL_exception(L, e);
  78. }
  79. }
  80. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  81. static int get_skillId(IntPtr L)
  82. {
  83. object o = null;
  84. try
  85. {
  86. o = ToLua.ToObject(L, 1);
  87. SkillParam obj = (SkillParam)o;
  88. int ret = obj.skillId;
  89. LuaDLL.lua_pushinteger(L, ret);
  90. return 1;
  91. }
  92. catch(Exception e)
  93. {
  94. return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillId on a nil value");
  95. }
  96. }
  97. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  98. static int get_skillLv(IntPtr L)
  99. {
  100. object o = null;
  101. try
  102. {
  103. o = ToLua.ToObject(L, 1);
  104. SkillParam obj = (SkillParam)o;
  105. int ret = obj.skillLv;
  106. LuaDLL.lua_pushinteger(L, ret);
  107. return 1;
  108. }
  109. catch(Exception e)
  110. {
  111. return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillLv on a nil value");
  112. }
  113. }
  114. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  115. static int get_skillRate(IntPtr L)
  116. {
  117. object o = null;
  118. try
  119. {
  120. o = ToLua.ToObject(L, 1);
  121. SkillParam obj = (SkillParam)o;
  122. int ret = obj.skillRate;
  123. LuaDLL.lua_pushinteger(L, ret);
  124. return 1;
  125. }
  126. catch(Exception e)
  127. {
  128. return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillRate on a nil value");
  129. }
  130. }
  131. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  132. static int set_skillId(IntPtr L)
  133. {
  134. object o = null;
  135. try
  136. {
  137. o = ToLua.ToObject(L, 1);
  138. SkillParam obj = (SkillParam)o;
  139. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  140. obj.skillId = arg0;
  141. ToLua.SetBack(L, 1, obj);
  142. return 0;
  143. }
  144. catch(Exception e)
  145. {
  146. return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillId on a nil value");
  147. }
  148. }
  149. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  150. static int set_skillLv(IntPtr L)
  151. {
  152. object o = null;
  153. try
  154. {
  155. o = ToLua.ToObject(L, 1);
  156. SkillParam obj = (SkillParam)o;
  157. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  158. obj.skillLv = arg0;
  159. ToLua.SetBack(L, 1, obj);
  160. return 0;
  161. }
  162. catch(Exception e)
  163. {
  164. return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillLv on a nil value");
  165. }
  166. }
  167. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  168. static int set_skillRate(IntPtr L)
  169. {
  170. object o = null;
  171. try
  172. {
  173. o = ToLua.ToObject(L, 1);
  174. SkillParam obj = (SkillParam)o;
  175. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  176. obj.skillRate = arg0;
  177. ToLua.SetBack(L, 1, obj);
  178. return 0;
  179. }
  180. catch(Exception e)
  181. {
  182. return LuaDLL.toluaL_exception(L, e, o, "attempt to index skillRate on a nil value");
  183. }
  184. }
  185. }