Beispiel #1
0
    public void RemoveModifier(FleetVitalModifier fvm)
    {
        _modifiers.Remove(fvm);

        LogManager.getInstance.AddEntry("<i><color=yellow>" + _name + "</color></i> has lost a modifier: [" + fvm.value + " " + FleetVital.Format(fvm.type) + " due to " + fvm.reason + ".]");
        OnModifierRemoved?.Invoke(fvm);
    }
Beispiel #2
0
 public void RemoveModifier(IModifier modifier)
 {
     if (_modifiers.Remove(modifier))
     {
         OnModifierRemoved?.Invoke(this, modifier);
     }
 }
Beispiel #3
0
        private void RemoveExpiredModifiers()
        {
            var expiredModifiers = modifiers.Where(m => m.IsOver).ToList();

            foreach (var modifier in expiredModifiers)
            {
                modifier.UnsubscribeFromUpdateEvent();
                modifiers.Remove(modifier);
                OnModifierRemoved?.Invoke(modifier);
            }
        }