Ejemplo n.º 1
0
        /// <summary>
        /// Sets the client of the connection to be not-ready.
        /// <para>Clients that are not ready do not receive spawned objects or state synchronization updates. They client can be made ready again by calling SetClientReady().</para>
        /// </summary>
        /// <param name="conn">The connection of the client to make not ready.</param>
        public void SetClientNotReady(INetworkConnection conn)
        {
            if (conn.IsReady)
            {
                if (logger.LogEnabled())
                {
                    logger.Log("PlayerNotReady " + conn);
                }
                conn.IsReady = false;
                conn.RemoveObservers();

                conn.Send(new NotReadyMessage());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the client of the connection to be not-ready.
        /// <para>Clients that are not ready do not receive spawned objects or state synchronization updates. They client can be made ready again by calling SetClientReady().</para>
        /// </summary>
        /// <param name="conn">The connection of the client to make not ready.</param>
        public void SetClientNotReady(INetworkConnection conn)
        {
            if (conn.IsReady)
            {
                if (LogFilter.Debug)
                {
                    Debug.Log("PlayerNotReady " + conn);
                }
                conn.IsReady = false;
                conn.RemoveObservers();

                conn.Send(new NotReadyMessage());
            }
        }