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


C# Person.Hates方法代码示例

本文整理汇总了C#中GameObjects.Person.Hates方法的典型用法代码示例。如果您正苦于以下问题:C# Person.Hates方法的具体用法?C# Person.Hates怎么用?C# Person.Hates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameObjects.Person的用法示例。


在下文中一共展示了Person.Hates方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckConditionKind

 public override bool CheckConditionKind(Person person)
 {
     return person.BelongedFaction != null && person.Hates(person.BelongedFaction.Leader);
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:4,代码来源:ConditionKind952.cs

示例2: XuanZeMeiNv

        public Person XuanZeMeiNv(Person nvren)
        {
            Person tookSpouse = null;

            nvren.LocationArchitecture.DecreaseFund(50000);

            nvren.Status = PersonStatus.Princess;
            nvren.workKind = ArchitectureWorkKind.无;

            nvren.LocationTroop = null;
            nvren.TargetArchitecture = null;

            if (nvren.Spouse != null)
            {
                Person p = new Person();
                foreach (Person person in base.Scenario.Persons)
                {
                    if (person == nvren.Spouse)
                    {
                        p = person;
                        break;
                    }
                }

                if ((p != null) && p.ID != nvren.LocationArchitecture.BelongedFaction.LeaderID)
                {
                    if (p.Alive)
                    {
                        tookSpouse = p;

                        p.Hates(this.BelongedFaction.Leader);
                    }
                }
            }// end if (this.CurrentPerson.Spouse != -1)
            ExtensionInterface.call("TakeToHouGong", new Object[] { this.Scenario, this, nvren });

            return tookSpouse;
        }
开发者ID:ptmaster,项目名称:ZhongHuaSanGuoZhi,代码行数:38,代码来源:Person.cs

示例3: CheckConditionKind

 public override bool CheckConditionKind(Person person)
 {
     return person.BelongedFactionWithPrincess != null && !person.Hates(person.BelongedFactionWithPrincess.Leader);
 }
开发者ID:kpxp,项目名称:ZhongHuaSanGuoZhi-New-Code,代码行数:4,代码来源:ConditionKind953.cs

示例4: 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 });
            }
        }
开发者ID:ptmaster,项目名称:ZhongHuaSanGuoZhi,代码行数:63,代码来源:Person.cs


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