本文整理汇总了C#中GameObjects.Architecture类的典型用法代码示例。如果您正苦于以下问题:C# Architecture类的具体用法?C# Architecture怎么用?C# Architecture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Architecture类属于GameObjects命名空间,在下文中一共展示了Architecture类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyEffectKind
public override void ApplyEffectKind(Architecture a, Event e)
{
foreach (Military i in a.Militaries)
{
i.IncreaseQuantity(increment);
}
}
示例2: ApplyEffectKind
public override void ApplyEffectKind(Architecture a, Event e)
{
while (a.Facilities.Count > 0)
{
a.DemolishFacility(a.Facilities[0] as Facility);
}
}
示例3: PurifyInfluenceKind
public override void PurifyInfluenceKind(Architecture architecture)
{
switch (this.type)
{
case 0:
architecture.RateOfNewBubingMilitaryFundCost += 1 - this.rate;
break;
case 1:
architecture.RateOfNewNubingMilitaryFundCost += 1 - this.rate;
break;
case 2:
architecture.RateOfNewQibingMilitaryFundCost += 1 - this.rate;
break;
case 3:
architecture.RateOfNewShuijunMilitaryFundCost += 1 - this.rate;
break;
case 4:
architecture.RateOfNewQixieMilitaryFundCost += 1 - this.rate;
break;
}
}
示例4: Create
public static Military Create(GameScenario scenario, Architecture architecture, MilitaryKind kind)
{
Military military = new Military();
military.Scenario = scenario;
military.KindID = kind.ID;
military.ID = scenario.Militaries.GetFreeGameObjectID();
if (kind.RecruitLimit == 1)
{
military.Name = kind.Name;
}
else
{
military.Name = kind.Name + "队";
}
architecture.AddMilitary(military);
architecture.BelongedFaction.AddMilitary(military);
scenario.Militaries.AddMilitary(military);
architecture.DecreaseFund((int) (kind.CreateCost * kind.GetRateOfNewMilitary(architecture)));
if (kind.IsTransport)
{
military.Quantity = kind.MaxScale;
military.Morale = military.MoraleCeiling;
military.Combativity = military.CombativityCeiling;
}
return military;
}
示例5: PurifyInfluenceKind
public override void PurifyInfluenceKind(Architecture a)
{
foreach (LinkNode i in a.AIAllLinkNodes.Values)
{
i.A.disasterChanceIncrease[disasterId] -= this.increment;
}
}
示例6: PurifyInfluenceKind
public override void PurifyInfluenceKind(Architecture p)
{
if (p.BelongedFaction != null)
{
p.BelongedFaction.techniquePointCostRateDecrease.Remove(this.increment);
}
}
示例7: PurifyInfluenceKind
public override void PurifyInfluenceKind(Architecture a)
{
if (a.disasterDamageRateDecrease.ContainsKey(disasterId))
{
a.disasterDamageRateDecrease[disasterId] -= this.increment;
}
}
示例8: PurifyInfluenceKind
public override void PurifyInfluenceKind(Architecture a)
{
if (a.BelongedFaction != null)
{
a.BelongedFaction.techniqueReputationRateDecrease.Remove(this.increment);
}
}
示例9: DoWork
public void DoWork(Architecture a)
{
foreach (Influence influence in this.Kind.Influences.Influences.Values)
{
influence.DoWork(a);
}
}
示例10: ChangeArchitectureData
public bool ChangeArchitectureData(Architecture a, int X, int Y)
{
int x = X / this.TileWidth;
int y = Y / this.TileHeight;
System.Drawing.Point point = new System.Drawing.Point(x, y);
if (a.ArchitectureArea.HasPoint(new Microsoft.Xna.Framework.Point(x, y)))
{
return false;
}
if (!a.ArchitectureArea.GetContactArea(false).HasPoint(new Microsoft.Xna.Framework.Point(x, y)))
{
return false;
}
foreach (Architecture architecture in this.Architectures)
{
int pointIndex = architecture.ArchitectureArea.GetPointIndex(new Microsoft.Xna.Framework.Point(x, y));
if (pointIndex >= 0)
{
architecture.ArchitectureArea.Area.RemoveAt(pointIndex);
if (pointIndex == 0)
{
this.Architectures.Remove(architecture);
}
break;
}
}
a.ArchitectureArea.AddPoint(new Microsoft.Xna.Framework.Point(x, y));
return true;
}
示例11: ApplyInfluenceKind
public void ApplyInfluenceKind(Architecture architecture, Influence i, Applier applier, int applierID)
{
if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
{
ApplyInfluenceKind(architecture);
}
else if (this.Type == InfluenceType.个人)
{
foreach (Person p in architecture.Persons)
{
ApplyingPerson a = new ApplyingPerson(p, applier, applierID);
if (!i.appliedPerson.Contains(a))
{
i.appliedPerson.Add(a);
ApplyInfluenceKind(p, i, applier, applierID, false);
}
}
foreach (Person p in architecture.MovingPersons)
{
ApplyingPerson a = new ApplyingPerson(p, applier, applierID);
if (!i.appliedPerson.Contains(a))
{
i.appliedPerson.Add(a);
ApplyInfluenceKind(p, i, applier, applierID, false);
}
}
}
}
示例12: checkConditions
public bool checkConditions(Architecture a)
{
if (this.happened && !this.repeatable) return false;
if (GameObject.Random(this.happenChance) != 0)
{
return false;
}
if (this.AfterEventHappened >= 0)
{
if (!(base.Scenario.AllEvents.GetGameObject(this.AfterEventHappened) as Event).happened)
{
return false;
}
}
foreach (Condition i in this.architectureCond)
{
if (!i.CheckCondition(a, this))
{
return false;
}
}
foreach (Condition i in this.factionCond)
{
if (!i.CheckCondition(a.BelongedFaction, this))
{
return false;
}
}
return this.matchEventPersons(a);
}
示例13: CheckCondition
public bool CheckCondition(Architecture architecture)
{
if (this.Kind == null) return false;
this.Kind.InitializeParameter(this.Parameter);
this.Kind.InitializeParameter2(this.Parameter2);
return this.Kind.CheckConditionKind(architecture);
}
示例14: ApplyEffectKind
public virtual void ApplyEffectKind(Architecture architecture, Event e)
{
foreach (Person p in architecture.Persons)
{
this.ApplyEffectKind(p, e);
}
}
示例15: ApplyInfluenceKind
public override void ApplyInfluenceKind(Architecture p)
{
if (p.BelongedFaction != null)
{
p.BelongedFaction.techniqueTimeRateDecrease.Add(this.increment);
}
}