/// <summary> /// Adding / updating Powerups /// </summary> /// <param name="obj"></param> /// <param name="message"></param> public void AddPowerUp(JObject obj, string message) { int id = (int)obj.First; PowerUp pw = JsonConvert.DeserializeObject <PowerUp>(message); if (!PowerUps.ContainsKey(id)) { PowerUps.Add(id, pw); } else { PowerUps[id] = PowerUps[id].Update(pw); } }