源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

217 lines
5.5 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_AsyncOperationWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(UnityEngine.AsyncOperation), typeof(System.Object));
  9. L.RegFunction("New", _CreateUnityEngine_AsyncOperation);
  10. L.RegFunction("__tostring", ToLua.op_ToString);
  11. L.RegVar("isDone", get_isDone, null);
  12. L.RegVar("progress", get_progress, null);
  13. L.RegVar("priority", get_priority, set_priority);
  14. L.RegVar("allowSceneActivation", get_allowSceneActivation, set_allowSceneActivation);
  15. L.RegVar("completed", get_completed, set_completed);
  16. L.EndClass();
  17. }
  18. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  19. static int _CreateUnityEngine_AsyncOperation(IntPtr L)
  20. {
  21. try
  22. {
  23. int count = LuaDLL.lua_gettop(L);
  24. if (count == 0)
  25. {
  26. UnityEngine.AsyncOperation obj = new UnityEngine.AsyncOperation();
  27. ToLua.PushObject(L, obj);
  28. return 1;
  29. }
  30. else
  31. {
  32. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.AsyncOperation.New");
  33. }
  34. }
  35. catch(Exception e)
  36. {
  37. return LuaDLL.toluaL_exception(L, e);
  38. }
  39. }
  40. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  41. static int get_isDone(IntPtr L)
  42. {
  43. object o = null;
  44. try
  45. {
  46. o = ToLua.ToObject(L, 1);
  47. UnityEngine.AsyncOperation obj = (UnityEngine.AsyncOperation)o;
  48. bool ret = obj.isDone;
  49. LuaDLL.lua_pushboolean(L, ret);
  50. return 1;
  51. }
  52. catch(Exception e)
  53. {
  54. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isDone on a nil value" : e.Message);
  55. }
  56. }
  57. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  58. static int get_progress(IntPtr L)
  59. {
  60. object o = null;
  61. try
  62. {
  63. o = ToLua.ToObject(L, 1);
  64. UnityEngine.AsyncOperation obj = (UnityEngine.AsyncOperation)o;
  65. float ret = obj.progress;
  66. LuaDLL.lua_pushnumber(L, ret);
  67. return 1;
  68. }
  69. catch(Exception e)
  70. {
  71. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index progress on a nil value" : e.Message);
  72. }
  73. }
  74. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  75. static int get_priority(IntPtr L)
  76. {
  77. object o = null;
  78. try
  79. {
  80. o = ToLua.ToObject(L, 1);
  81. UnityEngine.AsyncOperation obj = (UnityEngine.AsyncOperation)o;
  82. int ret = obj.priority;
  83. LuaDLL.lua_pushinteger(L, ret);
  84. return 1;
  85. }
  86. catch(Exception e)
  87. {
  88. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index priority on a nil value" : e.Message);
  89. }
  90. }
  91. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  92. static int get_allowSceneActivation(IntPtr L)
  93. {
  94. object o = null;
  95. try
  96. {
  97. o = ToLua.ToObject(L, 1);
  98. UnityEngine.AsyncOperation obj = (UnityEngine.AsyncOperation)o;
  99. bool ret = obj.allowSceneActivation;
  100. LuaDLL.lua_pushboolean(L, ret);
  101. return 1;
  102. }
  103. catch(Exception e)
  104. {
  105. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index allowSceneActivation on a nil value" : e.Message);
  106. }
  107. }
  108. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  109. static int get_completed(IntPtr L)
  110. {
  111. ToLua.Push(L, new EventObject("UnityEngine.AsyncOperation.completed"));
  112. return 1;
  113. }
  114. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  115. static int set_priority(IntPtr L)
  116. {
  117. object o = null;
  118. try
  119. {
  120. o = ToLua.ToObject(L, 1);
  121. UnityEngine.AsyncOperation obj = (UnityEngine.AsyncOperation)o;
  122. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  123. obj.priority = arg0;
  124. return 0;
  125. }
  126. catch(Exception e)
  127. {
  128. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index priority on a nil value" : e.Message);
  129. }
  130. }
  131. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  132. static int set_allowSceneActivation(IntPtr L)
  133. {
  134. object o = null;
  135. try
  136. {
  137. o = ToLua.ToObject(L, 1);
  138. UnityEngine.AsyncOperation obj = (UnityEngine.AsyncOperation)o;
  139. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  140. obj.allowSceneActivation = arg0;
  141. return 0;
  142. }
  143. catch(Exception e)
  144. {
  145. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index allowSceneActivation on a nil value" : e.Message);
  146. }
  147. }
  148. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  149. static int set_completed(IntPtr L)
  150. {
  151. try
  152. {
  153. UnityEngine.AsyncOperation obj = (UnityEngine.AsyncOperation)ToLua.CheckObject(L, 1, typeof(UnityEngine.AsyncOperation));
  154. EventObject arg0 = null;
  155. if (LuaDLL.lua_isuserdata(L, 2) != 0)
  156. {
  157. arg0 = (EventObject)ToLua.ToObject(L, 2);
  158. }
  159. else
  160. {
  161. return LuaDLL.luaL_throw(L, "The event 'UnityEngine.AsyncOperation.completed' can only appear on the left hand side of += or -= when used outside of the type 'UnityEngine.AsyncOperation'");
  162. }
  163. if (arg0.op == EventOp.Add)
  164. {
  165. System.Action<UnityEngine.AsyncOperation> ev = (System.Action<UnityEngine.AsyncOperation>)DelegateFactory.CreateDelegate(typeof(System.Action<UnityEngine.AsyncOperation>), arg0.func);
  166. obj.completed += ev;
  167. }
  168. else if (arg0.op == EventOp.Sub)
  169. {
  170. System.Action<UnityEngine.AsyncOperation> ev = (System.Action<UnityEngine.AsyncOperation>)LuaMisc.GetEventHandler(obj, typeof(UnityEngine.AsyncOperation), "completed");
  171. Delegate[] ds = ev.GetInvocationList();
  172. LuaState state = LuaState.Get(L);
  173. for (int i = 0; i < ds.Length; i++)
  174. {
  175. ev = (System.Action<UnityEngine.AsyncOperation>)ds[i];
  176. LuaDelegate ld = ev.Target as LuaDelegate;
  177. if (ld != null && ld.func == arg0.func)
  178. {
  179. obj.completed -= ev;
  180. state.DelayDispose(ld.func);
  181. break;
  182. }
  183. }
  184. arg0.func.Dispose();
  185. }
  186. return 0;
  187. }
  188. catch(Exception e)
  189. {
  190. return LuaDLL.toluaL_exception(L, e);
  191. }
  192. }
  193. }