集成自LuaFileUtils,重写里面的ReadFile,
Inheritance: LuaInterface.LuaFileUtils
 // Use this for initialization
 void Awake() {
     loader = new LuaLoader();
     lua = new LuaState();
     this.InitLuaLibrary();
     LuaBinder.Bind(lua);
     LuaCoroutine.Register(lua, this);
 }
Example #2
0
        public void Close()
        {
            loop.Destroy();
            loop = null;

            lua.Dispose();
            lua = null;
            loader = null;
        }
Example #3
0
        // Use this for initialization
        void Awake()
        {
            loader = new LuaLoader();
            lua = new LuaState();
            this.OpenLibs();
            lua.LuaSetTop(0);

            LuaBinder.Bind(lua);
            LuaCoroutine.Register(lua, this);
        }
Example #4
0
        public void InitStart()
        {
            //这里从awake转移到这里,因为需要等待资源下载完成再实例化
            loader = new LuaLoader();

            InitLuaPath();
            InitLuaBundle();
            this.lua.Start(); //启动LUAVM
            this.StartMain();
            this.StartLooper();
        }
Example #5
0
        // Use this for initialization
        void Awake()
        {
            loader = new LuaLoader();
            lua    = new LuaState();   //创建tolua提供的LuaState对象
            this.OpenLibs();
            lua.LuaSetTop(0);

            LuaBinder.Bind(lua);       //Lua - C# 中间层Wrap文件分别向虚拟机注册自己
            DelegateFactory.Init();
            LuaCoroutine.Register(lua, this);
        }
Example #6
0
        public void Close()
        {
            loop.Destroy();
            loop = null;
            myLoop.Destroy();
            myLoop = null;

            lua.Dispose();
            lua    = null;
            loader = null;
        }
Example #7
0
 // Use this for initialization
 void Awake()
 {
     loader = new LuaLoader();
     lua    = new LuaState();
     this.OpenLibs();
     lua.LuaSetTop(0);
     KBELuaUtil.SetCallLuaFunction(this.CallFunction);
     DelegateFactory.Init();
     LuaBinder.Bind(lua);
     LuaCoroutine.Register(lua, this);
 }
Example #8
0
        public void Close()
        {
            LuaFunction destroy = lua.GetFunction("AppMain.Destroy");

            destroy.Call();
            destroy.Dispose();

            loader = null;

            base.Close();
        }
Example #9
0
 public void Close()
 {
     if (this.loop != null)
     {
         this.loop.Destroy();
         this.loop = null;
     }
     this.lua.Dispose();
     this.lua    = null;
     this.loader = null;
 }
Example #10
0
        // Use this for initialization
        void Awake()
        {
            loader = new LuaLoader();
            lua    = new LuaState();
            this.OpenLibs();
            lua.LuaSetTop(0);

            LuaBinder.Bind(lua);
            DelegateFactory.Init();
            LuaCoroutine.Register(lua, this);
        }
Example #11
0
        public void Close()
        {
            if (loop != null)
            {
                loop.Destroy();
            }
            loop = null;

            lua.Dispose();
            lua    = null;
            loader = null;
        }
Example #12
0
        // Use this for initialization
        void Awake()
        {
            Instance = this;
            loader   = new LuaLoader();
            lua      = new LuaState();
            this.OpenLibs();
            lua.LuaSetTop(0);

            LuaBinder.Bind(lua);
            LuaCoroutine.Register(lua, this);
            InitStart();
        }
Example #13
0
        public void Close()
        {//这里添加判断,主要是有可能没有调用InitStart,就关闭了
            if (loop != null)
            {
                loop.Destroy();
                loop = null;
            }

            if (lua != null)
            {
                lua.Dispose();
                lua    = null;
                loader = null;
            }
        }
Example #14
0
        public void InitStart()
        {
            if (loop != null)
            {
                Close();
            }
            loader = new LuaLoader();
            lua    = new LuaState();
            this.OpenLibs();
            lua.LuaSetTop(0);

            LuaBinder.Bind(lua);
            LuaCoroutine.Register(lua, this);

            InitLuaPath();
            InitLuaBundle();
            this.lua.Start();    //启动LUAVM
            this.StartMain();
            this.StartLooper();
        }
Example #15
0
 // Use this for initialization
 void Awake()
 {
     loader       = new LuaLoader();
     mMyLuaClient = gameObject.AddComponent <MyLuaClient>();
     lua          = MyLuaClient.GetMainState();
 }
        public void Close() {
            SafeRelease(ref updateFunc);
            SafeRelease(ref lateUpdateFunc);
            SafeRelease(ref fixedUpdateFunc);

            if (UpdateEvent != null) {
                UpdateEvent.Dispose();
                UpdateEvent = null;
            }

            if (LateUpdateEvent != null) {
                LateUpdateEvent.Dispose();
                LateUpdateEvent = null;
            }

            if (FixedUpdateEvent != null) {
                FixedUpdateEvent.Dispose();
                FixedUpdateEvent = null;
            }
            lua.Dispose();
            lua = null;
            loader = null;
        }
Example #17
0
 public void Close()
 {
     lua.Dispose();
     lua    = null;
     loader = null;
 }
Example #18
0
 public void Close() {
     lua.Dispose();
     loader = null;
 }
Example #19
0
 // Use this for initialization
 void Awake() {
     loader = new LuaLoader();
     lua = new LuaState();
     LuaBinder.Bind(lua);
 }
Example #20
0
 // Use this for initialization
 protected void Awake()
 {
     loader = new LuaLoader();
     base.Awake();
 }
 // Use this for initialization
 void Awake()
 {
     loader = new LuaLoader();
     lua    = new LuaState();
     LuaBinder.Bind(lua);
 }