本文整理汇总了C++中Outfit::SlowingDamage方法的典型用法代码示例。如果您正苦于以下问题:C++ Outfit::SlowingDamage方法的具体用法?C++ Outfit::SlowingDamage怎么用?C++ Outfit::SlowingDamage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Outfit
的用法示例。
在下文中一共展示了Outfit::SlowingDamage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAttributes
void OutfitInfoDisplay::UpdateAttributes(const Outfit &outfit)
{
attributeLabels.clear();
attributeValues.clear();
attributesHeight = 20;
map<string, map<string, int>> listing;
for(const auto &it : outfit.Attributes())
{
if(it.first == "outfit space"
|| it.first == "weapon capacity" || it.first == "engine capacity"
|| it.first == "gun ports" || it.first == "turret mounts")
continue;
string value;
double scale = 1.;
if(it.first == "thrust" || it.first == "reverse thrust" || it.first == "afterburner thrust")
scale = 60. * 60.;
else if(ATTRIBUTES_TO_SCALE.count(it.first))
scale = 60.;
if(BOOLEAN_ATTRIBUTES.count(it.first))
{
attributeLabels.push_back("This outfit is " + it.first + ".");
attributeValues.push_back(" ");
attributesHeight += 20;
}
else
{
attributeLabels.push_back(it.first + ':');
attributeValues.push_back(Format::Number(it.second * scale));
attributesHeight += 20;
}
}
if(!outfit.IsWeapon())
return;
attributeLabels.push_back(string());
attributeValues.push_back(string());
attributesHeight += 10;
if(outfit.Ammo())
{
attributeLabels.push_back("ammo:");
attributeValues.push_back(outfit.Ammo()->Name());
attributesHeight += 20;
}
attributeLabels.push_back("range:");
attributeValues.push_back(Format::Number(outfit.Range()));
attributesHeight += 20;
if(outfit.ShieldDamage() && outfit.Reload())
{
attributeLabels.push_back("shield damage / second:");
attributeValues.push_back(Format::Number(60. * outfit.ShieldDamage() / outfit.Reload()));
attributesHeight += 20;
}
if(outfit.HullDamage() && outfit.Reload())
{
attributeLabels.push_back("hull damage / second:");
attributeValues.push_back(Format::Number(60. * outfit.HullDamage() / outfit.Reload()));
attributesHeight += 20;
}
if(outfit.HeatDamage() && outfit.Reload())
{
attributeLabels.push_back("heat damage / second:");
attributeValues.push_back(Format::Number(60. * outfit.HeatDamage() / outfit.Reload()));
attributesHeight += 20;
}
if(outfit.IonDamage() && outfit.Reload())
{
attributeLabels.push_back("ion damage / second:");
attributeValues.push_back(Format::Number(6000. * outfit.IonDamage() / outfit.Reload()));
attributesHeight += 20;
}
if(outfit.SlowingDamage() && outfit.Reload())
{
attributeLabels.push_back("slowing damage / second:");
attributeValues.push_back(Format::Number(6000. * outfit.SlowingDamage() / outfit.Reload()));
attributesHeight += 20;
}
if(outfit.DisruptionDamage() && outfit.Reload())
{
attributeLabels.push_back("disruption damage / second:");
attributeValues.push_back(Format::Number(6000. * outfit.DisruptionDamage() / outfit.Reload()));
attributesHeight += 20;
}
if(outfit.FiringEnergy() && outfit.Reload())
{
attributeLabels.push_back("firing energy / second:");
attributeValues.push_back(Format::Number(60. * outfit.FiringEnergy() / outfit.Reload()));
attributesHeight += 20;
//.........这里部分代码省略.........