• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GameObjects.Architecture类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Architecture类属于GameObjects命名空间,在下文中一共展示了Architecture类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Architecture a)
 {
     if (rate > a.facilityConstructionTimeRateDecrease)
     {
         a.facilityConstructionTimeRateDecrease = rate;
     }
 }
开发者ID:simon217,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind6440.cs


示例17: ArchitectureBeginRecentlyAttacked

        public override void ArchitectureBeginRecentlyAttacked(Architecture architecture)
        {
            if (base.Scenario.IsCurrentPlayer(architecture.BelongedFaction) && architecture.BelongedFaction != null)
            {
                Person reporter = architecture.Advisor;
                if (reporter == null)
                {
                    reporter = architecture.BelongedFaction.Leader;
                }

                this.Plugins.tupianwenziPlugin.SetPosition(ShowPosition.Bottom);
                this.Plugins.tupianwenziPlugin.SetGameObjectBranch(reporter, architecture, TextMessageKind.ArchitectureUnderAttack, "ArchitectureBeginRecentlyAttacked", "zaoshougongji.jpg", "");
                this.Plugins.tupianwenziPlugin.IsShowing = true;
                /*architecture.BelongedFaction.Leader.TextResultString = architecture.Name;
                architecture.BelongedFaction.TextResultString = architecture.Name;
                this.xianshishijiantupian(architecture.BelongedFaction.Leader, architecture.BelongedFaction.Leader.TextResultString, "ArchitectureBeginRecentlyAttacked", "zaoshougongji.jpg", "", false);
                */
                architecture.BelongedFaction.TextResultString = architecture.Name;
                this.Plugins.GameRecordPlugin.AddBranch(architecture.BelongedFaction, "zaoshougongji", architecture.Position);
                if (architecture.BelongedFaction.StopToControl)
                {
                    this.Plugins.DateRunnerPlugin.Pause();
                    architecture.BelongedFaction.StopToControl = false;

                }
            }
        }
开发者ID:kpxp,项目名称:ZhongHuaSanGuoZhi-New-Code,代码行数:27,代码来源:MGSPersonText.cs


示例18: ApplyInfluence

 public void ApplyInfluence(Architecture architecture, Applier applier, int applierID)
 {
     foreach (Influence influence in this.Influences.Values)
     {
         influence.ApplyInfluence(architecture, applier, applierID);
     }
 }
开发者ID:k45399735,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceTable.cs


示例19: PurifyInfluenceKind

        public override void PurifyInfluenceKind(Architecture architecture)
        {
            switch (this.type)
            {
                case 0:
                    architecture.RateIncrementOfNewBubingTroopOffence -= this.rate;
                    break;

                case 1:
                    architecture.RateIncrementOfNewNubingTroopOffence -= this.rate;
                    break;

                case 2:
                    architecture.RateIncrementOfNewQibingTroopOffence -= this.rate;
                    break;

                case 3:
                    architecture.RateIncrementOfNewShuijunTroopOffence -= this.rate;
                    break;

                case 4:
                    architecture.RateIncrementOfNewQixieTroopOffence -= this.rate;
                    break;
            }
        }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:25,代码来源:InfluenceKind1200.cs


示例20: ApplyEventDialogs

        public void ApplyEventDialogs(Architecture a)
        {
            this.Scenario = a.Scenario;
            if (this.OnApplyEvent != null)
            {
                this.OnApplyEvent(this, a);
            }
            if (nextScenario.Length > 0)
            {
                base.Scenario.EnableLoadAndSave = false;

                List<int> factionIds = new List<int>();
                foreach (Faction f in this.Scenario.PlayerFactions) 
                {
                    factionIds.Add(f.ID);
                }

                OleDbConnectionStringBuilder builder = new OleDbConnectionStringBuilder
                {
                    DataSource = "GameData/Scenario/" + nextScenario,
                    Provider = "Microsoft.Jet.OLEDB.4.0"
                };
                this.Scenario.LoadGameScenarioFromDatabase(builder.ConnectionString, factionIds);

                this.Scenario.GameScreen.ReloadScreenData();

                base.Scenario.EnableLoadAndSave = true;
            }
        }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:29,代码来源:Event.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GameObjects.ArchitectureList类代码示例发布时间:2022-05-26
下一篇:
C# Dynamics.PhysicsWorld类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap