示例#1
0
 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);
     }
 }
示例#2
0
        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);
        }
示例#3
0
 static void _InitLink(IntPtr L)
 {
     Lua_Register._SetParent(L, "MeshRenderer", "Renderer");
 }
示例#4
0
 static void _InitLink(IntPtr L)
 {
     Lua_Register._SetParent(L, "Collider", "Component");
 }
示例#5
0
 static void _InitLink(IntPtr L)
 {
     Lua_Register._SetParent(L, "GameObject", "Object");
 }