本文整理汇总了C#中City.GetSelfHRCSpeed方法的典型用法代码示例。如果您正苦于以下问题:C# City.GetSelfHRCSpeed方法的具体用法?C# City.GetSelfHRCSpeed怎么用?C# City.GetSelfHRCSpeed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类City
的用法示例。
在下文中一共展示了City.GetSelfHRCSpeed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
//.........这里部分代码省略.........
sect = new IniSection("");
sect.Add("Amount", "100000");
sect.Add("Latitude", "1");
sect.Add("Longitude", "0");
oilFld.Parse(sect);
region.Add(oilFld);
CityPluginType plgType = new CityPluginType();
sect = new IniSection("");
sect.Add("Cost", "100");
sect.Add("HRCSpeed", "100");
sect.Add("Behaviour", CityPluginBehaviourType.CollectorFactory.ToString());
plgType.Parse(sect);
CityPlugin plg = new CityPlugin(plgType, CityPluginTypeId.OilRefinary);
city.Add(plg);
plgType = new CityPluginType();
sect = new IniSection("");
sect.Add("Cost", "100");
sect.Add("FoodConvRate", "0.50");
sect.Add("FoodCostSpeed", "100");
sect.Add("Behaviour", CityPluginBehaviourType.CollectorFactory.ToString());
plgType.Parse(sect);
plg = new CityPlugin(plgType, CityPluginTypeId.BiofuelFactory);
city.Add(plg);
//OilField oil = new OilField(region);
//Forest forest = new Forest(region);
float c = 0;
while (true)
{
Console.Clear();
Console.WriteLine("Energy Status:");
Console.Write(" Current Food Storage ");
Console.WriteLine(region.EnergyStatus.CurrentFood);
Console.Write(" Current HR Storage ");
Console.WriteLine(region.EnergyStatus.CurrentHR);
Console.Write(" Current LR Storage ");
Console.WriteLine(region.EnergyStatus.CurrentLR);
Console.Write(" Current Natural HR ");
Console.WriteLine(region.EnergyStatus.RemainingHR);
Console.Write(" Current Natural LR ");
Console.WriteLine(region.EnergyStatus.RemainingLR);
Console.WriteLine("City :" + city.Name);
Console.WriteLine("City Status:");
Console.Write(" Development ");
Console.WriteLine(city.Development);
Console.Write(" Population ");
Console.WriteLine(city.Population);
Console.Write(" Disease ");
Console.WriteLine(city.Disease);
Console.Write(" Size ");
Console.WriteLine(city.Size);
Console.WriteLine(" Local H[{0}] L[{1}] F[{2}]", city.LocalHR.Current, city.LocalLR.Current, city.LocalFood.Current);
Console.WriteLine(" Drain H[{0}] L[{1}] F[{2}]", city.GetSelfHRCSpeed(), city.GetSelfLRCSpeed(), city.GetSelfFoodCostSpeed());
Console.WriteLine(" Ratio H[{0:P}] L[{1:P}] F[{2:P}]", city.SelfHRCRatio, city.SelfLRCRatio, city.SelfFoodCostRatio);
c += city.GetCarbonChange();
//city.LocalFood.Commit(250);
//city.LocalHR.Commit(250);
city.LocalLR.Commit(100);
//Console.WriteLine("City :" + city2.Name);
//Console.WriteLine("City Status:");
//Console.Write(" Development ");
//Console.WriteLine(city2.Development);
//Console.Write(" Population ");
//Console.WriteLine(city2.Population);
//Console.Write(" Disease ");
//Console.WriteLine(city2.Disease);
//Console.Write(" Size ");
//Console.WriteLine(city2.Size);
//Console.WriteLine(" Local H[{0}] L[{1}] F[{2}]", city2.LocalHR.Current, city2.LocalLR.Current, city2.LocalFood.Current);
//Console.WriteLine(" Drain H[{0}] L[{1}] F[{2}]", city2.GetSelfHRCSpeed(), city2.GetSelfLRCSpeed(), city2.GetSelfFoodCostSpeed());
//Console.WriteLine(" Ratio H[{0:P}] L[{1:P}] F[{2:P}]", city2.SelfHRCRatio, city2.SelfLRCRatio, city2.SelfFoodCostRatio);
//c += city2.GetCarbonChange();
Console.WriteLine("World Carbon {0}", c);
GameTime gt = new GameTime(0, 0, TimeSpan.FromHours(1), TimeSpan.FromHours(1));
region.Update(gt);
Thread.Sleep(5);
}
}