Sharplike.Storylib.Relationships.Relationship.Affect C# (CSharp) Метод

Affect() публичный Метод

Affect a particular aspect of a relationship.
public Affect ( Trait t, double change ) : void
t Trait The trait to affect
change double /// How much to affect the trait. If the trait is negative, /// a numerically positive change will have a harmful effect. ///
Результат void
        public void Affect(Trait t, double change)
        {
            double annoyancefactor = Owner.Annoyances[t];

            if (annoyancefactor >= 0)
                change *= annoyancefactor;
            else if (annoyancefactor < 0)
                change /= annoyancefactor;

            change = t.CalculateAmount(change);

            impressions[t] += change;
            opinions[t] += (change / Ratio);
        }