treballant en INIT_HUD

This commit is contained in:
2025-12-09 22:09:24 +01:00
parent 64ab08973c
commit 57d623d6bc
8 changed files with 271 additions and 12 deletions

View File

@@ -86,6 +86,15 @@ constexpr float LEVEL_START_TYPING_RATIO = 0.3f; // 30% escribiendo, 70%
// Transición LEVEL_COMPLETED (mensaje "GOOD JOB COMMANDER!")
constexpr float LEVEL_COMPLETED_DURATION = 3.0f; // Duración total
constexpr float LEVEL_COMPLETED_TYPING_RATIO = 0.0f; // 0.0 = sin typewriter (directo)
// 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_DURATION = 2.0f; // Duración animación rectángulo
constexpr float INIT_HUD_SCORE_DURATION = 2.5f; // Duración animación marcador
constexpr float INIT_HUD_SHIP_DURATION = 2.5f; // Duració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
} // namespace Game
// Física (valores actuales del juego, sincronizados con joc_asteroides.cpp)

View File

@@ -0,0 +1,20 @@
// easing.hpp - Funcions d'interpolació i easing
// © 2025 Orni Attack
#pragma once
namespace Easing {
// Ease-out quadratic: empieza rápido, desacelera suavemente
// t = progreso normalizado [0.0 - 1.0]
// retorna valor interpolado [0.0 - 1.0]
inline float ease_out_quad(float t) {
return 1.0f - (1.0f - t) * (1.0f - t);
}
// Interpolación lineal básica (para referencia)
inline float lerp(float start, float end, float t) {
return start + (end - start) * t;
}
} // namespace Easing