本文整理汇总了C#中GameObjects.Person.Closes方法的典型用法代码示例。如果您正苦于以下问题:C# Person.Closes方法的具体用法?C# Person.Closes怎么用?C# Person.Closes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObjects.Person
的用法示例。
在下文中一共展示了Person.Closes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckConditionKind
public override bool CheckConditionKind(Person person)
{
return person.BelongedFactionWithPrincess != null && !person.Closes(person.BelongedFactionWithPrincess.Leader);
}
示例2: CheckConditionKind
public override bool CheckConditionKind(Person person)
{
return person.BelongedFaction != null && person.Closes(person.BelongedFaction.Leader);
}
示例3: GoForHouGong
public void GoForHouGong(Person nvren)
{
if (this.LocationArchitecture != null && this.Status == PersonStatus.Normal)
{
int houGongDays = nvren.Glamour / 4 + GameObject.Random(6) + 10;
if (houGongDays > 60)
{
houGongDays = GameObject.Random(10) + 60;
}
if (!nvren.Hates(this) && GlobalVariables.getChildrenRate > 0)
{
float extraRate = 1;
if (this.Closes(nvren))
{
extraRate += 0.2f;
}
if (nvren.Closes(this))
{
extraRate += 0.2f;
}
if (nvren.Ideal == this.Ideal)
{
extraRate += 0.2f;
}
if (this.Spouse == nvren)
{
extraRate += 1.6f;
}
float pregnantChance = GlobalVariables.getChildrenRate / 100.0f;
if (GlobalVariables.PersonNaturalDeath)
{
pregnantChance /= this.NumberOfChildren;
}
pregnantChance *= houGongDays * extraRate;
pregnantChance += this.pregnantChance + nvren.pregnantChance;
if (GameObject.Chance(Math.Max((int)pregnantChance, Parameters.MinPregnantProb))
&& !nvren.huaiyun && !this.huaiyun && this.isLegalFeiZi(nvren) &&
(this.LocationArchitecture.BelongedFaction.Leader.meichushengdehaiziliebiao().Count - this.LocationArchitecture.yihuaiyundefeiziliebiao().Count > 0 || GlobalVariables.createChildren))
{
nvren.suoshurenwu = this.ID;
this.suoshurenwu = nvren.ID;
if (nvren.Sex)
{
nvren.huaiyun = true;
nvren.huaiyuntianshu = -GameObject.Random(houGongDays);
}
else
{
this.huaiyun = true;
this.huaiyuntianshu = -GameObject.Random(houGongDays);
}
}
}
this.OutsideTask = OutsideTaskKind.后宮;
this.TargetArchitecture = this.LocationArchitecture;
this.ArrivingDays = houGongDays;
this.Status = PersonStatus.Moving;
this.TaskDays = this.ArrivingDays;
ExtensionInterface.call("GoForHouGong", new Object[] { this.Scenario, this, nvren });
}
}