|
|
- //this source code was auto-generated by tolua#, do not modify it
- using System;
- using LuaInterface;
-
- public class UnityEngine_ColliderWrap
- {
- public static void Register(LuaState L)
- {
- L.BeginClass(typeof(UnityEngine.Collider), typeof(UnityEngine.Component));
- L.RegFunction("ClosestPoint", ClosestPoint);
- L.RegFunction("Raycast", Raycast);
- L.RegFunction("ClosestPointOnBounds", ClosestPointOnBounds);
- L.RegFunction("New", _CreateUnityEngine_Collider);
- L.RegFunction("__eq", op_Equality);
- L.RegFunction("__tostring", ToLua.op_ToString);
- L.RegVar("enabled", get_enabled, set_enabled);
- L.RegVar("attachedRigidbody", get_attachedRigidbody, null);
- L.RegVar("isTrigger", get_isTrigger, set_isTrigger);
- L.RegVar("contactOffset", get_contactOffset, set_contactOffset);
- L.RegVar("bounds", get_bounds, null);
- L.RegVar("sharedMaterial", get_sharedMaterial, set_sharedMaterial);
- L.RegVar("material", get_material, set_material);
- L.EndClass();
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _CreateUnityEngine_Collider(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 0)
- {
- UnityEngine.Collider obj = new UnityEngine.Collider();
- ToLua.Push(L, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.Collider.New");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ClosestPoint(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- UnityEngine.Collider obj = (UnityEngine.Collider)ToLua.CheckObject(L, 1, typeof(UnityEngine.Collider));
- UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
- UnityEngine.Vector3 o = obj.ClosestPoint(arg0);
- ToLua.Push(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Raycast(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 4);
- UnityEngine.Collider obj = (UnityEngine.Collider)ToLua.CheckObject(L, 1, typeof(UnityEngine.Collider));
- UnityEngine.Ray arg0 = ToLua.ToRay(L, 2);
- UnityEngine.RaycastHit arg1;
- float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
- bool o = obj.Raycast(arg0, out arg1, arg2);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.Push(L, arg1);
- return 2;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ClosestPointOnBounds(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- UnityEngine.Collider obj = (UnityEngine.Collider)ToLua.CheckObject(L, 1, typeof(UnityEngine.Collider));
- UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
- UnityEngine.Vector3 o = obj.ClosestPointOnBounds(arg0);
- ToLua.Push(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int op_Equality(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
- UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
- bool o = arg0 == arg1;
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_enabled(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- bool ret = obj.enabled;
- LuaDLL.lua_pushboolean(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index enabled on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_attachedRigidbody(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- UnityEngine.Rigidbody ret = obj.attachedRigidbody;
- ToLua.Push(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index attachedRigidbody on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_isTrigger(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- bool ret = obj.isTrigger;
- LuaDLL.lua_pushboolean(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isTrigger on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_contactOffset(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- float ret = obj.contactOffset;
- LuaDLL.lua_pushnumber(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index contactOffset on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_bounds(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- UnityEngine.Bounds ret = obj.bounds;
- ToLua.Push(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bounds on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_sharedMaterial(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- UnityEngine.PhysicMaterial ret = obj.sharedMaterial;
- ToLua.Push(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index sharedMaterial on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_material(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- UnityEngine.PhysicMaterial ret = obj.material;
- ToLua.Push(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index material on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_enabled(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
- obj.enabled = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index enabled on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_isTrigger(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
- obj.isTrigger = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isTrigger on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_contactOffset(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
- obj.contactOffset = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index contactOffset on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_sharedMaterial(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- UnityEngine.PhysicMaterial arg0 = (UnityEngine.PhysicMaterial)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.PhysicMaterial));
- obj.sharedMaterial = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index sharedMaterial on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_material(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.Collider obj = (UnityEngine.Collider)o;
- UnityEngine.PhysicMaterial arg0 = (UnityEngine.PhysicMaterial)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.PhysicMaterial));
- obj.material = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index material on a nil value" : e.Message);
- }
- }
- }
-
|