本文整理汇总了C#中Parameters.AddScoring方法的典型用法代码示例。如果您正苦于以下问题:C# Parameters.AddScoring方法的具体用法?C# Parameters.AddScoring怎么用?C# Parameters.AddScoring使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parameters
的用法示例。
在下文中一共展示了Parameters.AddScoring方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
//.........这里部分代码省略.........
parameters.IncStat(name + " Affair Denied");
return false;
}
}
if ((sim != null) && (sim != potential))
{
if ((mStandardDisallowPartner) && (sim.Partner == potential))
{
parameters.IncStat(name + " Partner Fail");
return false;
}
if ((!mAllowOpposing) && (StoryProgression.Main.Personalities.IsOpposing(parameters, sim, potential, false)))
{
parameters.IncStat(name + " Clan Opposing Fail");
return false;
}
if (!parameters.mIsFriendly)
{
if (StoryProgression.Main.Personalities.IsFriendly(parameters, sim, potential))
{
parameters.IncStat(name + " Clan Friendly Denied");
return false;
}
}
int liking = 0;
Relationship relation = Relationship.Get(sim, potential, false);
if (relation != null)
{
liking = (int)relation.LTR.Liking;
}
if (liking < mRelationshipMinimum)
{
parameters.IncStat(name + " Relationship Underscore");
return false;
}
else if (liking > mRelationshipMaximum)
{
parameters.IncStat(name + " Relationship Overscore");
return false;
}
}
foreach (IValueTestOption value in mValueTestOptions)
{
if (!value.Satisfies())
{
parameters.IncStat(name + " " + value.ToString() + " Value Fail");
return false;
}
}
foreach (AgeGenderOption ageGender in mAgeGenderOptions)
{
if (!ageGender.Satisfies(potential.Age, potential.Gender, potential.Species))
{
parameters.IncStat(name + " " + ageGender.Name + " User Fail");
return false;
}
}
if (mDisallowRelated)
{
if (parameters.mManager.Flirts.IsCloselyRelated(sim, potential))
{
parameters.IncStat(name + " Closely Related");
return false;
}
}
if ((testScore) && (Score(potential, sim, parameters.mAbsoluteScoring, out score)))
{
int scoringMinimum = mScoringMinimum + parameters.mScoreDelta;
int scoringMaximum = mScoringMaximum + parameters.mScoreDelta;
if (score < scoringMinimum)
{
parameters.AddScoring(name + " Under Scoring Fail", score);
return false;
}
else if (score > scoringMaximum)
{
parameters.AddScoring(name + " Over Scoring Fail", score);
return false;
}
parameters.AddStat(name + " Score Success", score);
return true;
}
else
{
parameters.IncStat(name + " No Scoring");
return true;
}
}