public static void UF_Bind(GLuaState luastate) { //注册全局方法 UF_RegisterGFunction(luastate); //注册UI索引方法 UF_RegisterUI(luastate); //自定义的注册类 LuaNetwork.UF_Register(luastate); }
public void UF_OnUpdate() { if (m_IsInited) { //协议更新 LuaNetwork.UF_Update(lfHandleNetMsg); if (m_Luastate.LuaUpdate(GTime.DeltaTime, GTime.UnscaleDeltaTime) != 0) { string error = m_Luastate.LuaToString(-1); m_Luastate.LuaPop(2); throw new LuaException(error, LuaException.GetLastError()); } m_Luastate.LuaPop(1); m_Luastate.Collect(); UF_UpdateMouseInput(); } }