コード例 #1
0
        private void Player_Exited(object sender, Networking.Common.Peer e)
        {
            ServerPlayer sp = e as ServerPlayer;

            if (sp == null || !PlayerList.Contains(sp))
            {
                return;
            }

            lock (PlayerList)
                PlayerList.Remove(sp);

            MsgRemovePlayer exit = new MsgRemovePlayer();

            exit.PlayerID = sp.PlayerID;
            SendToAll(exit, false);

            if (Teams.ContainsKey(sp.ActualTeam))
            {
                Teams[sp.ActualTeam].Remove(sp);
            }
        }
コード例 #2
0
 private void P_Disconnected(object sender, Networking.Common.Peer e)
 {
     Logger.Log3("Socket " + e.GetTCPRemoteAddresString() + " disconnected ");
 }
コード例 #3
0
 private void Player_Disconnected(object sender, Networking.Common.Peer e)
 {
     lock (PlayerList)
         PlayerList.Remove(e as ServerPlayer);
 }
コード例 #4
0
 private void Player_Exited(object sender, Networking.Common.Peer e)
 {
     RemovePlayer(e as ServerPlayer);
 }