示例#1
0
        void INotificationService.ToPlayers(IEnumerable<Player> players, PlayerMessages messages)
        {
            var packet = new PlayerPacket(messages);

            foreach (var player in players)
            {
                foreach (var clientId in player.ClientIds)
                    Clients[clientId].receive(packet);
            }
        }
示例#2
0
        void INotificationService.ToPlayer(Player player, PlayerMessages messages)
        {
            var packet = new PlayerPacket(messages);

            // Transmit to all user's connected clients
            foreach (var clientId in player.ClientIds)
                Clients[clientId].receive(packet);
        }