Example #1
0
 // Use this for initialization
 void Awake()
 {
     for (int i = 0; i < Stat_Bonus_Names.Count; i++)
     {
         StatModifierClass temp = new StatModifierClass(Stat_Bonus_Names[i], Stat_Bonus_type_HP_Attack_Defence_Agility[i], Stat_Bonus_Values[i]);
         StatModifiers.Add(temp);
     }
 }
Example #2
0
    //method for removing the modifier from the list of active stat modifiers
    public void removeModifier(StatModifierClass statModifier)
    {
        int index = -1;

        //change so that it searches for correct statbonus name using if and if it doesn't exist, do nothing

        for (int i = 0; i < statModifiers.Count; i++)
        {
            if ((statModifiers[i].getModifierName() == statModifier.getModifierName()) && (statModifiers[i].getModifierValue() == statModifier.getModifierValue()))
            {
                index = i;
            }
        }

        if (index != -1)
        {
            statModifiers.RemoveAt(index);
        }
    }
Example #3
0
 //method for adding a modifier to the active modifiers list
 public void addModifier(StatModifierClass statModifier)
 {
     statModifiers.Add(statModifier);
 }