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; } }
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; } } }