queue object destruction
This commit is contained in:
@@ -15,5 +15,8 @@ namespace Game::AGame {
|
||||
void Enemy::onCollisionEnter(Object::Entity* other) {
|
||||
LOG("Enemy '" << getName() << "' collided with '" << other->getName() << "' (onCollisionEnter); Killing myself now!");
|
||||
GameManager::setSharedData("enemyActiveCount", GameManager::getSharedData<int>("enemyActiveCount") - 1);
|
||||
|
||||
// Find in state
|
||||
GameManager::destroyEntity(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user