diff --git a/source/game/scenes/game_scene.cpp b/source/game/scenes/game_scene.cpp index d38f4b8..0ba0bf9 100644 --- a/source/game/scenes/game_scene.cpp +++ b/source/game/scenes/game_scene.cpp @@ -138,11 +138,12 @@ void GameScene::init() { } } - // [MODIFIED] Initialize enemies as inactive (stage system will spawn them). + // Initialize enemies as inactive (stage system will spawn them). // Registramos el body al world incluso inactivo: con radius=0 no colisiona // ni se mueve, y al init() del stage system se activa sin re-registrar. + // La construcció dels Enemy ja s'ha fet al ctor de GameScene; ací només + // configurem la referència a la nau i registrem el body. for (auto& enemy : enemies_) { - enemy = Enemy(sdl_.getRenderer()); enemy.setShipPosition(&ships_[0].getCenter()); // Set ship reference (P1 for now) physics_world_.addBody(&enemy.getBody()); // DON'T call enemy.init() here - stage system handles spawning