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