public static void Init(IntPtr L, InitStep step) { if (step == InitStep.FIRSTLY) { LuaDLL.lua_newtable(L); //unityengine,cswrap,t _addMemberFunction(L); //unityengine,cswrap,t Lua_Register._SetTypeTable2Namespace(L, "MeshRenderer"); //unityengine,cswrap } else if (step == InitStep.FINAL) { _InitLink(L); } }
public static void Init() { luaState = new LuaState(LuaNameSpace); L = luaState.L; LuaStateCacheMan.AddLuaStateCache(L); printFunction = new LuaCSFunction(LuaFuncs.print); LuaDLL.wlua_pushcfunction(L, printFunction); LuaDLL.wlua_setglobal(L, "print"); Lua_Register.Register(L, LuaNameSpace); LuaExtend.SetSearcher(L, loader); }
static void _InitLink(IntPtr L) { Lua_Register._SetParent(L, "MeshRenderer", "Renderer"); }
static void _InitLink(IntPtr L) { Lua_Register._SetParent(L, "Collider", "Component"); }
static void _InitLink(IntPtr L) { Lua_Register._SetParent(L, "GameObject", "Object"); }