public void RemoveEffect(Effect effect) { Debug.Assert(effect.Target == this); Debug.Assert(effects.Contains(effect)); Log.Debug(this.Name + " lost effect " + effect.GetType().Name); effects.Remove(effect); effect.Detach(this); }
public void ApplyEffect(Effect effect) { Log.Debug(this.Name + " gained effect " + effect.GetType().Name); effects.Add(effect); effect.Attach(this); }