LuaMgrWrap.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class LuaMgrWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(LuaMgr), typeof(SingletonMono<LuaMgr>), "LuaMgr");
  9. L.RegFunction("InitMgr", InitMgr);
  10. L.RegFunction("Clear", Clear);
  11. L.RegFunction("CallMain", CallMain);
  12. L.RegFunction("StartMain", StartMain);
  13. L.RegFunction("StartMainPrecent", StartMainPrecent);
  14. L.RegFunction("StartMainComplete", StartMainComplete);
  15. L.RegFunction("EnterLogin", EnterLogin);
  16. L.RegFunction("LuaGC", LuaGC);
  17. L.RegFunction("Destroy", Destroy);
  18. L.RegFunction("GetMainState", GetMainState);
  19. L.RegFunction("GetLooper", GetLooper);
  20. L.RegFunction("GetPbFiles", GetPbFiles);
  21. L.RegFunction("AddLuaSearchPath", AddLuaSearchPath);
  22. L.RegFunction("GetLuaTextAsset", GetLuaTextAsset);
  23. L.RegFunction("__eq", op_Equality);
  24. L.RegFunction("__tostring", ToLua.op_ToString);
  25. L.RegVar("luaState", get_luaState, set_luaState);
  26. L.EndClass();
  27. }
  28. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  29. static int InitMgr(IntPtr L)
  30. {
  31. try
  32. {
  33. ToLua.CheckArgsCount(L, 1);
  34. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  35. obj.InitMgr();
  36. return 0;
  37. }
  38. catch (Exception e)
  39. {
  40. return LuaDLL.toluaL_exception(L, e);
  41. }
  42. }
  43. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  44. static int Clear(IntPtr L)
  45. {
  46. try
  47. {
  48. ToLua.CheckArgsCount(L, 1);
  49. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  50. obj.Clear();
  51. return 0;
  52. }
  53. catch (Exception e)
  54. {
  55. return LuaDLL.toluaL_exception(L, e);
  56. }
  57. }
  58. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  59. static int CallMain(IntPtr L)
  60. {
  61. try
  62. {
  63. ToLua.CheckArgsCount(L, 1);
  64. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  65. obj.CallMain();
  66. return 0;
  67. }
  68. catch (Exception e)
  69. {
  70. return LuaDLL.toluaL_exception(L, e);
  71. }
  72. }
  73. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  74. static int StartMain(IntPtr L)
  75. {
  76. try
  77. {
  78. ToLua.CheckArgsCount(L, 1);
  79. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  80. obj.StartMain();
  81. return 0;
  82. }
  83. catch (Exception e)
  84. {
  85. return LuaDLL.toluaL_exception(L, e);
  86. }
  87. }
  88. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  89. static int StartMainPrecent(IntPtr L)
  90. {
  91. try
  92. {
  93. ToLua.CheckArgsCount(L, 2);
  94. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  95. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  96. obj.StartMainPrecent(arg0);
  97. return 0;
  98. }
  99. catch (Exception e)
  100. {
  101. return LuaDLL.toluaL_exception(L, e);
  102. }
  103. }
  104. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  105. static int StartMainComplete(IntPtr L)
  106. {
  107. try
  108. {
  109. ToLua.CheckArgsCount(L, 1);
  110. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  111. obj.StartMainComplete();
  112. return 0;
  113. }
  114. catch (Exception e)
  115. {
  116. return LuaDLL.toluaL_exception(L, e);
  117. }
  118. }
  119. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  120. static int EnterLogin(IntPtr L)
  121. {
  122. try
  123. {
  124. ToLua.CheckArgsCount(L, 2);
  125. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  126. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  127. obj.EnterLogin(arg0);
  128. return 0;
  129. }
  130. catch (Exception e)
  131. {
  132. return LuaDLL.toluaL_exception(L, e);
  133. }
  134. }
  135. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  136. static int LuaGC(IntPtr L)
  137. {
  138. try
  139. {
  140. ToLua.CheckArgsCount(L, 1);
  141. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  142. obj.LuaGC();
  143. return 0;
  144. }
  145. catch (Exception e)
  146. {
  147. return LuaDLL.toluaL_exception(L, e);
  148. }
  149. }
  150. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  151. static int Destroy(IntPtr L)
  152. {
  153. try
  154. {
  155. ToLua.CheckArgsCount(L, 1);
  156. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  157. obj.Destroy();
  158. return 0;
  159. }
  160. catch (Exception e)
  161. {
  162. return LuaDLL.toluaL_exception(L, e);
  163. }
  164. }
  165. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  166. static int GetMainState(IntPtr L)
  167. {
  168. try
  169. {
  170. ToLua.CheckArgsCount(L, 0);
  171. LuaInterface.LuaState o = LuaMgr.GetMainState();
  172. ToLua.PushObject(L, o);
  173. return 1;
  174. }
  175. catch (Exception e)
  176. {
  177. return LuaDLL.toluaL_exception(L, e);
  178. }
  179. }
  180. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  181. static int GetLooper(IntPtr L)
  182. {
  183. try
  184. {
  185. ToLua.CheckArgsCount(L, 1);
  186. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  187. LuaLooper o = obj.GetLooper();
  188. ToLua.Push(L, o);
  189. return 1;
  190. }
  191. catch (Exception e)
  192. {
  193. return LuaDLL.toluaL_exception(L, e);
  194. }
  195. }
  196. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  197. static int GetPbFiles(IntPtr L)
  198. {
  199. try
  200. {
  201. ToLua.CheckArgsCount(L, 1);
  202. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  203. System.Collections.Generic.List<LuaInterface.LuaByteBuffer> o = obj.GetPbFiles();
  204. ToLua.PushSealed(L, o);
  205. return 1;
  206. }
  207. catch (Exception e)
  208. {
  209. return LuaDLL.toluaL_exception(L, e);
  210. }
  211. }
  212. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  213. static int AddLuaSearchPath(IntPtr L)
  214. {
  215. try
  216. {
  217. ToLua.CheckArgsCount(L, 2);
  218. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  219. string arg0 = ToLua.CheckString(L, 2);
  220. obj.AddLuaSearchPath(arg0);
  221. return 0;
  222. }
  223. catch (Exception e)
  224. {
  225. return LuaDLL.toluaL_exception(L, e);
  226. }
  227. }
  228. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  229. static int GetLuaTextAsset(IntPtr L)
  230. {
  231. try
  232. {
  233. ToLua.CheckArgsCount(L, 2);
  234. LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
  235. string arg0 = ToLua.CheckString(L, 2);
  236. byte[] o = obj.GetLuaTextAsset(arg0);
  237. ToLua.Push(L, o);
  238. return 1;
  239. }
  240. catch (Exception e)
  241. {
  242. return LuaDLL.toluaL_exception(L, e);
  243. }
  244. }
  245. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  246. static int op_Equality(IntPtr L)
  247. {
  248. try
  249. {
  250. ToLua.CheckArgsCount(L, 2);
  251. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  252. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  253. bool o = arg0 == arg1;
  254. LuaDLL.lua_pushboolean(L, o);
  255. return 1;
  256. }
  257. catch (Exception e)
  258. {
  259. return LuaDLL.toluaL_exception(L, e);
  260. }
  261. }
  262. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  263. static int get_luaState(IntPtr L)
  264. {
  265. object o = null;
  266. try
  267. {
  268. o = ToLua.ToObject(L, 1);
  269. LuaMgr obj = (LuaMgr)o;
  270. LuaInterface.LuaState ret = obj.luaState;
  271. ToLua.PushObject(L, ret);
  272. return 1;
  273. }
  274. catch(Exception e)
  275. {
  276. return LuaDLL.toluaL_exception(L, e, o, "attempt to index luaState on a nil value");
  277. }
  278. }
  279. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  280. static int set_luaState(IntPtr L)
  281. {
  282. object o = null;
  283. try
  284. {
  285. o = ToLua.ToObject(L, 1);
  286. LuaMgr obj = (LuaMgr)o;
  287. LuaInterface.LuaState arg0 = (LuaInterface.LuaState)ToLua.CheckObject<LuaInterface.LuaState>(L, 2);
  288. obj.luaState = arg0;
  289. return 0;
  290. }
  291. catch(Exception e)
  292. {
  293. return LuaDLL.toluaL_exception(L, e, o, "attempt to index luaState on a nil value");
  294. }
  295. }
  296. }