public static void UpdateEffects() { for (int i = 0; i < EffectList.Count; i++) { if (!EffectList[i].Update()) { EffectList.RemoveAt(i); i--; } } }
public bool RemoveEffect(int i, bool safeRemove = false) { try { if (EffectList[i].EffectTags.Contains("Trigger on Expiry") && safeRemove == false) { EffectList[i].ExpiryAction(); } EffectList.RemoveAt(i); return(true); } catch (ArgumentOutOfRangeException) { return(false); } }