本文整理汇总了C#中Parameters.IncStat方法的典型用法代码示例。如果您正苦于以下问题:C# Parameters.IncStat方法的具体用法?C# Parameters.IncStat怎么用?C# Parameters.IncStat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parameters
的用法示例。
在下文中一共展示了Parameters.IncStat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
public bool Test(Parameters parameters, string name, SimDescription sim, SimDescription potential, bool testScore, out int score)
{
score = 0;
if (SimTypes.IsDead(potential))
{
parameters.IncStat(name + " Dead Fail");
return false;
}
if (!parameters.CustomTestAllow (potential))
{
parameters.IncStat(name + " Custom Fail");
return false;
}
if ((mCustomTest.Valid) && (!mCustomTest.Invoke<bool>(new object[] { parameters, sim, potential })))
{
parameters.IncStat(name + " Custom Test Fail");
return false;
}
parameters.IncStat("Testing " + potential.FullName, Common.DebugLevel.Logging);
CASAgeGenderFlags age = (mAgeGender & CASAgeGenderFlags.AgeMask);
if ((age == CASAgeGenderFlags.None) && (potential.ToddlerOrBelow))
{
parameters.IncStat(name + " Too Young");
return false;
}
else if ((age != CASAgeGenderFlags.None) && ((mAgeGender & potential.Age) != potential.Age))
{
parameters.IncStat(name + " Age Fail");
return false;
}
else if (((mAgeGender & CASAgeGenderFlags.GenderMask) != CASAgeGenderFlags.None) && ((mAgeGender & potential.Gender) != potential.Gender))
{
parameters.IncStat(name + " Gender Fail");
return false;
}
else if (!mSpecies.Contains(potential.Species))
{
parameters.IncStat(name + " Species Fail");
return false;
}
if ((!mAllowAffair) && (parameters.mIsRomantic) && (sim != null))
{
if (((potential.Partner != null) || (sim.Partner != null)) && (potential.Partner != sim))
{
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)
//.........这里部分代码省略.........
示例2: Filter
public ICollection<SimDescription> Filter(Parameters parameters, string name, SimDescription sim, ICollection<SimDescription> potentials)
{
if (!mEnabled)
{
parameters.IncStat(name + " Disabled");
if (parameters.mDefaultAll)
{
return parameters.mManager.Sims.All;
}
else
{
return potentials;
}
}
Collect(sim);
if ((sim != null) && (potentials == null))
{
switch (mStandardFilter)
{
case StandardFilter.Me:
potentials = new List<SimDescription>();
potentials.Add(sim);
break;
case StandardFilter.Partner:
potentials = new List<SimDescription>();
if (sim.Partner != null)
{
potentials.Add(sim.Partner);
}
break;
case StandardFilter.AnyFlirt:
potentials = parameters.mManager.Flirts.FindAnyFor(parameters, sim, mAllowAffair, false);
break;
case StandardFilter.ExistingFriend:
potentials = parameters.mManager.Friends.FindExistingFriendFor(parameters, sim, mStandardGate, mStandardIgnoreBusy);
break;
case StandardFilter.Partnered:
potentials = parameters.mManager.Romances.FindPartneredFor(sim);
break;
case StandardFilter.ExistingFlirt:
potentials = parameters.mManager.Flirts.FindExistingFor(parameters, sim, mStandardDisallowPartner);
break;
case StandardFilter.ExistingOrAnyFlirt:
potentials = parameters.mManager.Flirts.FindExistingFor(parameters, sim, mStandardDisallowPartner);
if ((potentials == null) || (potentials.Count == 0))
{
potentials = parameters.mManager.Flirts.FindAnyFor(parameters, sim, mAllowAffair, false);
}
break;
case StandardFilter.ExistingEnemy:
potentials = parameters.mManager.Friends.FindExistingEnemyFor(parameters, sim, mStandardGate, mStandardIgnoreBusy);
break;
case StandardFilter.Nemesis:
potentials = parameters.mManager.Friends.FindNemesisFor(parameters, sim, mStandardIgnoreBusy);
break;
}
if (potentials != null)
{
parameters.AddStat(name + " " + mStandardFilter.ToString(), potentials.Count);
}
}
SimPersonality clan = parameters.mManager as SimPersonality;
if (!string.IsNullOrEmpty(mClan))
{
clan = parameters.mManager.Personalities.GetPersonality(mClan);
if (clan == null)
{
parameters.IncStat(mClan + " Missing");
return new List<SimDescription>();
}
}
if (clan != null)
{
if (potentials == null)
{
if (mClanMembers)
{
potentials = clan.GetClanMembers(mClanLeader);
parameters.mIsFriendly = true;
}
else if (mClanLeader)
{
potentials = clan.MeAsList;
parameters.mIsFriendly = true;
}
if (potentials != null)
{
parameters.AddStat(name + " Clan", potentials.Count);
}
}
//.........这里部分代码省略.........