源战役客户端
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.

506 lines
15 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_ComponentWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(UnityEngine.Component), typeof(UnityEngine.Object));
  9. L.RegFunction("GetComponent", GetComponent);
  10. L.RegFunction("GetComponentInChildren", GetComponentInChildren);
  11. L.RegFunction("GetComponentsInChildren", GetComponentsInChildren);
  12. L.RegFunction("GetComponentInParent", GetComponentInParent);
  13. L.RegFunction("GetComponentsInParent", GetComponentsInParent);
  14. L.RegFunction("GetComponents", GetComponents);
  15. L.RegFunction("CompareTag", CompareTag);
  16. L.RegFunction("SendMessageUpwards", SendMessageUpwards);
  17. L.RegFunction("SendMessage", SendMessage);
  18. L.RegFunction("BroadcastMessage", BroadcastMessage);
  19. L.RegFunction("New", _CreateUnityEngine_Component);
  20. L.RegFunction("__eq", op_Equality);
  21. L.RegFunction("__tostring", ToLua.op_ToString);
  22. L.RegVar("transform", get_transform, null);
  23. L.RegVar("gameObject", get_gameObject, null);
  24. L.RegVar("tag", get_tag, set_tag);
  25. L.EndClass();
  26. }
  27. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  28. static int _CreateUnityEngine_Component(IntPtr L)
  29. {
  30. try
  31. {
  32. int count = LuaDLL.lua_gettop(L);
  33. if (count == 0)
  34. {
  35. UnityEngine.Component obj = new UnityEngine.Component();
  36. ToLua.Push(L, obj);
  37. return 1;
  38. }
  39. else
  40. {
  41. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.Component.New");
  42. }
  43. }
  44. catch(Exception e)
  45. {
  46. return LuaDLL.toluaL_exception(L, e);
  47. }
  48. }
  49. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  50. static int GetComponent(IntPtr L)
  51. {
  52. try
  53. {
  54. int count = LuaDLL.lua_gettop(L);
  55. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type)))
  56. {
  57. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  58. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  59. UnityEngine.Component o = obj.GetComponent(arg0);
  60. ToLua.Push(L, o);
  61. return 1;
  62. }
  63. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string)))
  64. {
  65. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  66. string arg0 = ToLua.ToString(L, 2);
  67. UnityEngine.Component o = obj.GetComponent(arg0);
  68. ToLua.Push(L, o);
  69. return 1;
  70. }
  71. else
  72. {
  73. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.GetComponent");
  74. }
  75. }
  76. catch(Exception e)
  77. {
  78. return LuaDLL.toluaL_exception(L, e);
  79. }
  80. }
  81. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  82. static int GetComponentInChildren(IntPtr L)
  83. {
  84. try
  85. {
  86. int count = LuaDLL.lua_gettop(L);
  87. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type)))
  88. {
  89. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  90. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  91. UnityEngine.Component o = obj.GetComponentInChildren(arg0);
  92. ToLua.Push(L, o);
  93. return 1;
  94. }
  95. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type), typeof(bool)))
  96. {
  97. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  98. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  99. bool arg1 = LuaDLL.lua_toboolean(L, 3);
  100. UnityEngine.Component o = obj.GetComponentInChildren(arg0, arg1);
  101. ToLua.Push(L, o);
  102. return 1;
  103. }
  104. else
  105. {
  106. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.GetComponentInChildren");
  107. }
  108. }
  109. catch(Exception e)
  110. {
  111. return LuaDLL.toluaL_exception(L, e);
  112. }
  113. }
  114. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  115. static int GetComponentsInChildren(IntPtr L)
  116. {
  117. try
  118. {
  119. int count = LuaDLL.lua_gettop(L);
  120. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type)))
  121. {
  122. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  123. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  124. UnityEngine.Component[] o = obj.GetComponentsInChildren(arg0);
  125. ToLua.Push(L, o);
  126. return 1;
  127. }
  128. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type), typeof(bool)))
  129. {
  130. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  131. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  132. bool arg1 = LuaDLL.lua_toboolean(L, 3);
  133. UnityEngine.Component[] o = obj.GetComponentsInChildren(arg0, arg1);
  134. ToLua.Push(L, o);
  135. return 1;
  136. }
  137. else
  138. {
  139. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.GetComponentsInChildren");
  140. }
  141. }
  142. catch(Exception e)
  143. {
  144. return LuaDLL.toluaL_exception(L, e);
  145. }
  146. }
  147. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  148. static int GetComponentInParent(IntPtr L)
  149. {
  150. try
  151. {
  152. ToLua.CheckArgsCount(L, 2);
  153. UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject(L, 1, typeof(UnityEngine.Component));
  154. System.Type arg0 = (System.Type)ToLua.CheckObject(L, 2, typeof(System.Type));
  155. UnityEngine.Component o = obj.GetComponentInParent(arg0);
  156. ToLua.Push(L, o);
  157. return 1;
  158. }
  159. catch(Exception e)
  160. {
  161. return LuaDLL.toluaL_exception(L, e);
  162. }
  163. }
  164. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  165. static int GetComponentsInParent(IntPtr L)
  166. {
  167. try
  168. {
  169. int count = LuaDLL.lua_gettop(L);
  170. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type)))
  171. {
  172. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  173. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  174. UnityEngine.Component[] o = obj.GetComponentsInParent(arg0);
  175. ToLua.Push(L, o);
  176. return 1;
  177. }
  178. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type), typeof(bool)))
  179. {
  180. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  181. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  182. bool arg1 = LuaDLL.lua_toboolean(L, 3);
  183. UnityEngine.Component[] o = obj.GetComponentsInParent(arg0, arg1);
  184. ToLua.Push(L, o);
  185. return 1;
  186. }
  187. else
  188. {
  189. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.GetComponentsInParent");
  190. }
  191. }
  192. catch(Exception e)
  193. {
  194. return LuaDLL.toluaL_exception(L, e);
  195. }
  196. }
  197. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  198. static int GetComponents(IntPtr L)
  199. {
  200. try
  201. {
  202. int count = LuaDLL.lua_gettop(L);
  203. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type)))
  204. {
  205. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  206. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  207. UnityEngine.Component[] o = obj.GetComponents(arg0);
  208. ToLua.Push(L, o);
  209. return 1;
  210. }
  211. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(System.Type), typeof(System.Collections.Generic.List<UnityEngine.Component>)))
  212. {
  213. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  214. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  215. System.Collections.Generic.List<UnityEngine.Component> arg1 = (System.Collections.Generic.List<UnityEngine.Component>)ToLua.ToObject(L, 3);
  216. obj.GetComponents(arg0, arg1);
  217. return 0;
  218. }
  219. else
  220. {
  221. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.GetComponents");
  222. }
  223. }
  224. catch(Exception e)
  225. {
  226. return LuaDLL.toluaL_exception(L, e);
  227. }
  228. }
  229. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  230. static int CompareTag(IntPtr L)
  231. {
  232. try
  233. {
  234. ToLua.CheckArgsCount(L, 2);
  235. UnityEngine.Component obj = (UnityEngine.Component)ToLua.CheckObject(L, 1, typeof(UnityEngine.Component));
  236. string arg0 = ToLua.CheckString(L, 2);
  237. bool o = obj.CompareTag(arg0);
  238. LuaDLL.lua_pushboolean(L, o);
  239. return 1;
  240. }
  241. catch(Exception e)
  242. {
  243. return LuaDLL.toluaL_exception(L, e);
  244. }
  245. }
  246. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  247. static int SendMessageUpwards(IntPtr L)
  248. {
  249. try
  250. {
  251. int count = LuaDLL.lua_gettop(L);
  252. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string)))
  253. {
  254. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  255. string arg0 = ToLua.ToString(L, 2);
  256. obj.SendMessageUpwards(arg0);
  257. return 0;
  258. }
  259. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(UnityEngine.SendMessageOptions)))
  260. {
  261. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  262. string arg0 = ToLua.ToString(L, 2);
  263. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  264. obj.SendMessageUpwards(arg0, arg1);
  265. return 0;
  266. }
  267. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object)))
  268. {
  269. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  270. string arg0 = ToLua.ToString(L, 2);
  271. object arg1 = ToLua.ToVarObject(L, 3);
  272. obj.SendMessageUpwards(arg0, arg1);
  273. return 0;
  274. }
  275. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
  276. {
  277. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  278. string arg0 = ToLua.ToString(L, 2);
  279. object arg1 = ToLua.ToVarObject(L, 3);
  280. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  281. obj.SendMessageUpwards(arg0, arg1, arg2);
  282. return 0;
  283. }
  284. else
  285. {
  286. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.SendMessageUpwards");
  287. }
  288. }
  289. catch(Exception e)
  290. {
  291. return LuaDLL.toluaL_exception(L, e);
  292. }
  293. }
  294. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  295. static int SendMessage(IntPtr L)
  296. {
  297. try
  298. {
  299. int count = LuaDLL.lua_gettop(L);
  300. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string)))
  301. {
  302. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  303. string arg0 = ToLua.ToString(L, 2);
  304. obj.SendMessage(arg0);
  305. return 0;
  306. }
  307. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(UnityEngine.SendMessageOptions)))
  308. {
  309. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  310. string arg0 = ToLua.ToString(L, 2);
  311. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  312. obj.SendMessage(arg0, arg1);
  313. return 0;
  314. }
  315. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object)))
  316. {
  317. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  318. string arg0 = ToLua.ToString(L, 2);
  319. object arg1 = ToLua.ToVarObject(L, 3);
  320. obj.SendMessage(arg0, arg1);
  321. return 0;
  322. }
  323. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
  324. {
  325. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  326. string arg0 = ToLua.ToString(L, 2);
  327. object arg1 = ToLua.ToVarObject(L, 3);
  328. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  329. obj.SendMessage(arg0, arg1, arg2);
  330. return 0;
  331. }
  332. else
  333. {
  334. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.SendMessage");
  335. }
  336. }
  337. catch(Exception e)
  338. {
  339. return LuaDLL.toluaL_exception(L, e);
  340. }
  341. }
  342. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  343. static int BroadcastMessage(IntPtr L)
  344. {
  345. try
  346. {
  347. int count = LuaDLL.lua_gettop(L);
  348. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string)))
  349. {
  350. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  351. string arg0 = ToLua.ToString(L, 2);
  352. obj.BroadcastMessage(arg0);
  353. return 0;
  354. }
  355. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(UnityEngine.SendMessageOptions)))
  356. {
  357. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  358. string arg0 = ToLua.ToString(L, 2);
  359. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  360. obj.BroadcastMessage(arg0, arg1);
  361. return 0;
  362. }
  363. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object)))
  364. {
  365. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  366. string arg0 = ToLua.ToString(L, 2);
  367. object arg1 = ToLua.ToVarObject(L, 3);
  368. obj.BroadcastMessage(arg0, arg1);
  369. return 0;
  370. }
  371. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.Component), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
  372. {
  373. UnityEngine.Component obj = (UnityEngine.Component)ToLua.ToObject(L, 1);
  374. string arg0 = ToLua.ToString(L, 2);
  375. object arg1 = ToLua.ToVarObject(L, 3);
  376. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  377. obj.BroadcastMessage(arg0, arg1, arg2);
  378. return 0;
  379. }
  380. else
  381. {
  382. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Component.BroadcastMessage");
  383. }
  384. }
  385. catch(Exception e)
  386. {
  387. return LuaDLL.toluaL_exception(L, e);
  388. }
  389. }
  390. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  391. static int op_Equality(IntPtr L)
  392. {
  393. try
  394. {
  395. ToLua.CheckArgsCount(L, 2);
  396. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  397. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  398. bool o = arg0 == arg1;
  399. LuaDLL.lua_pushboolean(L, o);
  400. return 1;
  401. }
  402. catch(Exception e)
  403. {
  404. return LuaDLL.toluaL_exception(L, e);
  405. }
  406. }
  407. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  408. static int get_transform(IntPtr L)
  409. {
  410. object o = null;
  411. try
  412. {
  413. o = ToLua.ToObject(L, 1);
  414. UnityEngine.Component obj = (UnityEngine.Component)o;
  415. UnityEngine.Transform ret = obj.transform;
  416. ToLua.Push(L, ret);
  417. return 1;
  418. }
  419. catch(Exception e)
  420. {
  421. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index transform on a nil value" : e.Message);
  422. }
  423. }
  424. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  425. static int get_gameObject(IntPtr L)
  426. {
  427. object o = null;
  428. try
  429. {
  430. o = ToLua.ToObject(L, 1);
  431. UnityEngine.Component obj = (UnityEngine.Component)o;
  432. UnityEngine.GameObject ret = obj.gameObject;
  433. ToLua.Push(L, ret);
  434. return 1;
  435. }
  436. catch(Exception e)
  437. {
  438. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index gameObject on a nil value" : e.Message);
  439. }
  440. }
  441. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  442. static int get_tag(IntPtr L)
  443. {
  444. object o = null;
  445. try
  446. {
  447. o = ToLua.ToObject(L, 1);
  448. UnityEngine.Component obj = (UnityEngine.Component)o;
  449. string ret = obj.tag;
  450. LuaDLL.lua_pushstring(L, ret);
  451. return 1;
  452. }
  453. catch(Exception e)
  454. {
  455. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index tag on a nil value" : e.Message);
  456. }
  457. }
  458. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  459. static int set_tag(IntPtr L)
  460. {
  461. object o = null;
  462. try
  463. {
  464. o = ToLua.ToObject(L, 1);
  465. UnityEngine.Component obj = (UnityEngine.Component)o;
  466. string arg0 = ToLua.CheckString(L, 2);
  467. obj.tag = arg0;
  468. return 0;
  469. }
  470. catch(Exception e)
  471. {
  472. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index tag on a nil value" : e.Message);
  473. }
  474. }
  475. }