本文整理汇总了C#中GameObjects.Person.meichushengdehaiziliebiao方法的典型用法代码示例。如果您正苦于以下问题:C# Person.meichushengdehaiziliebiao方法的具体用法?C# Person.meichushengdehaiziliebiao怎么用?C# Person.meichushengdehaiziliebiao使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObjects.Person
的用法示例。
在下文中一共展示了Person.meichushengdehaiziliebiao方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: huaiyunshijian
private void huaiyunshijian()
{
if (this.huaiyun)
{
this.huaiyuntianshu++;
//if (this.huaiyuntianshu == 30)
if (GameObject.Chance((this.huaiyuntianshu - 20) * 5) && !this.faxianhuaiyun)
{
ExtensionInterface.call("FoundPregnant", new Object[] { this.Scenario, this });
this.faxianhuaiyun = true;
if (this.BelongedFaction != null && this == this.BelongedFaction.Leader) //女君主自己怀孕
{
}
else
{
this.Scenario.GameScreen.faxianhuaiyun(this);
}
}
else if (GameObject.Chance((this.huaiyuntianshu - 290) * 5))
{
Person haizifuqin = new Person();
Person haizi = new Person();
this.huaiyun = false;
this.faxianhuaiyun = false;
this.huaiyuntianshu = -1;
if (this.suoshurenwu == -1)
{
this.suoshurenwu = this.LocationArchitecture.BelongedFaction.LeaderID;
}
haizifuqin = this.Scenario.Persons.GetGameObject(this.suoshurenwu) as Person;
if (haizifuqin != null)
{
int count = 0;
do
{
PersonList origChildren = haizifuqin.meichushengdehaiziliebiao();
if (origChildren.Count > 0)
{
haizi = origChildren[0] as Person;
haizi.father = this.Sex ? haizifuqin.ID : this.ID;
haizi.mother = this.Sex ? this.ID : haizifuqin.ID;
}
else
{
haizi = Person.createChildren(this.Scenario.Persons.GetGameObject(this.suoshurenwu) as Person, this);
}
base.Scenario.YearTable.addChildrenBornEntry(base.Scenario.Date, haizifuqin, this, haizi);
haizifuqin.TextResultString = haizi.Name;
base.Scenario.GameScreen.xiaohaichusheng(haizifuqin, haizi);
base.Scenario.haizichusheng(haizi, haizifuqin, this, origChildren.Count > 0);
count++;
} while ((GameObject.Chance(haizifuqin.multipleChildrenRate) || GameObject.Chance(this.multipleChildrenRate)) && count < Math.Max(haizifuqin.maxChildren, this.maxChildren));
haizifuqin.suoshurenwu = -1;
}
this.suoshurenwu = -1;
}
}
}
示例2: huaiyunshijian
private void huaiyunshijian()
{
if (this.huaiyun)
{
this.huaiyuntianshu++;
//if (this.huaiyuntianshu == 30)
if (GameObject.Chance((this.huaiyuntianshu - 20) * 5) && !this.faxianhuaiyun)
{
this.faxianhuaiyun = true;
this.Scenario.GameScreen.faxianhuaiyun(this);
}
else if (GameObject.Chance((this.huaiyuntianshu - 290) * 5))
{
Person haizifuqin = new Person();
Person haizi = new Person();
this.huaiyun = false;
this.faxianhuaiyun = false;
this.huaiyuntianshu = -1;
if (this.suoshurenwu == -1)
{
this.suoshurenwu = this.FeiZiLocationArchitecture.BelongedFaction.LeaderID;
}
haizifuqin = this.Scenario.Persons.GetGameObject(this.suoshurenwu) as Person;
PersonList origChildren = haizifuqin.meichushengdehaiziliebiao();
if (origChildren.Count > 0)
{
haizi = origChildren[0] as Person;
}
else
{
haizi = this.createChildren(this.Scenario.Persons.GetGameObject(this.suoshurenwu) as Person, this);
}
haizifuqin.TextResultString = haizi.Name;
base.Scenario.GameScreen.xiaohaichusheng(haizifuqin);
base.Scenario.haizichusheng(haizi, this);
this.suoshurenwu = -1;
haizifuqin.suoshurenwu = -1;
}
}
}
示例3: huaiyunshijian
private void huaiyunshijian()
{
if (this.huaiyun)
{
this.huaiyuntianshu++;
//if (this.huaiyuntianshu == 30)
if (GameObject.Chance((this.huaiyuntianshu - 20) * 5) && !this.faxianhuaiyun)
{
ExtensionInterface.call("FoundPregnant", new Object[] { this.Scenario, this });
this.faxianhuaiyun = true;
if (this.BelongedFaction != null && this == this.BelongedFaction.Leader) //女君主自己怀孕
{
this.Scenario.GameScreen.selfFoundPregnant(this);
}
else
{
if (this.Status == PersonStatus.Princess)
{
this.Scenario.GameScreen.faxianhuaiyun(this);
}
else
{
this.Scenario.GameScreen.coupleFoundPregnant(this);
}
}
}
else if (GameObject.Chance((this.huaiyuntianshu - 290) * 5))
{
Person haizifuqin = new Person();
Person haizi = new Person();
this.huaiyun = false;
this.faxianhuaiyun = false;
this.huaiyuntianshu = -1;
if (this.suoshurenwu == -1)
{
if (this.BelongedFaction != null)
{
this.suoshurenwu = this.BelongedFaction.LeaderID;
}
else
{
return;
}
}
haizifuqin = this.Scenario.Persons.GetGameObject(this.suoshurenwu) as Person;
if (haizifuqin != null)
{
int count = 0;
do
{
PersonList origChildren = haizifuqin.meichushengdehaiziliebiao();
if (origChildren.Count > 0)
{
haizi = origChildren[0] as Person;
haizi.father = this.Sex ? haizifuqin : this;
haizi.mother = this.Sex ? this : haizifuqin;
}
else
{
haizi = Person.createChildren(this.Scenario.Persons.GetGameObject(this.suoshurenwu) as Person, this);
}
base.Scenario.YearTable.addChildrenBornEntry(base.Scenario.Date, haizifuqin, this, haizi);
haizifuqin.TextResultString = haizi.Name;
base.Scenario.GameScreen.xiaohaichusheng(haizifuqin, haizi);
base.Scenario.haizichusheng(haizi, haizifuqin, this, origChildren.Count > 0);
count++;
} while ((GameObject.Chance(haizifuqin.multipleChildrenRate) || GameObject.Chance(this.multipleChildrenRate)) && count < Math.Max(haizifuqin.maxChildren, this.maxChildren));
haizifuqin.suoshurenwu = -1;
}
this.suoshurenwu = -1;
}
}
else if (this.Spouse != null && !this.huaiyun && !this.Spouse.huaiyun && GlobalVariables.getChildrenRate > 0 &&
GameObject.Random((int) (10000.0 / GlobalVariables.getChildrenRate * 20)) == 0 &&
(this.LocationArchitecture != null && this.Spouse.LocationArchitecture == this.LocationArchitecture ||
(this.LocationTroop != null && this.Spouse.LocationTroop == this.LocationTroop)) &&
this.Status == PersonStatus.Normal && this.Spouse.Status == PersonStatus.Normal &&
this.isLegalFeiZi(this.Spouse) && this.Spouse.isLegalFeiZi(this))
{
this.suoshurenwu = this.Spouse.ID;
this.Spouse.suoshurenwu = this.ID;
if (this.Sex)
{
this.huaiyun = true;
this.huaiyuntianshu = 0;
}
else
{
this.Spouse.huaiyun = true;
this.Spouse.huaiyuntianshu = 0;
}
//.........这里部分代码省略.........