Exemple #1
0
void BeingManager::logic()
{
    Beings::iterator i = mBeings.begin();
    while (i != mBeings.end())
    {
        Being *being = (*i);

        being->logic();

        if (being->mAction == Being::DEAD && being->mFrame >= 20)
        {
            destroy(being);
            i = mBeings.erase(i);
        }
        else
            ++i;
    }
}
Exemple #2
0
void BeingManager::logic()
{
    Beings::iterator i = mBeings.begin();
    while (i != mBeings.end())
    {
        Being *being = (*i);

        being->logic();

        if (!being->isAlive() &&
            Net::getGameHandler()->removeDeadBeings() &&
            being->getCurrentFrame() >= 20)
        {
            delete being;
            i = mBeings.erase(i);
        }
        else
        {
            ++i;
        }
    }
}