/// <summary> /// Removes an effect /// </summary> public void RemoveEffect(EffectInstance eff) { if (effects.Contains(eff)) { eff.OnDeactivate(); effects.Remove(eff); } }
/// <summary> /// Removes an effect based on its name /// </summary> public void RemoveEffect(string s) { EffectInstance eff = effects.Find(f => f.effect.effectName == s); if (eff != null) { eff.OnDeactivate(); effects.Remove(eff); } }