}//effector public void RemoveStatusEffect(IStatusEffector effector) { if(this.Effectors == null) return; if(!this.Effectors.Contains(effector)) return; effector.RemoveEffect(this.Owner); this.Effectors.Remove(effector); this.DebugStatusApplied.Remove(effector.GetName()); }//RemoveStatusEffect
}//checkEffectorTImeout public void ApplyStatusEffect(IStatusEffector effector) { if (this.Effectors == null) { this.Effectors = new List<IStatusEffector>(); return; } if(this.Effectors.Contains(effector)) return; if (effector == null) { #if UNITY_EDITOR Debug.LogWarning("ApplyStatusEffect: Effector is null! [" + this.name + "]"); #endif return; } effector.ApplyEffect(Owner); this.Effectors.Add(effector); this.DebugStatusApplied.Add(effector.GetName()); }//effector