afegit sistema de punts
This commit is contained in:
33
source/game/effects/puntuacio_flotant.hpp
Normal file
33
source/game/effects/puntuacio_flotant.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
// puntuacio_flotant.hpp - Número de puntuació que apareix i desapareix
|
||||
// © 2025 Port a C++20 amb SDL3
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "core/types.hpp"
|
||||
|
||||
namespace Effects {
|
||||
|
||||
// PuntuacioFlotant: text animat que mostra punts guanyats
|
||||
// S'activa quan es destrueix un enemic i s'esvaeix després d'un temps
|
||||
struct PuntuacioFlotant {
|
||||
// Text a mostrar (e.g., "100", "150", "200")
|
||||
std::string text;
|
||||
|
||||
// Posició actual (coordenades mundials)
|
||||
Punt posicio;
|
||||
|
||||
// Animació de moviment
|
||||
Punt velocitat; // px/s (normalment cap amunt: {0.0f, -30.0f})
|
||||
|
||||
// Animació de fade
|
||||
float temps_vida; // Temps transcorregut (segons)
|
||||
float temps_max; // Temps de vida màxim (segons)
|
||||
float brightness; // Brillantor calculada (0.0-1.0)
|
||||
|
||||
// Estat
|
||||
bool actiu;
|
||||
};
|
||||
|
||||
} // namespace Effects
|
||||
Reference in New Issue
Block a user