ServerFighterParamWrap.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class ServerFighterParamWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(ServerFighterParam), typeof(System.Object));
  9. L.RegFunction("New", _CreateServerFighterParam);
  10. L.RegFunction("__tostring", ToLua.op_ToString);
  11. L.RegVar("uid", get_uid, set_uid);
  12. L.RegVar("hp", get_hp, set_hp);
  13. L.RegVar("sp", get_sp, set_sp);
  14. L.RegVar("hpPercent", get_hpPercent, set_hpPercent);
  15. L.RegVar("spPercent", get_spPercent, set_spPercent);
  16. L.EndClass();
  17. }
  18. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  19. static int _CreateServerFighterParam(IntPtr L)
  20. {
  21. try
  22. {
  23. int count = LuaDLL.lua_gettop(L);
  24. if (count == 5)
  25. {
  26. long arg0 = LuaDLL.tolua_checkint64(L, 1);
  27. int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
  28. int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
  29. float arg3 = (float)LuaDLL.luaL_checknumber(L, 4);
  30. float arg4 = (float)LuaDLL.luaL_checknumber(L, 5);
  31. ServerFighterParam obj = new ServerFighterParam(arg0, arg1, arg2, arg3, arg4);
  32. ToLua.PushObject(L, obj);
  33. return 1;
  34. }
  35. else
  36. {
  37. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: ServerFighterParam.New");
  38. }
  39. }
  40. catch (Exception e)
  41. {
  42. return LuaDLL.toluaL_exception(L, e);
  43. }
  44. }
  45. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  46. static int get_uid(IntPtr L)
  47. {
  48. object o = null;
  49. try
  50. {
  51. o = ToLua.ToObject(L, 1);
  52. ServerFighterParam obj = (ServerFighterParam)o;
  53. long ret = obj.uid;
  54. LuaDLL.tolua_pushint64(L, ret);
  55. return 1;
  56. }
  57. catch(Exception e)
  58. {
  59. return LuaDLL.toluaL_exception(L, e, o, "attempt to index uid on a nil value");
  60. }
  61. }
  62. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  63. static int get_hp(IntPtr L)
  64. {
  65. object o = null;
  66. try
  67. {
  68. o = ToLua.ToObject(L, 1);
  69. ServerFighterParam obj = (ServerFighterParam)o;
  70. int ret = obj.hp;
  71. LuaDLL.lua_pushinteger(L, ret);
  72. return 1;
  73. }
  74. catch(Exception e)
  75. {
  76. return LuaDLL.toluaL_exception(L, e, o, "attempt to index hp on a nil value");
  77. }
  78. }
  79. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  80. static int get_sp(IntPtr L)
  81. {
  82. object o = null;
  83. try
  84. {
  85. o = ToLua.ToObject(L, 1);
  86. ServerFighterParam obj = (ServerFighterParam)o;
  87. int ret = obj.sp;
  88. LuaDLL.lua_pushinteger(L, ret);
  89. return 1;
  90. }
  91. catch(Exception e)
  92. {
  93. return LuaDLL.toluaL_exception(L, e, o, "attempt to index sp on a nil value");
  94. }
  95. }
  96. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  97. static int get_hpPercent(IntPtr L)
  98. {
  99. object o = null;
  100. try
  101. {
  102. o = ToLua.ToObject(L, 1);
  103. ServerFighterParam obj = (ServerFighterParam)o;
  104. float ret = obj.hpPercent;
  105. LuaDLL.lua_pushnumber(L, ret);
  106. return 1;
  107. }
  108. catch(Exception e)
  109. {
  110. return LuaDLL.toluaL_exception(L, e, o, "attempt to index hpPercent on a nil value");
  111. }
  112. }
  113. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  114. static int get_spPercent(IntPtr L)
  115. {
  116. object o = null;
  117. try
  118. {
  119. o = ToLua.ToObject(L, 1);
  120. ServerFighterParam obj = (ServerFighterParam)o;
  121. float ret = obj.spPercent;
  122. LuaDLL.lua_pushnumber(L, ret);
  123. return 1;
  124. }
  125. catch(Exception e)
  126. {
  127. return LuaDLL.toluaL_exception(L, e, o, "attempt to index spPercent on a nil value");
  128. }
  129. }
  130. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  131. static int set_uid(IntPtr L)
  132. {
  133. object o = null;
  134. try
  135. {
  136. o = ToLua.ToObject(L, 1);
  137. ServerFighterParam obj = (ServerFighterParam)o;
  138. long arg0 = LuaDLL.tolua_checkint64(L, 2);
  139. obj.uid = arg0;
  140. return 0;
  141. }
  142. catch(Exception e)
  143. {
  144. return LuaDLL.toluaL_exception(L, e, o, "attempt to index uid on a nil value");
  145. }
  146. }
  147. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  148. static int set_hp(IntPtr L)
  149. {
  150. object o = null;
  151. try
  152. {
  153. o = ToLua.ToObject(L, 1);
  154. ServerFighterParam obj = (ServerFighterParam)o;
  155. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  156. obj.hp = arg0;
  157. return 0;
  158. }
  159. catch(Exception e)
  160. {
  161. return LuaDLL.toluaL_exception(L, e, o, "attempt to index hp on a nil value");
  162. }
  163. }
  164. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  165. static int set_sp(IntPtr L)
  166. {
  167. object o = null;
  168. try
  169. {
  170. o = ToLua.ToObject(L, 1);
  171. ServerFighterParam obj = (ServerFighterParam)o;
  172. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  173. obj.sp = arg0;
  174. return 0;
  175. }
  176. catch(Exception e)
  177. {
  178. return LuaDLL.toluaL_exception(L, e, o, "attempt to index sp on a nil value");
  179. }
  180. }
  181. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  182. static int set_hpPercent(IntPtr L)
  183. {
  184. object o = null;
  185. try
  186. {
  187. o = ToLua.ToObject(L, 1);
  188. ServerFighterParam obj = (ServerFighterParam)o;
  189. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  190. obj.hpPercent = arg0;
  191. return 0;
  192. }
  193. catch(Exception e)
  194. {
  195. return LuaDLL.toluaL_exception(L, e, o, "attempt to index hpPercent on a nil value");
  196. }
  197. }
  198. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  199. static int set_spPercent(IntPtr L)
  200. {
  201. object o = null;
  202. try
  203. {
  204. o = ToLua.ToObject(L, 1);
  205. ServerFighterParam obj = (ServerFighterParam)o;
  206. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  207. obj.spPercent = arg0;
  208. return 0;
  209. }
  210. catch(Exception e)
  211. {
  212. return LuaDLL.toluaL_exception(L, e, o, "attempt to index spPercent on a nil value");
  213. }
  214. }
  215. }