public CalculateAmount ( double amount ) : double | ||
amount | double | |
Résultat | double |
/// <summary> /// Affect a particular aspect of a relationship. /// </summary> /// <param name="t">The trait to affect</param> /// <param name="change"> /// How much to affect the trait. If the trait is negative, /// a numerically positive change will have a harmful effect. /// </param> 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); }
/// <summary> /// Affect a particular aspect of a relationship. /// </summary> /// <param name="t">The trait to affect</param> /// <param name="change"> /// How much to affect the trait. If the trait is negative, /// a numerically positive change will have a harmful effect. /// </param> 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); }