本文整理汇总了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;
}
示例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;
}
示例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();
}
}
}
示例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;
}