Exemplo n.º 1
0
 public void AddToPacket(JoviosUserID jUID, string addition)
 {
     if (packetJSON.ContainsKey(jUID.GetIDNumber()))
     {
         packetJSON[jUID.GetIDNumber()].Add("{'deviceID':" + parser.GetDeviceID() + ",'packet':{" + addition + "}}");
     }
     else
     {
         packetJSON.Add(jUID.GetIDNumber(), new List <string>());
         packetJSON[jUID.GetIDNumber()].Add("{'deviceID':" + parser.GetDeviceID() + ",'packet':{" + addition + "}}");
     }
 }
Exemplo n.º 2
0
 public JoviosPlayer GetPlayer(JoviosUserID jUID)
 {
     if (deviceIDToPlayerNumber.ContainsKey(jUID.GetIDNumber()))
     {
         if (players.Count > deviceIDToPlayerNumber[jUID.GetIDNumber()])
         {
             return(players[deviceIDToPlayerNumber[jUID.GetIDNumber()]]);
         }
         else
         {
             return(null);
         }
     }
     else
     {
         return(null);
     }
 }