/// <summary> /// Toggles a modifier by either adding it if it's not already, /// or removing it if it's already included. /// </summary> /// <param name="modifier">The modifier to toggle</param> public void ToggleModifier(IModifierHandler modifier) { if (!_modifiers.Add(modifier)) { _modifiers.Remove(modifier); } }
/// <summary> /// Removes a modifier to no longer be part of the calculation /// step. /// </summary> /// <param name="modifier">The modifier to remove</param> public void RemoveModifier(IModifierHandler modifier) { _modifiers.Remove(modifier); }
/// <summary> /// Adds a new modifier to that is part of the calculation /// step during each update. /// </summary> /// <param name="modifier">The modifier to add</param> public void AddModifier(IModifierHandler modifier) { _modifiers.Add(modifier); }