Exemple #1
0
 /// <summary>
 /// Will apply a new effect to this unit. The unit will manage it from here.
 /// </summary>
 protected void AddNewEffect(EffectOverTime a_effect)
 {
     _effects.Add(a_effect);
     if (!a_effect.IsPrepared)
     {
         a_effect.Prepare(_unit);
     }
 }
Exemple #2
0
 internal void ReplaceEffect(EffectOverTime a_previous, EffectOverTime a_new)
 {
     if (!a_new.IsPrepared)
     {
         a_new.Prepare(_unit, a_previous.CurrentStackCount);
     }
     a_new.timeElapsed = a_previous.timeElapsed;
     RemoveEffect(a_previous);
     AddNewEffect(a_new);
 }