本文整理汇总了C++中Outfit::getSPECIAL方法的典型用法代码示例。如果您正苦于以下问题:C++ Outfit::getSPECIAL方法的具体用法?C++ Outfit::getSPECIAL怎么用?C++ Outfit::getSPECIAL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Outfit
的用法示例。
在下文中一共展示了Outfit::getSPECIAL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testNames
void testNames()
{
Dweller *d = new Dweller("Pip-Boy", 2222222);
Outfit *o = new Outfit("Minuteman", 10, 2200220);
Weapon *w = new Weapon("Gauss", 16, 16);
Vec2D currentPos (3.54, 6.32 );
// hold a list of game objects that was instantiated.
vector<GameObject *> gameObjectList;
gameObjectList.push_back(d);
gameObjectList.push_back(o);
gameObjectList.push_back(w);
// test Dweller public functions
d->getSPECIAL();
d->getCurrentHealth();
d->getCurrentRadDamage();
d->getAttackDmg();
d->setPosition(currentPos);
d->getPosition() ;
d->receiveHealthDamage(13);
d->receiveRadDamage(15);
d->receiveEquipmentDamage(4);
d->addStimpak(2);
d->addRadAway(5);
d->useStimpak();
d->useRadAway();
d->assignOutfit(o);
d->assignWeapon(w);
d->isDead() ;
// test Outfit public functions
o->getSPECIAL();
o->receiveDamage(1);
// test Weapon public functions
w->getAttackDmg();
w->receiveDamage(1);
// test Item inheritance
Item *i = o;
i->getDurability();
i->receiveDamage(1);
i = w;
i->getDurability();
i->receiveDamage(1);
// test game object inheritance
for (auto go : gameObjectList)
{
go->getName();
}
GameObject::getCount();
// release the memory
for (auto go : gameObjectList)
{
delete go;
}
}