static int SendMsgToCross(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); bool o = CSBridge.SendMsgToCross(); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SceneRoot(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); UnityEngine.Transform o = CSBridge.SceneRoot(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int LoadLevel(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); CSBridge.LoadLevel(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AddClick(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.UI.Button arg0 = (UnityEngine.UI.Button)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.UI.Button)); LuaFunction arg1 = ToLua.CheckLuaFunction(L, 2); CSBridge.AddClick(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AddComponent(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.GameObject)); string arg1 = ToLua.CheckString(L, 2); LuaInterface.LuaTable o = CSBridge.AddComponent(arg0, arg1); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public bool Init() { if (null != m_thread) { Debug.LogWarning("NetController already inited,repeated init ignored!!!"); return(false); } m_thread = new NetThread(); m_thread.Start(); m_reconnectingPanel = CSBridge.UIRoot().FindChild("panel_reconnecting").gameObject; if (null == m_reconnectingPanel) { Debug.Log("NetController init,reconnectingpanel not found"); } Debug.Log("NetController init ok,netthread start working!!!"); return(true); }
// Update is called once per frame void Update() { CSBridge.LoadAsset(); luaBridge.Call("Update", Time.time, Time.unscaledTime); }