modificat el efecte de invulnerabilitat per a que vaja menguant

This commit is contained in:
2025-08-17 17:21:03 +02:00
parent a95776e6c7
commit e774e0e8ad
3 changed files with 31 additions and 15 deletions

View File

@@ -56,7 +56,7 @@ class Sprite {
void setTexture(std::shared_ptr<Texture> texture) { textures_.at(texture_index_) = std::move(texture); }
void addTexture(const std::shared_ptr<Texture>& texture) { textures_.push_back(texture); }
auto setActiveTexture(size_t index) -> bool; // Cambia la textura activa por índice
[[nodiscard]] auto getActiveTextureIndex() const -> size_t { return texture_index_; } // Obtiene el índice de la textura activa
[[nodiscard]] auto getActiveTexture() const -> size_t { return texture_index_; } // Alias para getActiveTextureIndex
[[nodiscard]] auto getTextureCount() const -> size_t { return textures_.size(); } // Obtiene el número total de texturas
protected: