les bales ara son redones

This commit is contained in:
2025-12-09 12:58:44 +01:00
parent 3c3857c1b2
commit 20ca024100
3 changed files with 17 additions and 13 deletions

View File

@@ -70,7 +70,7 @@ constexpr int MAX_IPUNTS = 30;
constexpr float SHIP_RADIUS = 12.0f;
constexpr float ENEMY_RADIUS = 20.0f;
constexpr float BULLET_RADIUS = 5.0f;
constexpr float BULLET_RADIUS = 3.0f;
} // namespace Entities
// Game rules (lives, respawn, game over)
@@ -144,7 +144,7 @@ namespace Brightness {
// Brillantor estàtica per entitats de joc (0.0-1.0)
constexpr float NAU = 1.0f; // Màxima visibilitat (jugador)
constexpr float ENEMIC = 0.7f; // 30% més tènue (destaca menys)
constexpr float BALA = 0.9f; // Destacada però menys que nau
constexpr float BALA = 1.0f; // Brillo a tope (màxima visibilitat)
// Starfield: gradient segons distància al centre
// distancia_centre: 0.0 (centre) → 1.0 (vora pantalla)

View File

@@ -67,8 +67,8 @@ void Bala::actualitzar(float delta_time) {
void Bala::dibuixar() const {
if (esta_ && forma_) {
// [NUEVO] Usar render_shape en lloc de rota_pol
// Les bales no roten visualment (angle sempre 0.0f)
Rendering::render_shape(renderer_, forma_, centre_, 0.0f, 1.0f, true, 1.0f, brightness_);
// Les bales roten segons l'angle de trajectòria
Rendering::render_shape(renderer_, forma_, centre_, angle_, 1.0f, true, 1.0f, brightness_);
}
}