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


C# Military.StopRecruitment方法代码示例

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


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

示例1: RemoveMilitary

 public void RemoveMilitary(Military military)
 {
     this.Militaries.Remove(military);
     military.StopRecruitment();
     military.BelongedArchitecture = null;
 }
开发者ID:ptmaster,项目名称:ZhongHuaSanGuoZhi,代码行数:6,代码来源:Architecture.cs

示例2: AddPersonToTrainingWork

 public void AddPersonToTrainingWork(Person person, Military military)
 {
     if (person.WorkKind != ArchitectureWorkKind.无)
     {
         this.RemovePersonFromWorkingList(person);
     }
     person.WorkKind = ArchitectureWorkKind.训练;
     military.StopTraining();
     military.StopRecruitment();
     person.TrainingMilitaryID = military.ID;
     person.TrainingMilitary = military;
     military.TrainingPersonID = person.ID;
     military.TrainingPerson = person;
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:14,代码来源:Architecture_1.cs

示例3: RecruitmentMilitary

        private void RecruitmentMilitary(Military military)
        {
            if ((((this.MilitaryPopulation != 0) && (this.Population != 0) && (!GlobalVariables.PopulationRecruitmentLimit || (this.ArmyQuantity <= this.Population))) && ((this.Fund >= (Parameters.RecruitmentFundCost * this.AreaCount * (this.CanRecruitMilitary(military.Kind) ? 1 : 10))) && (this.Domination >= Parameters.RecruitmentDomination))) && (((this.Morale >= Parameters.RecruitmentMorale) && ((military.RecruitmentPerson != null) && (military.RecruitmentPerson.BelongedFaction != null))) && (military.Quantity < military.Kind.MaxScale)) && (military.BelongedFaction != null))
            {
                int randomValue = StaticMethods.GetRandomValue((int)((military.RecruitmentPerson.RecruitmentAbility * military.Kind.MinScale) * Parameters.RecruitmentRate), 0x7d0);
                int populationDecrement;

                if ((randomValue + military.Quantity) > military.Kind.MaxScale)
                {
                    randomValue = military.Kind.MaxScale - military.Quantity;
                }
                if ((randomValue * military.Kind.PointsPerSoldier) > military.BelongedFaction.TechniquePoint && military.Kind.PointsPerSoldier != 0)
                {
                    if (!(((this.BelongedSection == null) || (this.BelongedSection.AIDetail == null)) || this.BelongedSection.AIDetail.AutoRun))
                    {
                        military.BelongedFaction.DepositTechniquePointForTechnique(randomValue * military.Kind.PointsPerSoldier);
                    }
                    randomValue = military.BelongedFaction.TechniquePoint / military.Kind.PointsPerSoldier;
                }
                populationDecrement = randomValue;
                if (!base.Scenario.IsPlayer(this.BelongedFaction))
                {
                    randomValue = (int)(randomValue * Parameters.AIRecruitmentSpeedRate);
                }
                if (randomValue > 0)
                {
                    this.DecreaseFund(Parameters.RecruitmentFundCost * this.AreaCount * (this.CanRecruitMilitary(military.Kind) ? 1 : 10));
                    if (populationDecrement > this.MilitaryPopulation)
                    {
                        populationDecrement = this.MilitaryPopulation;
                        randomValue = populationDecrement;
                    }
                    if (populationDecrement > this.Population)
                    {
                        populationDecrement = this.Population;
                        randomValue = populationDecrement;
                    }
                    this.DecreaseMilitaryPopulation(populationDecrement);
                    this.DecreasePopulation(populationDecrement);

                    int scales = military.Scales;
                    military.IncreaseQuantity(randomValue, this.MoraleOfRecruitment, this.CombativityOfRecruitment, 0, 0);
                    if (this.HasSpy && ((military.Scales / 10) > (scales / 10)))
                    {
                        this.AddMessageToTodayMilitaryScaleSpyMessage(military);
                    }
                    if (this.Population < this.RecruitmentPopulationBoundary)
                    {
                        this.DecreaseDomination(GameObject.Random(6));
                        this.DecreaseMorale(GameObject.Random(6) * 2);
                    }
                    else
                    {
                        this.DecreaseDomination(GameObject.Random(2));
                        this.DecreaseMorale(GameObject.Random(2) * 2);
                    }
                    this.BelongedFaction.DecreaseTechniquePoint(randomValue * military.Kind.PointsPerSoldier);
                    int increment = StaticMethods.GetRandomValue(randomValue * 10, military.Kind.MinScale);
                    if (increment > 0)
                    {
                        military.RecruitmentPerson.AddRecruitmentExperience(increment);
                        military.RecruitmentPerson.AddCommandExperience(increment);
                        military.RecruitmentPerson.AddGlamourExperience(increment);
                        military.RecruitmentPerson.IncreaseReputation(increment * 4);
                        military.RecruitmentPerson.BelongedFaction.IncreaseReputation(increment * 2);
                        military.RecruitmentPerson.BelongedFaction.IncreaseTechniquePoint(increment * 100);
                    }
                }
            }
            else
            {
                if (military.RecruitmentPerson != null)
                {
                    military.StopRecruitment();
                }
            }
        }
开发者ID:ptmaster,项目名称:ZhongHuaSanGuoZhi,代码行数:77,代码来源:Architecture.cs

示例4: RecruitMilitary

 public void RecruitMilitary(Military m)
 {
     if (this.recruitmentMilitary != null)
     {
         this.recruitmentMilitary.StopRecruitment();
     }
     m.StopRecruitment();
     this.WorkKind = ArchitectureWorkKind.补充;
     this.RecruitmentMilitary = m;
     m.RecruitmentPerson = this;
 }
开发者ID:kanjianlema,项目名称:ZhongHuaSanGuoZhi,代码行数:11,代码来源:Person.cs


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