protected void RecalculateParameters() { var totalModifiersValues = new Dictionary <ModifierType, float>(); var blockModifiersValues = towerBlockData.GetModifiersValues(); foreach (KeyValuePair <ModifierType, float> modifierValue in blockModifiersValues) { totalModifiersValues.Add(modifierValue.Key, modifierValue.Value); } foreach (KeyValuePair <ModifierType, float> modifierValue in totalModifiersValues) { switch (modifierValue.Key) { case ModifierType.TowerReloadTime: reloadTime.Upgrade(modifierValue.Value); break; } } }