Ya funciona la INTRO

This commit is contained in:
2022-09-28 09:48:55 +02:00
parent 8b2459dc35
commit 072a488de6
8 changed files with 243 additions and 29 deletions

View File

@@ -9,7 +9,10 @@ AnimatedSprite::AnimatedSprite(LTexture *texture, SDL_Renderer *renderer, std::s
setRenderer(renderer);
// Carga las animaciones
load(file);
if (file != "")
{
load(file);
}
// Inicializa variables
currentAnimation = 0;
@@ -332,7 +335,7 @@ void AnimatedSprite::setAnimationFrames(Uint8 index_animation, Uint8 index_frame
// OLD - Establece el contador para todas las animaciones
void AnimatedSprite::setAnimationCounter(int value)
{
for (auto &a:animation)
for (auto &a : animation)
{
a.counter = value;
}