/// <summary> /// Adding / updating projectiles /// </summary> /// <param name="obj"></param> /// <param name="message"></param> public void AddProjectile(JObject obj, string message) { int id = (int)obj.First; Projectile proj = JsonConvert.DeserializeObject <Projectile>(message); if (!Projectiles.ContainsKey(id)) { Projectiles.Add(id, proj); } else { Projectiles[id] = Projectiles[id].Update(proj); } }