源战役客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

353 行
8.6 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_ColliderWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(UnityEngine.Collider), typeof(UnityEngine.Component));
  9. L.RegFunction("ClosestPoint", ClosestPoint);
  10. L.RegFunction("Raycast", Raycast);
  11. L.RegFunction("ClosestPointOnBounds", ClosestPointOnBounds);
  12. L.RegFunction("New", _CreateUnityEngine_Collider);
  13. L.RegFunction("__eq", op_Equality);
  14. L.RegFunction("__tostring", ToLua.op_ToString);
  15. L.RegVar("enabled", get_enabled, set_enabled);
  16. L.RegVar("attachedRigidbody", get_attachedRigidbody, null);
  17. L.RegVar("isTrigger", get_isTrigger, set_isTrigger);
  18. L.RegVar("contactOffset", get_contactOffset, set_contactOffset);
  19. L.RegVar("bounds", get_bounds, null);
  20. L.RegVar("sharedMaterial", get_sharedMaterial, set_sharedMaterial);
  21. L.RegVar("material", get_material, set_material);
  22. L.EndClass();
  23. }
  24. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  25. static int _CreateUnityEngine_Collider(IntPtr L)
  26. {
  27. try
  28. {
  29. int count = LuaDLL.lua_gettop(L);
  30. if (count == 0)
  31. {
  32. UnityEngine.Collider obj = new UnityEngine.Collider();
  33. ToLua.Push(L, obj);
  34. return 1;
  35. }
  36. else
  37. {
  38. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.Collider.New");
  39. }
  40. }
  41. catch(Exception e)
  42. {
  43. return LuaDLL.toluaL_exception(L, e);
  44. }
  45. }
  46. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  47. static int ClosestPoint(IntPtr L)
  48. {
  49. try
  50. {
  51. ToLua.CheckArgsCount(L, 2);
  52. UnityEngine.Collider obj = (UnityEngine.Collider)ToLua.CheckObject(L, 1, typeof(UnityEngine.Collider));
  53. UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
  54. UnityEngine.Vector3 o = obj.ClosestPoint(arg0);
  55. ToLua.Push(L, o);
  56. return 1;
  57. }
  58. catch(Exception e)
  59. {
  60. return LuaDLL.toluaL_exception(L, e);
  61. }
  62. }
  63. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  64. static int Raycast(IntPtr L)
  65. {
  66. try
  67. {
  68. ToLua.CheckArgsCount(L, 4);
  69. UnityEngine.Collider obj = (UnityEngine.Collider)ToLua.CheckObject(L, 1, typeof(UnityEngine.Collider));
  70. UnityEngine.Ray arg0 = ToLua.ToRay(L, 2);
  71. UnityEngine.RaycastHit arg1;
  72. float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
  73. bool o = obj.Raycast(arg0, out arg1, arg2);
  74. LuaDLL.lua_pushboolean(L, o);
  75. ToLua.Push(L, arg1);
  76. return 2;
  77. }
  78. catch(Exception e)
  79. {
  80. return LuaDLL.toluaL_exception(L, e);
  81. }
  82. }
  83. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  84. static int ClosestPointOnBounds(IntPtr L)
  85. {
  86. try
  87. {
  88. ToLua.CheckArgsCount(L, 2);
  89. UnityEngine.Collider obj = (UnityEngine.Collider)ToLua.CheckObject(L, 1, typeof(UnityEngine.Collider));
  90. UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
  91. UnityEngine.Vector3 o = obj.ClosestPointOnBounds(arg0);
  92. ToLua.Push(L, o);
  93. return 1;
  94. }
  95. catch(Exception e)
  96. {
  97. return LuaDLL.toluaL_exception(L, e);
  98. }
  99. }
  100. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  101. static int op_Equality(IntPtr L)
  102. {
  103. try
  104. {
  105. ToLua.CheckArgsCount(L, 2);
  106. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  107. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  108. bool o = arg0 == arg1;
  109. LuaDLL.lua_pushboolean(L, o);
  110. return 1;
  111. }
  112. catch(Exception e)
  113. {
  114. return LuaDLL.toluaL_exception(L, e);
  115. }
  116. }
  117. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  118. static int get_enabled(IntPtr L)
  119. {
  120. object o = null;
  121. try
  122. {
  123. o = ToLua.ToObject(L, 1);
  124. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  125. bool ret = obj.enabled;
  126. LuaDLL.lua_pushboolean(L, ret);
  127. return 1;
  128. }
  129. catch(Exception e)
  130. {
  131. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index enabled on a nil value" : e.Message);
  132. }
  133. }
  134. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  135. static int get_attachedRigidbody(IntPtr L)
  136. {
  137. object o = null;
  138. try
  139. {
  140. o = ToLua.ToObject(L, 1);
  141. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  142. UnityEngine.Rigidbody ret = obj.attachedRigidbody;
  143. ToLua.Push(L, ret);
  144. return 1;
  145. }
  146. catch(Exception e)
  147. {
  148. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index attachedRigidbody on a nil value" : e.Message);
  149. }
  150. }
  151. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  152. static int get_isTrigger(IntPtr L)
  153. {
  154. object o = null;
  155. try
  156. {
  157. o = ToLua.ToObject(L, 1);
  158. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  159. bool ret = obj.isTrigger;
  160. LuaDLL.lua_pushboolean(L, ret);
  161. return 1;
  162. }
  163. catch(Exception e)
  164. {
  165. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isTrigger on a nil value" : e.Message);
  166. }
  167. }
  168. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  169. static int get_contactOffset(IntPtr L)
  170. {
  171. object o = null;
  172. try
  173. {
  174. o = ToLua.ToObject(L, 1);
  175. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  176. float ret = obj.contactOffset;
  177. LuaDLL.lua_pushnumber(L, ret);
  178. return 1;
  179. }
  180. catch(Exception e)
  181. {
  182. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index contactOffset on a nil value" : e.Message);
  183. }
  184. }
  185. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  186. static int get_bounds(IntPtr L)
  187. {
  188. object o = null;
  189. try
  190. {
  191. o = ToLua.ToObject(L, 1);
  192. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  193. UnityEngine.Bounds ret = obj.bounds;
  194. ToLua.Push(L, ret);
  195. return 1;
  196. }
  197. catch(Exception e)
  198. {
  199. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bounds on a nil value" : e.Message);
  200. }
  201. }
  202. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  203. static int get_sharedMaterial(IntPtr L)
  204. {
  205. object o = null;
  206. try
  207. {
  208. o = ToLua.ToObject(L, 1);
  209. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  210. UnityEngine.PhysicMaterial ret = obj.sharedMaterial;
  211. ToLua.Push(L, ret);
  212. return 1;
  213. }
  214. catch(Exception e)
  215. {
  216. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index sharedMaterial on a nil value" : e.Message);
  217. }
  218. }
  219. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  220. static int get_material(IntPtr L)
  221. {
  222. object o = null;
  223. try
  224. {
  225. o = ToLua.ToObject(L, 1);
  226. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  227. UnityEngine.PhysicMaterial ret = obj.material;
  228. ToLua.Push(L, ret);
  229. return 1;
  230. }
  231. catch(Exception e)
  232. {
  233. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index material on a nil value" : e.Message);
  234. }
  235. }
  236. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  237. static int set_enabled(IntPtr L)
  238. {
  239. object o = null;
  240. try
  241. {
  242. o = ToLua.ToObject(L, 1);
  243. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  244. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  245. obj.enabled = arg0;
  246. return 0;
  247. }
  248. catch(Exception e)
  249. {
  250. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index enabled on a nil value" : e.Message);
  251. }
  252. }
  253. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  254. static int set_isTrigger(IntPtr L)
  255. {
  256. object o = null;
  257. try
  258. {
  259. o = ToLua.ToObject(L, 1);
  260. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  261. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  262. obj.isTrigger = arg0;
  263. return 0;
  264. }
  265. catch(Exception e)
  266. {
  267. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isTrigger on a nil value" : e.Message);
  268. }
  269. }
  270. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  271. static int set_contactOffset(IntPtr L)
  272. {
  273. object o = null;
  274. try
  275. {
  276. o = ToLua.ToObject(L, 1);
  277. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  278. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  279. obj.contactOffset = arg0;
  280. return 0;
  281. }
  282. catch(Exception e)
  283. {
  284. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index contactOffset on a nil value" : e.Message);
  285. }
  286. }
  287. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  288. static int set_sharedMaterial(IntPtr L)
  289. {
  290. object o = null;
  291. try
  292. {
  293. o = ToLua.ToObject(L, 1);
  294. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  295. UnityEngine.PhysicMaterial arg0 = (UnityEngine.PhysicMaterial)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.PhysicMaterial));
  296. obj.sharedMaterial = arg0;
  297. return 0;
  298. }
  299. catch(Exception e)
  300. {
  301. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index sharedMaterial on a nil value" : e.Message);
  302. }
  303. }
  304. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  305. static int set_material(IntPtr L)
  306. {
  307. object o = null;
  308. try
  309. {
  310. o = ToLua.ToObject(L, 1);
  311. UnityEngine.Collider obj = (UnityEngine.Collider)o;
  312. UnityEngine.PhysicMaterial arg0 = (UnityEngine.PhysicMaterial)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.PhysicMaterial));
  313. obj.material = arg0;
  314. return 0;
  315. }
  316. catch(Exception e)
  317. {
  318. return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index material on a nil value" : e.Message);
  319. }
  320. }
  321. }