BattleStatisticsWrap.cs 5.5 KB

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