Actualizado animatedsprite.cpp
This commit is contained in:
@@ -88,6 +88,12 @@ void AnimatedSprite::animate()
|
||||
}
|
||||
}
|
||||
|
||||
// Obtiene el numero de frames de la animación actual
|
||||
int AnimatedSprite::getNumFrames()
|
||||
{
|
||||
return (int)animation.at(currentAnimation).frames.size();
|
||||
}
|
||||
|
||||
// Establece el frame actual de la animación
|
||||
void AnimatedSprite::setCurrentFrame(int num)
|
||||
{
|
||||
@@ -304,7 +310,7 @@ bool AnimatedSprite::loadFromFile(std::string filePath)
|
||||
}
|
||||
|
||||
// Pone un valor por defecto
|
||||
setPos({0, 0, frameWidth, frameHeight});
|
||||
setRect({0, 0, frameWidth, frameHeight});
|
||||
|
||||
return success;
|
||||
}
|
||||
@@ -442,7 +448,7 @@ bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
|
||||
}
|
||||
|
||||
// Pone un valor por defecto
|
||||
setPos({0, 0, frameWidth, frameHeight});
|
||||
setRect({0, 0, frameWidth, frameHeight});
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user