els enemics poden morir mentre fan spawn
This commit is contained in:
@@ -132,9 +132,9 @@ constexpr float LEVEL_COMPLETED_TYPING_RATIO = 0.0f; // 0.0 = sin typewriter (d
|
||||
|
||||
// Transición INIT_HUD (animación inicial del HUD)
|
||||
constexpr float INIT_HUD_DURATION = 3.0f; // Duración total del estado
|
||||
constexpr float INIT_HUD_RECT_RATIO = 0.67f; // Proporción animación rectángulo (67% del total)
|
||||
constexpr float INIT_HUD_SCORE_RATIO = 0.83f; // Proporción animación marcador (83% del total)
|
||||
constexpr float INIT_HUD_SHIP_RATIO = 0.83f; // Proporción animación nave (83% del total)
|
||||
constexpr float INIT_HUD_RECT_RATIO = 0.67f; // Proporción animación rectángulo
|
||||
constexpr float INIT_HUD_SCORE_RATIO = 0.83f; // Proporción animación marcador
|
||||
constexpr float INIT_HUD_SHIP_RATIO = 1.0f; // Proporción animación nave
|
||||
|
||||
// Posición inicial de la nave en INIT_HUD (75% de altura de zona de juego)
|
||||
constexpr float INIT_HUD_SHIP_START_Y_RATIO = 0.75f; // 75% desde el top de PLAYAREA
|
||||
|
||||
@@ -211,6 +211,7 @@ auto Director::run() -> int {
|
||||
|
||||
// Precachejar música per evitar lag al començar
|
||||
AudioCache::getMusic("title.ogg");
|
||||
AudioCache::getMusic("game.ogg");
|
||||
if (Options::console) {
|
||||
std::cout << "Música precachejada: "
|
||||
<< AudioCache::getMusicCacheSize() << " fitxers\n";
|
||||
|
||||
@@ -798,11 +798,6 @@ void EscenaJoc::detectar_col·lisions_bales_enemics() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// [NEW] Skip collision if enemy is invulnerable
|
||||
if (enemic.es_invulnerable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const Punt& pos_enemic = enemic.get_centre();
|
||||
|
||||
// Calcular distància quadrada (evita sqrt)
|
||||
|
||||
Reference in New Issue
Block a user