fix: no inicialitzava be animated_sprite

This commit is contained in:
2025-09-22 10:03:38 +02:00
parent d4a0189dc8
commit 5e3946e28b
2 changed files with 17 additions and 2 deletions

View File

@@ -202,6 +202,12 @@ void AnimatedSprite::loadFromAnimationsFileBuffer(const AnimationsFileBuffer& so
// Pone un valor por defecto
setWidth(config.frame_width);
setHeight(config.frame_height);
// Establece el primer frame inmediatamente si hay animaciones
if (!animations_.empty()) {
current_animation_ = 0;
updateSpriteClip();
}
}
// Procesa una línea de configuración