当前位置: 首页>>代码示例>>C#>>正文


C# Person.meichushengdehaiziliebiao方法代码示例

本文整理汇总了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;

                }
            }
        }
开发者ID:simon217,项目名称:ZhongHuaSanGuoZhi,代码行数:67,代码来源:Person.cs

示例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;

                }
            }
        }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:46,代码来源:Person1214.cs

示例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;
                }
//.........这里部分代码省略.........
开发者ID:ptmaster,项目名称:ZhongHuaSanGuoZhi,代码行数:101,代码来源:Person.cs


注:本文中的GameObjects.Person.meichushengdehaiziliebiao方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。