void Bullet::onCollision(GameObject* other) { if (other->m_name == "Zombie") { Player* player = static_cast<Player*>(m_shooter); Zombie* zombie = static_cast<Zombie*>(other); const int points = zombie->GetPoints(); player->AddPoints(points); Delete(); zombie->Delete(); // Spawn more zombies MainGameScene* scene = static_cast<MainGameScene*>(GameManager::GetInstance()->m_currentScene); scene->AddZombies(player->GetScore(), points); } }