Пример #1
0
    private void OnPeerDisconnect(P2PNetworkMessage net_msg)
    {
        P2PConnection connection = net_msg.m_Connection;
        P2PPeer       p2PPeer    = (connection != null) ? connection.m_Peer : null;

        if (p2PPeer != null)
        {
            Dictionary <GameObject, Relevance> .Enumerator enumerator = this.m_Components.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <GameObject, Relevance> keyValuePair = enumerator.Current;
                Relevance value = keyValuePair.Value;
                if (value)
                {
                    value.OnPeerDisconnected(p2PPeer);
                }
            }
            enumerator.Dispose();
        }
    }