SceneMgrWrap.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class SceneMgrWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(SceneMgr), typeof(Singleton<SceneMgr>), "SceneMgr");
  9. L.RegFunction("Init", Init);
  10. L.RegFunction("UnInit", UnInit);
  11. L.RegFunction("SetOnSceneLoadedLuaFunc", SetOnSceneLoadedLuaFunc);
  12. L.RegFunction("LoadMainScene", LoadMainScene);
  13. L.RegFunction("AsyncLoadMainScene", AsyncLoadMainScene);
  14. L.RegFunction("AsyncLoadAdditiveScene", AsyncLoadAdditiveScene);
  15. L.RegFunction("RemoveAdditiveScene", RemoveAdditiveScene);
  16. L.RegFunction("RemoveAllAdditiveScene", RemoveAllAdditiveScene);
  17. L.RegFunction("ActiveScene", ActiveScene);
  18. L.RegFunction("New", _CreateSceneMgr);
  19. L.RegFunction("__tostring", ToLua.op_ToString);
  20. L.RegVar("MainSceneName", get_MainSceneName, null);
  21. L.EndClass();
  22. }
  23. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  24. static int _CreateSceneMgr(IntPtr L)
  25. {
  26. try
  27. {
  28. int count = LuaDLL.lua_gettop(L);
  29. if (count == 0)
  30. {
  31. SceneMgr obj = new SceneMgr();
  32. ToLua.PushObject(L, obj);
  33. return 1;
  34. }
  35. else
  36. {
  37. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: SceneMgr.New");
  38. }
  39. }
  40. catch (Exception e)
  41. {
  42. return LuaDLL.toluaL_exception(L, e);
  43. }
  44. }
  45. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  46. static int Init(IntPtr L)
  47. {
  48. try
  49. {
  50. ToLua.CheckArgsCount(L, 1);
  51. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  52. obj.Init();
  53. return 0;
  54. }
  55. catch (Exception e)
  56. {
  57. return LuaDLL.toluaL_exception(L, e);
  58. }
  59. }
  60. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  61. static int UnInit(IntPtr L)
  62. {
  63. try
  64. {
  65. ToLua.CheckArgsCount(L, 1);
  66. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  67. obj.UnInit();
  68. return 0;
  69. }
  70. catch (Exception e)
  71. {
  72. return LuaDLL.toluaL_exception(L, e);
  73. }
  74. }
  75. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  76. static int SetOnSceneLoadedLuaFunc(IntPtr L)
  77. {
  78. try
  79. {
  80. ToLua.CheckArgsCount(L, 2);
  81. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  82. LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2);
  83. obj.SetOnSceneLoadedLuaFunc(arg0);
  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 LoadMainScene(IntPtr L)
  93. {
  94. try
  95. {
  96. ToLua.CheckArgsCount(L, 2);
  97. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  98. string arg0 = ToLua.CheckString(L, 2);
  99. obj.LoadMainScene(arg0);
  100. return 0;
  101. }
  102. catch (Exception e)
  103. {
  104. return LuaDLL.toluaL_exception(L, e);
  105. }
  106. }
  107. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  108. static int AsyncLoadMainScene(IntPtr L)
  109. {
  110. try
  111. {
  112. ToLua.CheckArgsCount(L, 2);
  113. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  114. string arg0 = ToLua.CheckString(L, 2);
  115. obj.AsyncLoadMainScene(arg0);
  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 AsyncLoadAdditiveScene(IntPtr L)
  125. {
  126. try
  127. {
  128. ToLua.CheckArgsCount(L, 2);
  129. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  130. string arg0 = ToLua.CheckString(L, 2);
  131. obj.AsyncLoadAdditiveScene(arg0);
  132. return 0;
  133. }
  134. catch (Exception e)
  135. {
  136. return LuaDLL.toluaL_exception(L, e);
  137. }
  138. }
  139. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  140. static int RemoveAdditiveScene(IntPtr L)
  141. {
  142. try
  143. {
  144. ToLua.CheckArgsCount(L, 2);
  145. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  146. string arg0 = ToLua.CheckString(L, 2);
  147. obj.RemoveAdditiveScene(arg0);
  148. return 0;
  149. }
  150. catch (Exception e)
  151. {
  152. return LuaDLL.toluaL_exception(L, e);
  153. }
  154. }
  155. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  156. static int RemoveAllAdditiveScene(IntPtr L)
  157. {
  158. try
  159. {
  160. ToLua.CheckArgsCount(L, 1);
  161. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  162. obj.RemoveAllAdditiveScene();
  163. return 0;
  164. }
  165. catch (Exception e)
  166. {
  167. return LuaDLL.toluaL_exception(L, e);
  168. }
  169. }
  170. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  171. static int ActiveScene(IntPtr L)
  172. {
  173. try
  174. {
  175. ToLua.CheckArgsCount(L, 2);
  176. SceneMgr obj = (SceneMgr)ToLua.CheckObject<SceneMgr>(L, 1);
  177. string arg0 = ToLua.CheckString(L, 2);
  178. obj.ActiveScene(arg0);
  179. return 0;
  180. }
  181. catch (Exception e)
  182. {
  183. return LuaDLL.toluaL_exception(L, e);
  184. }
  185. }
  186. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  187. static int get_MainSceneName(IntPtr L)
  188. {
  189. object o = null;
  190. try
  191. {
  192. o = ToLua.ToObject(L, 1);
  193. SceneMgr obj = (SceneMgr)o;
  194. string ret = obj.MainSceneName;
  195. LuaDLL.lua_pushstring(L, ret);
  196. return 1;
  197. }
  198. catch(Exception e)
  199. {
  200. return LuaDLL.toluaL_exception(L, e, o, "attempt to index MainSceneName on a nil value");
  201. }
  202. }
  203. }