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

824 lines
24 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_GameObjectWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(UnityEngine.GameObject), typeof(UnityEngine.Object));
  9. L.RegFunction("CreatePrimitive", CreatePrimitive);
  10. L.RegFunction("GetComponent", GetComponent);
  11. L.RegFunction("GetComponentInChildren", GetComponentInChildren);
  12. L.RegFunction("GetComponentInParent", GetComponentInParent);
  13. L.RegFunction("GetComponents", GetComponents);
  14. L.RegFunction("GetComponentsInChildren", GetComponentsInChildren);
  15. L.RegFunction("GetComponentsInParent", GetComponentsInParent);
  16. L.RegFunction("FindWithTag", FindWithTag);
  17. L.RegFunction("SendMessageUpwards", SendMessageUpwards);
  18. L.RegFunction("BroadcastMessage", BroadcastMessage);
  19. L.RegFunction("AddComponent", AddComponent);
  20. L.RegFunction("SetActive", SetActive);
  21. L.RegFunction("CompareTag", CompareTag);
  22. L.RegFunction("FindGameObjectWithTag", FindGameObjectWithTag);
  23. L.RegFunction("FindGameObjectsWithTag", FindGameObjectsWithTag);
  24. L.RegFunction("Find", Find);
  25. L.RegFunction("SendMessage", SendMessage);
  26. L.RegFunction("New", _CreateUnityEngine_GameObject);
  27. L.RegFunction("__eq", op_Equality);
  28. L.RegFunction("__tostring", ToLua.op_ToString);
  29. L.RegVar("transform", get_transform, null);
  30. L.RegVar("layer", get_layer, set_layer);
  31. L.RegVar("activeSelf", get_activeSelf, null);
  32. L.RegVar("activeInHierarchy", get_activeInHierarchy, null);
  33. L.RegVar("isStatic", get_isStatic, set_isStatic);
  34. L.RegVar("tag", get_tag, set_tag);
  35. L.RegVar("scene", get_scene, null);
  36. L.RegVar("gameObject", get_gameObject, null);
  37. L.EndClass();
  38. }
  39. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  40. static int _CreateUnityEngine_GameObject(IntPtr L)
  41. {
  42. try
  43. {
  44. int count = LuaDLL.lua_gettop(L);
  45. if (count == 0)
  46. {
  47. UnityEngine.GameObject obj = new UnityEngine.GameObject();
  48. ToLua.Push(L, obj);
  49. return 1;
  50. }
  51. else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  52. {
  53. string arg0 = ToLua.CheckString(L, 1);
  54. UnityEngine.GameObject obj = new UnityEngine.GameObject(arg0);
  55. ToLua.Push(L, obj);
  56. return 1;
  57. }
  58. else if (TypeChecker.CheckTypes(L, 1, typeof(string)) && TypeChecker.CheckParamsType(L, typeof(System.Type), 2, count - 1))
  59. {
  60. string arg0 = ToLua.CheckString(L, 1);
  61. System.Type[] arg1 = ToLua.CheckParamsObject<System.Type>(L, 2, count - 1);
  62. UnityEngine.GameObject obj = new UnityEngine.GameObject(arg0, arg1);
  63. ToLua.Push(L, obj);
  64. return 1;
  65. }
  66. else
  67. {
  68. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.GameObject.New");
  69. }
  70. }
  71. catch(Exception e)
  72. {
  73. return LuaDLL.toluaL_exception(L, e);
  74. }
  75. }
  76. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  77. static int CreatePrimitive(IntPtr L)
  78. {
  79. try
  80. {
  81. ToLua.CheckArgsCount(L, 1);
  82. UnityEngine.PrimitiveType arg0 = (UnityEngine.PrimitiveType)ToLua.CheckObject(L, 1, typeof(UnityEngine.PrimitiveType));
  83. UnityEngine.GameObject o = UnityEngine.GameObject.CreatePrimitive(arg0);
  84. ToLua.Push(L, o);
  85. return 1;
  86. }
  87. catch(Exception e)
  88. {
  89. return LuaDLL.toluaL_exception(L, e);
  90. }
  91. }
  92. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  93. static int GetComponent(IntPtr L)
  94. {
  95. try
  96. {
  97. int count = LuaDLL.lua_gettop(L);
  98. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type)))
  99. {
  100. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  101. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  102. UnityEngine.Component o = obj.GetComponent(arg0);
  103. ToLua.Push(L, o);
  104. return 1;
  105. }
  106. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string)))
  107. {
  108. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  109. string arg0 = ToLua.ToString(L, 2);
  110. UnityEngine.Component o = obj.GetComponent(arg0);
  111. ToLua.Push(L, o);
  112. return 1;
  113. }
  114. else
  115. {
  116. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponent");
  117. }
  118. }
  119. catch(Exception e)
  120. {
  121. return LuaDLL.toluaL_exception(L, e);
  122. }
  123. }
  124. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  125. static int GetComponentInChildren(IntPtr L)
  126. {
  127. try
  128. {
  129. int count = LuaDLL.lua_gettop(L);
  130. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type)))
  131. {
  132. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  133. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  134. UnityEngine.Component o = obj.GetComponentInChildren(arg0);
  135. ToLua.Push(L, o);
  136. return 1;
  137. }
  138. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type), typeof(bool)))
  139. {
  140. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  141. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  142. bool arg1 = LuaDLL.lua_toboolean(L, 3);
  143. UnityEngine.Component o = obj.GetComponentInChildren(arg0, arg1);
  144. ToLua.Push(L, o);
  145. return 1;
  146. }
  147. else
  148. {
  149. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponentInChildren");
  150. }
  151. }
  152. catch(Exception e)
  153. {
  154. return LuaDLL.toluaL_exception(L, e);
  155. }
  156. }
  157. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  158. static int GetComponentInParent(IntPtr L)
  159. {
  160. try
  161. {
  162. ToLua.CheckArgsCount(L, 2);
  163. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  164. System.Type arg0 = (System.Type)ToLua.CheckObject(L, 2, typeof(System.Type));
  165. UnityEngine.Component o = obj.GetComponentInParent(arg0);
  166. ToLua.Push(L, o);
  167. return 1;
  168. }
  169. catch(Exception e)
  170. {
  171. return LuaDLL.toluaL_exception(L, e);
  172. }
  173. }
  174. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  175. static int GetComponents(IntPtr L)
  176. {
  177. try
  178. {
  179. int count = LuaDLL.lua_gettop(L);
  180. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type)))
  181. {
  182. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  183. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  184. UnityEngine.Component[] o = obj.GetComponents(arg0);
  185. ToLua.Push(L, o);
  186. return 1;
  187. }
  188. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type), typeof(System.Collections.Generic.List<UnityEngine.Component>)))
  189. {
  190. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  191. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  192. System.Collections.Generic.List<UnityEngine.Component> arg1 = (System.Collections.Generic.List<UnityEngine.Component>)ToLua.ToObject(L, 3);
  193. obj.GetComponents(arg0, arg1);
  194. return 0;
  195. }
  196. else
  197. {
  198. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponents");
  199. }
  200. }
  201. catch(Exception e)
  202. {
  203. return LuaDLL.toluaL_exception(L, e);
  204. }
  205. }
  206. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  207. static int GetComponentsInChildren(IntPtr L)
  208. {
  209. try
  210. {
  211. int count = LuaDLL.lua_gettop(L);
  212. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type)))
  213. {
  214. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  215. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  216. UnityEngine.Component[] o = obj.GetComponentsInChildren(arg0);
  217. ToLua.Push(L, o);
  218. return 1;
  219. }
  220. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type), typeof(bool)))
  221. {
  222. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  223. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  224. bool arg1 = LuaDLL.lua_toboolean(L, 3);
  225. UnityEngine.Component[] o = obj.GetComponentsInChildren(arg0, arg1);
  226. ToLua.Push(L, o);
  227. return 1;
  228. }
  229. else
  230. {
  231. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponentsInChildren");
  232. }
  233. }
  234. catch(Exception e)
  235. {
  236. return LuaDLL.toluaL_exception(L, e);
  237. }
  238. }
  239. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  240. static int GetComponentsInParent(IntPtr L)
  241. {
  242. try
  243. {
  244. int count = LuaDLL.lua_gettop(L);
  245. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type)))
  246. {
  247. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  248. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  249. UnityEngine.Component[] o = obj.GetComponentsInParent(arg0);
  250. ToLua.Push(L, o);
  251. return 1;
  252. }
  253. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(System.Type), typeof(bool)))
  254. {
  255. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  256. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  257. bool arg1 = LuaDLL.lua_toboolean(L, 3);
  258. UnityEngine.Component[] o = obj.GetComponentsInParent(arg0, arg1);
  259. ToLua.Push(L, o);
  260. return 1;
  261. }
  262. else
  263. {
  264. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponentsInParent");
  265. }
  266. }
  267. catch(Exception e)
  268. {
  269. return LuaDLL.toluaL_exception(L, e);
  270. }
  271. }
  272. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  273. static int FindWithTag(IntPtr L)
  274. {
  275. try
  276. {
  277. ToLua.CheckArgsCount(L, 1);
  278. string arg0 = ToLua.CheckString(L, 1);
  279. UnityEngine.GameObject o = UnityEngine.GameObject.FindWithTag(arg0);
  280. ToLua.Push(L, o);
  281. return 1;
  282. }
  283. catch(Exception e)
  284. {
  285. return LuaDLL.toluaL_exception(L, e);
  286. }
  287. }
  288. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  289. static int SendMessageUpwards(IntPtr L)
  290. {
  291. try
  292. {
  293. int count = LuaDLL.lua_gettop(L);
  294. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string)))
  295. {
  296. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  297. string arg0 = ToLua.ToString(L, 2);
  298. obj.SendMessageUpwards(arg0);
  299. return 0;
  300. }
  301. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(UnityEngine.SendMessageOptions)))
  302. {
  303. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  304. string arg0 = ToLua.ToString(L, 2);
  305. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  306. obj.SendMessageUpwards(arg0, arg1);
  307. return 0;
  308. }
  309. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(object)))
  310. {
  311. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  312. string arg0 = ToLua.ToString(L, 2);
  313. object arg1 = ToLua.ToVarObject(L, 3);
  314. obj.SendMessageUpwards(arg0, arg1);
  315. return 0;
  316. }
  317. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
  318. {
  319. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  320. string arg0 = ToLua.ToString(L, 2);
  321. object arg1 = ToLua.ToVarObject(L, 3);
  322. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  323. obj.SendMessageUpwards(arg0, arg1, arg2);
  324. return 0;
  325. }
  326. else
  327. {
  328. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.SendMessageUpwards");
  329. }
  330. }
  331. catch(Exception e)
  332. {
  333. return LuaDLL.toluaL_exception(L, e);
  334. }
  335. }
  336. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  337. static int BroadcastMessage(IntPtr L)
  338. {
  339. try
  340. {
  341. int count = LuaDLL.lua_gettop(L);
  342. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string)))
  343. {
  344. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  345. string arg0 = ToLua.ToString(L, 2);
  346. obj.BroadcastMessage(arg0);
  347. return 0;
  348. }
  349. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(UnityEngine.SendMessageOptions)))
  350. {
  351. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  352. string arg0 = ToLua.ToString(L, 2);
  353. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  354. obj.BroadcastMessage(arg0, arg1);
  355. return 0;
  356. }
  357. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(object)))
  358. {
  359. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  360. string arg0 = ToLua.ToString(L, 2);
  361. object arg1 = ToLua.ToVarObject(L, 3);
  362. obj.BroadcastMessage(arg0, arg1);
  363. return 0;
  364. }
  365. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
  366. {
  367. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  368. string arg0 = ToLua.ToString(L, 2);
  369. object arg1 = ToLua.ToVarObject(L, 3);
  370. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  371. obj.BroadcastMessage(arg0, arg1, arg2);
  372. return 0;
  373. }
  374. else
  375. {
  376. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.BroadcastMessage");
  377. }
  378. }
  379. catch(Exception e)
  380. {
  381. return LuaDLL.toluaL_exception(L, e);
  382. }
  383. }
  384. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  385. static int AddComponent(IntPtr L)
  386. {
  387. try
  388. {
  389. ToLua.CheckArgsCount(L, 2);
  390. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  391. System.Type arg0 = (System.Type)ToLua.CheckObject(L, 2, typeof(System.Type));
  392. UnityEngine.Component o = obj.AddComponent(arg0);
  393. ToLua.Push(L, o);
  394. return 1;
  395. }
  396. catch(Exception e)
  397. {
  398. return LuaDLL.toluaL_exception(L, e);
  399. }
  400. }
  401. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  402. static int SetActive(IntPtr L)
  403. {
  404. try
  405. {
  406. ToLua.CheckArgsCount(L, 2);
  407. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  408. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  409. obj.SetActive(arg0);
  410. return 0;
  411. }
  412. catch(Exception e)
  413. {
  414. return LuaDLL.toluaL_exception(L, e);
  415. }
  416. }
  417. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  418. static int CompareTag(IntPtr L)
  419. {
  420. try
  421. {
  422. ToLua.CheckArgsCount(L, 2);
  423. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  424. string arg0 = ToLua.CheckString(L, 2);
  425. bool o = obj.CompareTag(arg0);
  426. LuaDLL.lua_pushboolean(L, o);
  427. return 1;
  428. }
  429. catch(Exception e)
  430. {
  431. return LuaDLL.toluaL_exception(L, e);
  432. }
  433. }
  434. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  435. static int FindGameObjectWithTag(IntPtr L)
  436. {
  437. try
  438. {
  439. ToLua.CheckArgsCount(L, 1);
  440. string arg0 = ToLua.CheckString(L, 1);
  441. UnityEngine.GameObject o = UnityEngine.GameObject.FindGameObjectWithTag(arg0);
  442. ToLua.Push(L, o);
  443. return 1;
  444. }
  445. catch(Exception e)
  446. {
  447. return LuaDLL.toluaL_exception(L, e);
  448. }
  449. }
  450. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  451. static int FindGameObjectsWithTag(IntPtr L)
  452. {
  453. try
  454. {
  455. ToLua.CheckArgsCount(L, 1);
  456. string arg0 = ToLua.CheckString(L, 1);
  457. UnityEngine.GameObject[] o = UnityEngine.GameObject.FindGameObjectsWithTag(arg0);
  458. ToLua.Push(L, o);
  459. return 1;
  460. }
  461. catch(Exception e)
  462. {
  463. return LuaDLL.toluaL_exception(L, e);
  464. }
  465. }
  466. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  467. static int Find(IntPtr L)
  468. {
  469. try
  470. {
  471. ToLua.CheckArgsCount(L, 1);
  472. string arg0 = ToLua.CheckString(L, 1);
  473. UnityEngine.GameObject o = UnityEngine.GameObject.Find(arg0);
  474. ToLua.Push(L, o);
  475. return 1;
  476. }
  477. catch(Exception e)
  478. {
  479. return LuaDLL.toluaL_exception(L, e);
  480. }
  481. }
  482. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  483. static int SendMessage(IntPtr L)
  484. {
  485. try
  486. {
  487. ++LuaException.SendMsgCount;
  488. int count = LuaDLL.lua_gettop(L);
  489. if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string)))
  490. {
  491. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  492. string arg0 = ToLua.ToString(L, 2);
  493. obj.SendMessage(arg0);
  494. --LuaException.SendMsgCount;
  495. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  496. {
  497. string error = LuaDLL.lua_tostring(L, -1);
  498. LuaDLL.lua_pop(L, 1);
  499. LuaFramework.Util.ThrowLuaException(error, LuaException.GetLastError());
  500. }
  501. return 0;
  502. }
  503. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(UnityEngine.SendMessageOptions)))
  504. {
  505. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  506. string arg0 = ToLua.ToString(L, 2);
  507. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  508. obj.SendMessage(arg0, arg1);
  509. --LuaException.SendMsgCount;
  510. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  511. {
  512. string error = LuaDLL.lua_tostring(L, -1);
  513. LuaDLL.lua_pop(L, 1);
  514. LuaFramework.Util.ThrowLuaException(error, LuaException.GetLastError());
  515. }
  516. return 0;
  517. }
  518. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(object)))
  519. {
  520. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  521. string arg0 = ToLua.ToString(L, 2);
  522. object arg1 = ToLua.ToVarObject(L, 3);
  523. obj.SendMessage(arg0, arg1);
  524. --LuaException.SendMsgCount;
  525. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  526. {
  527. string error = LuaDLL.lua_tostring(L, -1);
  528. LuaDLL.lua_pop(L, 1);
  529. LuaFramework.Util.ThrowLuaException(error, LuaException.GetLastError());
  530. }
  531. return 0;
  532. }
  533. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
  534. {
  535. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  536. string arg0 = ToLua.ToString(L, 2);
  537. object arg1 = ToLua.ToVarObject(L, 3);
  538. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  539. obj.SendMessage(arg0, arg1, arg2);
  540. --LuaException.SendMsgCount;
  541. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  542. {
  543. string error = LuaDLL.lua_tostring(L, -1);
  544. LuaDLL.lua_pop(L, 1);
  545. LuaFramework.Util.ThrowLuaException(error, LuaException.GetLastError());
  546. }
  547. return 0;
  548. }
  549. else
  550. {
  551. --LuaException.SendMsgCount;
  552. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.SendMessage");
  553. }
  554. }
  555. catch(Exception e)
  556. {
  557. return LuaDLL.toluaL_exception(L, e);
  558. }
  559. }
  560. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  561. static int op_Equality(IntPtr L)
  562. {
  563. try
  564. {
  565. ToLua.CheckArgsCount(L, 2);
  566. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  567. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  568. bool o = arg0 == arg1;
  569. LuaDLL.lua_pushboolean(L, o);
  570. return 1;
  571. }
  572. catch(Exception e)
  573. {
  574. return LuaDLL.toluaL_exception(L, e);
  575. }
  576. }
  577. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  578. static int get_transform(IntPtr L)
  579. {
  580. object o = null;
  581. try
  582. {
  583. o = ToLua.ToObject(L, 1);
  584. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  585. UnityEngine.Transform ret = obj.transform;
  586. ToLua.Push(L, ret);
  587. return 1;
  588. }
  589. catch(Exception e)
  590. {
  591. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index transform on a nil value" : e.Message);
  592. }
  593. }
  594. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  595. static int get_layer(IntPtr L)
  596. {
  597. object o = null;
  598. try
  599. {
  600. o = ToLua.ToObject(L, 1);
  601. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  602. int ret = obj.layer;
  603. LuaDLL.lua_pushinteger(L, ret);
  604. return 1;
  605. }
  606. catch(Exception e)
  607. {
  608. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index layer on a nil value" : e.Message);
  609. }
  610. }
  611. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  612. static int get_activeSelf(IntPtr L)
  613. {
  614. object o = null;
  615. try
  616. {
  617. o = ToLua.ToObject(L, 1);
  618. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  619. bool ret = obj.activeSelf;
  620. LuaDLL.lua_pushboolean(L, ret);
  621. return 1;
  622. }
  623. catch(Exception e)
  624. {
  625. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index activeSelf on a nil value" : e.Message);
  626. }
  627. }
  628. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  629. static int get_activeInHierarchy(IntPtr L)
  630. {
  631. object o = null;
  632. try
  633. {
  634. o = ToLua.ToObject(L, 1);
  635. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  636. bool ret = obj.activeInHierarchy;
  637. LuaDLL.lua_pushboolean(L, ret);
  638. return 1;
  639. }
  640. catch(Exception e)
  641. {
  642. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index activeInHierarchy on a nil value" : e.Message);
  643. }
  644. }
  645. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  646. static int get_isStatic(IntPtr L)
  647. {
  648. object o = null;
  649. try
  650. {
  651. o = ToLua.ToObject(L, 1);
  652. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  653. bool ret = obj.isStatic;
  654. LuaDLL.lua_pushboolean(L, ret);
  655. return 1;
  656. }
  657. catch(Exception e)
  658. {
  659. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isStatic on a nil value" : e.Message);
  660. }
  661. }
  662. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  663. static int get_tag(IntPtr L)
  664. {
  665. object o = null;
  666. try
  667. {
  668. o = ToLua.ToObject(L, 1);
  669. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  670. string ret = obj.tag;
  671. LuaDLL.lua_pushstring(L, ret);
  672. return 1;
  673. }
  674. catch(Exception e)
  675. {
  676. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index tag on a nil value" : e.Message);
  677. }
  678. }
  679. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  680. static int get_scene(IntPtr L)
  681. {
  682. object o = null;
  683. try
  684. {
  685. o = ToLua.ToObject(L, 1);
  686. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  687. UnityEngine.SceneManagement.Scene ret = obj.scene;
  688. ToLua.PushValue(L, ret);
  689. return 1;
  690. }
  691. catch(Exception e)
  692. {
  693. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index scene on a nil value" : e.Message);
  694. }
  695. }
  696. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  697. static int get_gameObject(IntPtr L)
  698. {
  699. object o = null;
  700. try
  701. {
  702. o = ToLua.ToObject(L, 1);
  703. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  704. UnityEngine.GameObject ret = obj.gameObject;
  705. ToLua.Push(L, ret);
  706. return 1;
  707. }
  708. catch(Exception e)
  709. {
  710. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index gameObject on a nil value" : e.Message);
  711. }
  712. }
  713. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  714. static int set_layer(IntPtr L)
  715. {
  716. object o = null;
  717. try
  718. {
  719. o = ToLua.ToObject(L, 1);
  720. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  721. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  722. obj.layer = arg0;
  723. return 0;
  724. }
  725. catch(Exception e)
  726. {
  727. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index layer on a nil value" : e.Message);
  728. }
  729. }
  730. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  731. static int set_isStatic(IntPtr L)
  732. {
  733. object o = null;
  734. try
  735. {
  736. o = ToLua.ToObject(L, 1);
  737. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  738. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  739. obj.isStatic = arg0;
  740. return 0;
  741. }
  742. catch(Exception e)
  743. {
  744. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isStatic on a nil value" : e.Message);
  745. }
  746. }
  747. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  748. static int set_tag(IntPtr L)
  749. {
  750. object o = null;
  751. try
  752. {
  753. o = ToLua.ToObject(L, 1);
  754. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  755. string arg0 = ToLua.CheckString(L, 2);
  756. obj.tag = arg0;
  757. return 0;
  758. }
  759. catch(Exception e)
  760. {
  761. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index tag on a nil value" : e.Message);
  762. }
  763. }
  764. }