Beispiel #1
0
        private void ProcessGamerLeft(CommandGamerLeft command)
        {
            NetworkGamer gamer;

            for (int x = 0; x < _remoteGamers.Count; x++)
            {
                if (_remoteGamers[x].RemoteUniqueIdentifier == command.remoteUniqueIdentifier)
                {
                    gamer = _remoteGamers[x];
                    _remoteGamers.RemoveGamer(gamer);
                    _allGamers.RemoveGamer(gamer);

                    if (GamerLeft != null)
                    {
                        GamerLeft(this, new GamerLeftEventArgs(gamer));
                    }
                }
            }

            if (networkPeer != null)
            {
#if !PORTABLE
                networkPeer.UpdateLiveSession(this);
#endif
            }
        }
Beispiel #2
0
        private void ProcessGamerLeft(CommandGamerLeft command)
        {
            NetworkGamer gamer;

            for (int x = 0; x < _remoteGamers.Count; x++)
            {
                if (_remoteGamers[x].RemoteUniqueIdentifier == command.remoteUniqueIdentifier)
                {
                    gamer = _remoteGamers[x];
                    _remoteGamers.RemoveGamer(gamer);
                    _allGamers.RemoveGamer(gamer);
                    EventHelpers.Raise(this, GamerLeft, new GamerLeftEventArgs(gamer));
                }
            }

            if (networkPeer != null)
            {
                networkPeer.UpdateLiveSession(this);
            }
        }