afegit AnimatedSprite::getCurrentAnimationFrame()

fix: player2.gif faltava el outline
noves veus i arreglo d'altres
style: fitxer de config
This commit is contained in:
2025-08-15 11:09:17 +02:00
parent a983269080
commit a7519fc372
13 changed files with 89 additions and 93 deletions

View File

@@ -52,7 +52,7 @@ AnimatedSprite::AnimatedSprite(std::shared_ptr<Texture> texture, const Animation
}
// Obtiene el índice de la animación a partir del nombre
auto AnimatedSprite::getIndex(const std::string& name) -> int {
auto AnimatedSprite::getAnimationIndex(const std::string& name) -> int {
auto iterator = animation_indices_.find(name);
if (iterator != animation_indices_.end()) {
// Si se encuentra la animación en el mapa, devuelve su índice
@@ -101,7 +101,7 @@ auto AnimatedSprite::animationIsCompleted() -> bool {
// Establece la animacion actual
void AnimatedSprite::setCurrentAnimation(const std::string& name, bool reset) {
const auto NEW_ANIMATION = getIndex(name);
const auto NEW_ANIMATION = getAnimationIndex(name);
if (current_animation_ != NEW_ANIMATION) {
const auto OLD_ANIMATION = current_animation_;
current_animation_ = NEW_ANIMATION;