public virtual void RemoveFrom(Attributes attributes) { foreach (AttributeModifier selfModifier in SelfModifiers) { attributes.Remove(selfModifier); } }
public override void OnCure(GameObject go, object instance_data) { Attributes attributes = go.GetAttributes(); for (int i = 0; i < attributeModifiers.Length; i++) { AttributeModifier modifier = attributeModifiers[i]; attributes.Remove(modifier); } }
public void Apply(AttributeLevels levels) { Attributes attributes = levels.GetAttributes(); if (modifier != null) { attributes.Remove(modifier); modifier = null; } modifier = new AttributeModifier(attribute.Id, (float)GetLevel(), DUPLICANTS.MODIFIERS.SKILLLEVEL.NAME, false, false, true); attributes.Add(modifier); }