Пример #1
0
 private void OnClientReceiveMessage(LeaveMessage message)
 {
     DebugLog.All(message.PlayerName, "left");
     PlayerJoin.PlayerNames.Remove(message.SenderId);
     foreach (var objectId in message.ObjectIds)
     {
         DestroyObject(objectId);
     }
 }
Пример #2
0
        public void Leave(uint playerId, uint[] objectIds)
        {
            var message = new LeaveMessage
            {
                PlayerName = PlayerJoin.PlayerNames[playerId],
                SenderId   = playerId,
                ObjectIds  = objectIds
            };

            _leaveHandler.SendToAll(message);
        }