Attribute bonus percent representation. Example. 40% increase/decrease to attribute base. By: NeilDG
    private void CheckEquipment()
    {
        this.testRawBonuses     = this.GetComponentsInChildren <TestRawBonus>();
        this.testPercentBonuses = this.GetComponentsInChildren <TestPercentBonus>();

        foreach (TestRawBonus testRawBonus in this.testRawBonuses)
        {
            AttributeBonus attributeBonus = testRawBonus.GetAttributeBonus();

            this.attributeTable[testRawBonus.GetTargetAttribute()].AddAttributeBonus(attributeBonus);
        }

        foreach (TestPercentBonus testPercentBonus in this.testPercentBonuses)
        {
            AttributeBonusPercent attributeBonusPercent = testPercentBonus.GetAttributeBonusPercent();
            this.attributeTable[testPercentBonus.GetTargetAttribute()].AddBonusPercent(attributeBonusPercent);
        }
    }
Exemplo n.º 2
0
 public void RemoveBonusPercent(AttributeBonusPercent bonusPercent)
 {
     this.bonusPercentList.Remove(bonusPercent);
     this.valueUpdated = true;
 }
Exemplo n.º 3
0
 public void AddBonusPercent(AttributeBonusPercent bonusPercent)
 {
     this.bonusPercentList.Add(bonusPercent);
     this.valueUpdated = true;
 }
 // Use this for initialization
 void Start()
 {
     this.attributeBonusPercent = new AttributeBonusPercent(this.percentNormalized, this.percentType);
 }
 // Use this for initialization
 void Start()
 {
     this.attributeBonusPercent = new AttributeBonusPercent(this.percentNormalized, this.percentType);
 }