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


C# Architecture.LoadCaptivesFromString方法代码示例

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


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

示例1: LoadGameDataFromDataBase


//.........这里部分代码省略.........
                architecture.Technology = (int)reader["Technology"];
                architecture.Domination = (int)reader["Domination"];
                architecture.Morale = (int)reader["Morale"];
                architecture.Endurance = (int)reader["Endurance"];
                architecture.AutoHiring = (bool)reader["AutoHiring"];
                architecture.AutoRewarding = (bool)reader["AutoRewarding"];
                architecture.AutoWorking = (bool)reader["AutoWorking"];
                architecture.AutoSearching = (bool)reader["AutoSearching"];
                architecture.HireFinished = (bool)reader["HireFinished"];
                architecture.FacilityEnabled = (bool)reader["FacilityEnabled"];

                try
                {
                    architecture.MilitaryPopulation = (int)reader["MilitaryPopulation"];
                }
                catch
                {
                }

                architecture.LoadMilitariesFromString(this.Militaries, reader["Militaries"].ToString());
                architecture.LoadFacilitiesFromString(this.Facilities, reader["Facilities"].ToString());
                architecture.BuildingFacility = (int)reader["BuildingFacility"];
                architecture.BuildingDaysLeft = (int)reader["BuildingDaysLeft"];
                architecture.PlanFacilityKindID = (int)reader["PlanFacilityKind"];
                architecture.LoadFundPacksFromString(reader["FundPacks"].ToString());
                architecture.LoadSpyPacksFromString(reader["SpyPacks"].ToString());
                architecture.TodayNewMilitarySpyMessage = this.SpyMessages.GetGameObject((short)reader["TodayNewMilitarySpyMessage"]) as SpyMessage;
                architecture.TodayNewTroopSpyMessage = this.SpyMessages.GetGameObject((short)reader["TodayNewTroopSpyMessage"]) as SpyMessage;
                architecture.LoadPopulationPacksFromString(reader["PopulationPacks"].ToString());
                architecture.PlanArchitectureID = (int)reader["PlanArchitecture"];
                architecture.TransferFundArchitectureID = (int)reader["TransferFundArchitecture"];
                architecture.TransferFoodArchitectureID = (int)reader["TransferFoodArchitecture"];
                architecture.DefensiveLegionID = (int)reader["DefensiveLegion"];
                architecture.LoadCaptivesFromString(this.Captives, reader["Captives"].ToString());
                architecture.RobberTroopID = (short)reader["RobberTroop"];
                architecture.RecentlyAttacked = (short)reader["RecentlyAttacked"];
                architecture.RecentlyBreaked = (short)reader["RecentlyBreaked"];
                architecture.AILandLinksString = reader["AILandLinks"].ToString();
                architecture.AIWaterLinksString = reader["AIWaterLinks"].ToString();

                try
                {
                    architecture.youzainan = (bool)reader["youzainan"];
                    architecture.zainan.zainanzhonglei = this.GameCommonData.suoyouzainanzhonglei.Getzainanzhonglei((short)reader["zainanleixing"]);
                    architecture.zainan.shengyutianshu = (short)reader["zainanshengyutianshu"];
                }
                catch
                {
                    architecture.youzainan = false;

                }
                try
                {
                    architecture.huangdisuozai = (bool)reader["Emperor"];
                }
                catch
                {
                    architecture.huangdisuozai = false;

                }

                try
                {

                    architecture.LoadInformationsFromString(this.Informations, (string)reader["Informations"]);
                }
开发者ID:ptmaster,项目名称:ZhongHuaSanGuoZhi,代码行数:67,代码来源:GameScenario.cs

示例2: LoadGameDataFromDataBase


//.........这里部分代码省略.........
                {
                }

                architecture.HireFinished = (bool)reader["HireFinished"];
                architecture.FacilityEnabled = (bool)reader["FacilityEnabled"];

                try
                {
                    architecture.MilitaryPopulation = (int)reader["MilitaryPopulation"];
                }
                catch
                {
                }

                e.AddRange(architecture.LoadMilitariesFromString(this.Militaries, reader["Militaries"].ToString()));
                e.AddRange(architecture.LoadFacilitiesFromString(this.Facilities, reader["Facilities"].ToString()));
                architecture.BuildingFacility = (int)reader["BuildingFacility"];
                architecture.BuildingDaysLeft = (int)reader["BuildingDaysLeft"];
                architecture.PlanFacilityKindID = (int)reader["PlanFacilityKind"];
                e.AddRange(architecture.LoadFundPacksFromString(reader["FundPacks"].ToString()));
                try
                {
                    e.AddRange(architecture.LoadFoodPacksFromString(reader["FoodPacks"].ToString()));
                }
                catch { }
                // architecture.LoadSpyPacksFromString(reader["SpyPacks"].ToString());
                // architecture.TodayNewMilitarySpyMessage = this.SpyMessages.GetGameObject((short)reader["TodayNewMilitarySpyMessage"]) as SpyMessage;
                // architecture.TodayNewTroopSpyMessage = this.SpyMessages.GetGameObject((short)reader["TodayNewTroopSpyMessage"]) as SpyMessage;
                e.AddRange(architecture.LoadPopulationPacksFromString(reader["PopulationPacks"].ToString()));
                architecture.PlanArchitectureID = (int)reader["PlanArchitecture"];
                architecture.TransferFundArchitectureID = (int)reader["TransferFundArchitecture"];
                architecture.TransferFoodArchitectureID = (int)reader["TransferFoodArchitecture"];
                architecture.DefensiveLegionID = (int)reader["DefensiveLegion"];
                e.AddRange(architecture.LoadCaptivesFromString(this.Captives, reader["Captives"].ToString()));
                architecture.RobberTroopID = (short)reader["RobberTroop"];
                architecture.RecentlyAttacked = (short)reader["RecentlyAttacked"];
                architecture.RecentlyBreaked = (short)reader["RecentlyBreaked"];
                architecture.AILandLinksString = reader["AILandLinks"].ToString();
                architecture.AIWaterLinksString = reader["AIWaterLinks"].ToString();

                try
                {
                    architecture.youzainan = (bool)reader["youzainan"];
                    architecture.zainan.zainanzhonglei = this.GameCommonData.suoyouzainanzhonglei.Getzainanzhonglei((short)reader["zainanleixing"]);
                    architecture.zainan.shengyutianshu = (short)reader["zainanshengyutianshu"];
                }
                catch
                {
                    architecture.youzainan = false;

                }
                try
                {
                    architecture.huangdisuozai = (bool)reader["Emperor"];
                }
                catch
                {
                    architecture.huangdisuozai = false;

                }

                try
                {
                    e.AddRange(architecture.LoadInformationsFromString(this.Informations, (string)reader["Informations"]));
                }
                catch
开发者ID:hero1991,项目名称:ZhongHuaSanGuoZhi,代码行数:67,代码来源:GameScenario.cs


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