本文整理汇总了C++中Bot::getRemoval方法的典型用法代码示例。如果您正苦于以下问题:C++ Bot::getRemoval方法的具体用法?C++ Bot::getRemoval怎么用?C++ Bot::getRemoval使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bot
的用法示例。
在下文中一共展示了Bot::getRemoval方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addSpriteItemsToRenderList
/*
addSpriteItemsToRenderList - This method goes through all of the sprites,
including the player sprite, and adds the visible ones to the render list.
This method should be called each frame.
*/
void SpriteManager::addSpriteItemsToRenderList( Game *game)
{
GameStateManager *gsm = game->getGSM();
GameGUI *gui = game->getGUI();
if (gsm->isWorldRenderable())
{
GameGraphics *graphics = game->getGraphics();
RenderList *renderList = graphics->getWorldRenderList();
Viewport *viewport = gui->getViewport();
// ADD THE PLAYER SPRITE
addSpriteToRenderList(&player, renderList, viewport);
/* X = player.getPhysicalProperties() -> getX();
Y = player.getPhysicalProperties() -> getY();*/
//addSpriteToRenderList(&healthBar, renderList, viewport);
// NOW ADD THE REST OF THE SPRITES
list<Bot*>::iterator botIterator;
botIterator = bots.begin();
while (botIterator != bots.end())
{
Bot *bot = (*botIterator);
if (bot->getCurrentState() == L"DYING" && bot->getRemoval() > 0)
bot->setRemoval(bot->getRemoval()-1);
if (bot->getRemoval() != 0) {
addSpriteToRenderList(bot, renderList, viewport);
}
if (bot->getRemoval() == 0){
//bot->setCurrentlyCollidable(false);
}
botIterator++;
}
}
}