public static void Start() { state = new LuaState(); state.Start(); LuaBinder.Bind(state); LuaBridge.Register(); }
// Use this for initialization void Start() { LogUtil.Debug("[XYTest] start"); var luaRef = new LuaBridge(); lua = LuaState.main; LogUtil.Debug("[XYTest] init lua dll"); LuaCodeInit(); }
public void startLua() { //int lua bridge LuaBridge lb = gameObject.GetComponent <LuaBridge>(); if (lb == null) { lb = gameObject.AddComponent <LuaBridge>(); } else { lb.resetLuaBridge(); } //execute main.lua OnLoadFinished(); }
public virtual void Update() { if (firstUpdate) { firstUpdate = false; LuaFunction fuc = LuaController["FirstUpdate"] as LuaFunction; if (fuc != null) { fuc.BeginPCall(); fuc.Push(this.gameObject); fuc.PCall(); fuc.EndPCall(); fuc.Dispose(); } LuaController["isFirstUpdate"] = true; LuaBridge.onUI(uiName); } if (updateFunc != null) { updateFunc.Call(); } }