示例#1
0
 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);
     }
 }
示例#2
0
文件: Bust.cs 项目: sxtgyrq/VRPGame
 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);
         }
     }
 }