static int AddComponent(IntPtr L) { try { UnityEngine.GameObject self = LuaExtend.GetObject(L, 1) as UnityEngine.GameObject; if (self == null) { throw new LuaException(L, "Object is null"); } string component = LuaDLL.lua_tostring(L, 2); ComponentMethodDelegate func = null; if (typesAdd.TryGetValue(component, out func)) { UnityEngine.Component com = func(self); LuaExtend.AddObject2Lua(L, com, null); } else { throw new LuaException(L, "Component is not registed:" + component); } return(1); } catch (Exception e) { return(LuaDLL.wluaL_error(L, e)); } }
static int Destroy(IntPtr L) { try { UnityEngine.Object self = LuaExtend.GetObject(L, 1) as UnityEngine.Object; if (self == null) { throw new LuaException(L, "Object is null"); } System.Double param1 = default(System.Double); param1 = (System.Double)LuaDLL.lua_tonumber(L, 2); if (self != null) { UnityEngine.Object.Destroy( (UnityEngine.Object)self, (System.Single)param1 ); } IntPtr idptr = LuaDLL.lua_touserdata(L, 1); LuaExtend.RemoveObject(L, idptr); return(0); } catch (Exception e) { return(LuaDLL.wluaL_error(L, e)); } }
static int set_enabled(IntPtr L) { try { UnityEngine.Collider self = LuaExtend.GetObject(L, 1) as UnityEngine.Collider; if (self == null) { throw new LuaException(L, "Object is null"); } self.enabled = LuaDLL.lua_toboolean(L, 2); return(0); } catch (Exception e) { return(LuaDLL.wluaL_error(L, e)); } }
static int set_tag(IntPtr L) { try { UnityEngine.GameObject self = LuaExtend.GetObject(L, 1) as UnityEngine.GameObject; if (self == null) { throw new LuaException(L, "Object is null"); } self.tag = LuaDLL.lua_tostring(L, 2); return(0); } catch (Exception e) { return(LuaDLL.wluaL_error(L, e)); } }
static int get_activeSelf(IntPtr L) { try { UnityEngine.GameObject self = LuaExtend.GetObject(L, 1) as UnityEngine.GameObject; if (self == null) { throw new LuaException(L, "Object is null"); } LuaDLL.lua_pushboolean(L, self.activeSelf); return(1); } catch (Exception e) { return(LuaDLL.wluaL_error(L, e)); } }
static int set_receiveShadows(IntPtr L) { try { UnityEngine.Renderer self = LuaExtend.GetObject(L, 1) as UnityEngine.Renderer; if (self == null) { throw new LuaException(L, "Object is null"); } self.receiveShadows = LuaDLL.lua_toboolean(L, 2); return(0); } catch (Exception e) { return(LuaDLL.wluaL_error(L, e)); } }
static int get_name(IntPtr L) { try { UnityEngine.Object self = LuaExtend.GetObject(L, 1) as UnityEngine.Object; if (self == null) { throw new LuaException(L, "Object is null"); } LuaDLL.lua_pushstring(L, self.name); return(1); } catch (Exception e) { return(LuaDLL.wluaL_error(L, e)); } }