feat(enemy): afegir behaviors WANDER/CHASE/FLEE i target multi-ship
This commit is contained in:
@@ -186,7 +186,7 @@ GameScene::GameScene(SDLManager& sdl, SceneContext& context)
|
||||
// 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.
|
||||
for (auto& enemy : enemies_) {
|
||||
enemy.setShipPosition(&ships_[0].getCenter()); // Set ship reference (P1 for now)
|
||||
enemy.setShips(ships_.data(), &ships_[1]);
|
||||
physics_world_.addBody(&enemy.getBody());
|
||||
// DON'T call enemy.init() here - stage system handles spawning
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user