本文整理汇总了C#中GameObjects.Faction.LoadInformationsFromString方法的典型用法代码示例。如果您正苦于以下问题:C# Faction.LoadInformationsFromString方法的具体用法?C# Faction.LoadInformationsFromString怎么用?C# Faction.LoadInformationsFromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObjects.Faction
的用法示例。
在下文中一共展示了Faction.LoadInformationsFromString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadGameDataFromDataBase
//.........这里部分代码省略.........
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"]);
}
catch
{
}
this.Architectures.AddArchitectureWithEvent(architecture);
this.AllArchitectures.Add(architecture.ID, architecture);
}
DbConnection.Close();
DbConnection.Open();
reader = new OleDbCommand("Select * From Routeway", DbConnection).ExecuteReader();
while (reader.Read())
{
Routeway routeway = new Routeway();
routeway.Scenario = this;
routeway.ID = (short)reader["ID"];
routeway.Building = (bool)reader["Building"];
routeway.ShowArea = (bool)reader["ShowArea"];
routeway.RemoveAfterClose = (bool)reader["RemoveAfterClose"];
routeway.LastActivePointIndex = (int)reader["LastActivePointIndex"];
routeway.InefficiencyDays = (int)reader["InefficiencyDays"];
routeway.StartArchitecture = this.Architectures.GetGameObject((int)reader["StartArchitecture"]) as Architecture;
if (routeway.StartArchitecture != null)
{
routeway.StartArchitecture.Routeways.Add(routeway);
}
routeway.EndArchitecture = this.Architectures.GetGameObject((int)reader["EndArchitecture"]) as Architecture;
routeway.DestinationArchitecture = this.Architectures.GetGameObject((int)reader["DestinationArchitecture"]) as Architecture;
routeway.LoadRoutePointsFromString(reader["Points"].ToString());
this.Routeways.AddRoutewayWithEvent(routeway);
}
DbConnection.Close();
示例2: LoadGameDataFromDataBase
//.........这里部分代码省略.........
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
{
}
try
{
architecture.SuspendTroopTransfer = (int)reader["SuspendTroopTransfer"];
}
catch { };
try
{
architecture.Battle = (OngoingBattle) this.AllOngoingBattles.GetGameObject((int)reader["Battle"]);
}
catch { }
try
{
architecture.OldFactionName = reader["OldFactionName"].ToString();
}
catch { }
if (e.Count > 0)
{
errorMsg.Add("建筑ID" + architecture.ID + ":");
errorMsg.AddRange(e);
}
else
{
this.Architectures.AddArchitectureWithEvent(architecture);
this.AllArchitectures.Add(architecture.ID, architecture);