コード例 #1
0
ファイル: InterpolatedClient.cs プロジェクト: Boris0190/WRS20
 public void UpdateData(JClient rawClientData)
 {
     lock (lockData)
     {
         this.contentString = rawClientData.ContentString;
         parseObjects();
     }
 }
コード例 #2
0
ファイル: JRadar.cs プロジェクト: Boris0190/WRS20
        protected override void parseObjects()
        {
            nearbyClients = new List<JClient>();
            nearbyShots = new List<JShot>();

            JObject o = JObject.Parse(ContentString);
            JObject jMe = (JObject)o["me"];
            me = new JClient(jMe.ToString());

            JObject jNearbyClients = (JObject)o["nearby-clients"];
            jNearbyClients.Properties().ToList().ForEach(prop =>
            {
                JObject client = (JObject)prop.Value;
                nearbyClients.Add(new JClient(client.ToString()));
            });

            JObject jNearbyShots = (JObject)o["nearby-shots"];
            jNearbyShots.Properties().ToList().ForEach(prop =>
            {
                JObject client = (JObject)prop.Value;
                nearbyShots.Add(new JShot(client.ToString()));
            });
        }
コード例 #3
0
ファイル: WRS_Gui.cs プロジェクト: Boris0190/WRS20
 void specClient_ClientDisconnected(JClient client)
 {
     lock (lockClientArrInterp) { clientArrInterp.RemoveAll(C => C.Id == client.Id); }
 }
コード例 #4
0
ファイル: WRS_Gui.cs プロジェクト: Boris0190/WRS20
 void specClient_ClientConnected(JClient client)
 {
     lock (lockClientArrInterp) { clientArrInterp.Add(new InterpolatedClient(client.ContentString)); }
 }