public static bool Ready(NetworkConnection conn) { if (s_IsReady) { if (LogFilter.logError) { Debug.LogError("A connection has already been set as ready. There can only be one."); } return(false); } if (LogFilter.logDebug) { Debug.Log("ClientScene::Ready() called with connection [" + conn + "]"); } if (conn != null) { var msg = new ReadyMessage(); conn.Send((short)MsgType.Ready, msg); s_IsReady = true; s_ReadyConnection = conn; s_ReadyConnection.isReady = true; return(true); } if (LogFilter.logError) { Debug.LogError("Ready() called with invalid connection object: conn=null"); } return(false); }
// default ready handler. static void OnClientReadyMessage(NetworkConnection conn, ReadyMessage msg) { if (LogFilter.Debug) { Debug.Log("Default handler for ready message from " + conn); } SetClientReady(conn); }
internal void OnServerReadyMessageInternal(NetworkConnection conn, ReadyMessage msg) { if (LogFilter.Debug) { Debug.Log("NetworkManager.OnServerReadyMessageInternal"); } OnServerReady(conn); }
/// <summary> /// default ready handler. /// </summary> /// <param name="conn"></param> /// <param name="msg"></param> void OnClientReadyMessage(INetworkConnection conn, ReadyMessage msg) { if (logger.LogEnabled()) { logger.Log("Default handler for ready message from " + conn); } SetClientReady(conn); }