queue object destruction

This commit is contained in:
2026-04-22 08:13:20 +02:00
parent b211fbf2cd
commit a7a7f9f4e9
6 changed files with 45 additions and 1 deletions

View File

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