// Use this for initialization void Awake() { loader = new LuaLoader(); lua = new LuaState(); this.InitLuaLibrary(); LuaBinder.Bind(lua); LuaCoroutine.Register(lua, this); }
public void Close() { loop.Destroy(); loop = null; lua.Dispose(); lua = null; loader = null; }
// Use this for initialization void Awake() { loader = new LuaLoader(); lua = new LuaState(); this.OpenLibs(); lua.LuaSetTop(0); LuaBinder.Bind(lua); LuaCoroutine.Register(lua, this); }
public void InitStart() { //这里从awake转移到这里,因为需要等待资源下载完成再实例化 loader = new LuaLoader(); InitLuaPath(); InitLuaBundle(); this.lua.Start(); //启动LUAVM this.StartMain(); this.StartLooper(); }
// 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); }
public void Close() { loop.Destroy(); loop = null; myLoop.Destroy(); myLoop = null; lua.Dispose(); lua = null; loader = null; }
// 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); }
public void Close() { LuaFunction destroy = lua.GetFunction("AppMain.Destroy"); destroy.Call(); destroy.Dispose(); loader = null; base.Close(); }
public void Close() { if (this.loop != null) { this.loop.Destroy(); this.loop = null; } this.lua.Dispose(); this.lua = null; this.loader = null; }
// 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); }
public void Close() { if (loop != null) { loop.Destroy(); } loop = null; lua.Dispose(); lua = null; loader = null; }
// 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(); }
public void Close() {//这里添加判断,主要是有可能没有调用InitStart,就关闭了 if (loop != null) { loop.Destroy(); loop = null; } if (lua != null) { lua.Dispose(); lua = null; loader = null; } }
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(); }
// 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; }
public void Close() { lua.Dispose(); lua = null; loader = null; }
public void Close() { lua.Dispose(); loader = null; }
// Use this for initialization void Awake() { loader = new LuaLoader(); lua = new LuaState(); LuaBinder.Bind(lua); }
// Use this for initialization protected void Awake() { loader = new LuaLoader(); base.Awake(); }