本文整理汇总了C++中bwapi::UnitType::supplyRequired方法的典型用法代码示例。如果您正苦于以下问题:C++ UnitType::supplyRequired方法的具体用法?C++ UnitType::supplyRequired怎么用?C++ UnitType::supplyRequired使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bwapi::UnitType
的用法示例。
在下文中一共展示了UnitType::supplyRequired方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setShortName
// UnitType constructor
ActionTypeData::ActionTypeData(BWAPI::UnitType t, const ActionID id)
: type (UnitType)
, unit (t)
, raceID (GetRaceID(t.getRace()))
, actionID (id)
, mineralPriceVal (t.mineralPrice() * Constants::RESOURCE_SCALE)
, gasPriceVal (t.gasPrice() * Constants::RESOURCE_SCALE)
, supplyRequiredVal (t.supplyRequired())
, supplyProvidedVal (t.supplyProvided())
, buildTimeVal (t.buildTime())
, numberProduced (1)
, name (t.getName())
, metaName (t.getName())
, building (t.isBuilding())
, worker (t.isWorker())
, refinery (t.isRefinery())
, resourceDepot (t.isResourceDepot())
, supplyProvider (t.supplyProvided() > 0 && !t.isResourceDepot())
, canProduceBool (t.isBuilding() && t.canProduce())
, canAttackBool (t.canAttack())
, whatBuildsUnitType (t.whatBuilds().first)
, addon (t.isAddon())
, morphed (false)
, reqAddon (false)
, reqAddonID (0)
{
if (t == BWAPI::UnitTypes::Zerg_Zergling || t == BWAPI::UnitTypes::Zerg_Scourge)
{
numberProduced = 2;
}
if (t == BWAPI::UnitTypes::Zerg_Lair ||
t == BWAPI::UnitTypes::Zerg_Hive ||
t == BWAPI::UnitTypes::Zerg_Greater_Spire ||
t == BWAPI::UnitTypes::Zerg_Lurker ||
t == BWAPI::UnitTypes::Zerg_Guardian ||
t == BWAPI::UnitTypes::Zerg_Sunken_Colony ||
t == BWAPI::UnitTypes::Zerg_Spore_Colony)
{
morphed = true;
}
setShortName();
}
示例2:
Resources::Resources(BWAPI::UnitType type)
{
minerals = type.mineralPrice();
gas = type.gasPrice();
supply = type.supplyRequired();
}