public GameAttributeInstance AddAttribute(GameAttribute attribute) { GameAttributeInstance attr = new GameAttributeInstance(this.m_Owner, attribute); AddAttribute(attr); return(attr); }
public void AddAttribute(GameAttributeInstance attribute) { if (!m_AttributesList.Contains(attribute)) { m_AttributesList.Add(attribute); m_AttributeNameDict.Add(attribute.Name, attribute); } }
/// <summary> /// 清空属性加成 /// </summary> /// <param name="attribute"></param> /// <param name="modifier"></param> public void ClearModifier(GameAttributeInstance attribute) { attribute.ClearModifier(); }
/// <summary> /// 移除属性加成 /// </summary> /// <param name="attribute"></param> /// <param name="modifier"></param> public void RemoveModifier(GameAttributeInstance attribute, GameAttributeModifier modifier) { attribute.RemoveModifier(modifier); }
/// <summary> /// 增加属性加成 /// </summary> /// <param name="attribute"></param> /// <param name="modifier"></param> public void AddModifier(GameAttributeInstance attribute, GameAttributeModifier modifier) { attribute.AddModifier(modifier); }