public void Update(float deltaTime) { /* * if (mTimeoutShowing && PlatNetwork.Instance.IsEnterPlatTimeout()) * { * ReconnectPrompt(CommonFunction.GetConstString("NETWORK_UNSTABLE_RETRY_LATER")); * mTimeoutShowing = false; * } */ if (autoReconn && (DateTime.Now.Ticks - connFailTime) > 30000000) { autoReconn = false; if (CanAutoReconn()) { Reconnect(); } } if (m_loginConn != null) { m_loginConn.Update(deltaTime); } if (m_platConn != null) { m_platConn.Update(deltaTime); } if (m_gameConn != null) { m_gameConn.Update(deltaTime); } }
static int Update(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); NetworkConn obj = (NetworkConn)LuaScriptMgr.GetNetObjectSelf(L, 1, "NetworkConn"); float arg0 = (float)LuaScriptMgr.GetNumber(L, 2); obj.Update(arg0); return(0); }
//For virtual game server public static void SendTurn(PlayFrame turn) { NetworkConn conn = GameSystem.Instance.mNetworkManager.m_gameConn; if (conn == null) { return; } conn.SendPack <PlayFrame>(0, turn, MsgID.PlayFrameID); //Debug.Log("VirtualGameServer, SendTurn " + turn.frameNum); //如果使用的是虚拟连接,保证消息立即传回客户端 if (conn.m_type == NetworkConn.Type.eVirtualServer) { conn.Update(0f); } }
public void FixedUpdate(float fDeltaTime) { if (m_loginConn != null) { m_loginConn.Update(fDeltaTime); } if (m_platConn != null) { m_platConn.Update(fDeltaTime); } if (m_gameConn != null) { m_gameConn.Update(fDeltaTime); } }