BattleEndConditionWrap.cs 4.8 KB

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