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


C# GameObjects.Architecture类代码示例

本文整理汇总了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);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:EventEffect1100.cs

示例2: ApplyEffectKind

 public override void ApplyEffectKind(Architecture a, Event e)
 {
     while (a.Facilities.Count > 0)
     {
         a.DemolishFacility(a.Facilities[0] as Facility);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:EventEffect1230.cs

示例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;
            }
        }
开发者ID:k45399735,项目名称:ZhongHuaSanGuoZhi,代码行数:25,代码来源:InfluenceKind1100.cs

示例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;
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:26,代码来源:Military.cs

示例5: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Architecture a)
 {
     foreach (LinkNode i in a.AIAllLinkNodes.Values)
     {
         i.A.disasterChanceIncrease[disasterId] -= this.increment;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind6450.cs

示例6: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Architecture p)
 {
     if (p.BelongedFaction != null)
     {
         p.BelongedFaction.techniquePointCostRateDecrease.Remove(this.increment);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind6610.cs

示例7: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Architecture a)
 {
     if (a.disasterDamageRateDecrease.ContainsKey(disasterId))
     {
         a.disasterDamageRateDecrease[disasterId] -= this.increment;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind6430.cs

示例8: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Architecture a)
 {
     if (a.BelongedFaction != null)
     {
         a.BelongedFaction.techniqueReputationRateDecrease.Remove(this.increment);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind6600.cs

示例9: DoWork

 public void DoWork(Architecture a)
 {
     foreach (Influence influence in this.Kind.Influences.Influences.Values)
     {
         influence.DoWork(a);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:Facility.cs

示例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;
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:29,代码来源:MapPanel.cs

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

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

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

示例14: ApplyEffectKind

 public virtual void ApplyEffectKind(Architecture architecture, Event e)
 {
     foreach (Person p in architecture.Persons)
     {
         this.ApplyEffectKind(p, e);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:EventEffectKind.cs

示例15: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Architecture p)
 {
     if (p.BelongedFaction != null)
     {
         p.BelongedFaction.techniqueTimeRateDecrease.Add(this.increment);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind6620.cs


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