private void BustChangedF(Player player, bool bustValue, ref List <string> msgsWithUrl) { foreach (var item in this._Players) { msgsWithUrl.Add(item.Value.FromUrl); BustStateNotify tn = new BustStateNotify() { c = "BustStateNotify", Bust = bustValue, WebSocketID = item.Value.WebSocketID, Key = item.Value.Key }; var json = Newtonsoft.Json.JsonConvert.SerializeObject(tn); msgsWithUrl.Add(json); } }
private void BustChangedF(RoleInGame role, bool bustValue, ref List <string> msgsWithUrl) { foreach (var item in this._Players) { if (item.Value.playerType == RoleInGame.PlayerType.player) { var player = (Player)item.Value; msgsWithUrl.Add(player.FromUrl); BustStateNotify tn = new BustStateNotify() { c = "BustStateNotify", Bust = bustValue, WebSocketID = player.WebSocketID, Key = player.Key }; var json = Newtonsoft.Json.JsonConvert.SerializeObject(tn); msgsWithUrl.Add(json); } } }