Exemple #1
0
        public void InitStart()
        {
            loader = new LuaLoader();
            lua    = new LuaState();
            this.OpenLibs();
            lua.LuaSetTop(0);
            LuaBinder.Bind(lua);
            LuaCoroutine.Register(lua, this);
            DelegateFactory.Init();

            InitLuaPath();
            InitLuaBundle();
            this.lua.Start();    //启动LUAVM
            this.StartLooper();
        }
Exemple #2
0
        public override void Close()
        {
            if (loop != null)
            {
                loop.Destroy();
                loop = null;
            }

            if (lua != null)
            {
                lua.Dispose();
                lua = null;
            }
            loader = null;
        }