Exemple #1
0
 int CompareModifiers(TPModifier modifier1, TPModifier modifier2)
 {
     if (modifier1.Priority > modifier2.Priority)
     {
         return(1);
     }
     else if (modifier1.Priority < modifier2.Priority)
     {
         return(-1);
     }
     return(0);
 }
Exemple #2
0
 /// <summary>
 /// Removes TPModifier from list of modifiers, sorts modifiers, recalculates Value
 /// </summary>
 /// <param name="modifier"></param>
 public void RemoveModifier(TPModifier modifier)
 {
     _modifiers.Remove(modifier);
     Recalculate();
 }
Exemple #3
0
 /// <summary>
 /// Adds TPModifier to list of modifiers, sorts modifiers, recalculates Value
 /// </summary>
 /// <param name="modifier"></param>
 public void AddModifier(TPModifier modifier)
 {
     _modifiers.Add(modifier);
     _modifiers.Sort(CompareModifiers);
     Recalculate();
 }