Estandaritzant noms segons convencions
This commit is contained in:
@@ -15,30 +15,30 @@ struct Animation
|
||||
int speed; // Velocidad de la animación
|
||||
int loop; // Indica a que frame vuelve la animación al terminar. -1 para que no vuelva
|
||||
bool completed; // Indica si ha finalizado la animación
|
||||
int currentFrame; // Frame actual
|
||||
int current_frame; // Frame actual
|
||||
int counter; // Contador para las animaciones
|
||||
};
|
||||
|
||||
struct animatedSprite_t
|
||||
struct AnimatedFile
|
||||
{
|
||||
std::vector<Animation> animations; // Vector con las diferentes animaciones
|
||||
std::shared_ptr<Texture> texture; // Textura con los graficos para el sprite
|
||||
};
|
||||
|
||||
// Carga la animación desde un fichero
|
||||
animatedSprite_t loadAnimationFromFile(std::shared_ptr<Texture> texture, std::string filePath);
|
||||
AnimatedFile loadAnimationFromFile(std::shared_ptr<Texture> texture, std::string filePath);
|
||||
|
||||
class AnimatedSprite : public MovingSprite
|
||||
{
|
||||
private:
|
||||
// Variables
|
||||
std::vector<Animation> animations_; // Vector con las diferentes animaciones
|
||||
int currentAnimation_; // Animacion activa
|
||||
int current_animation_; // Animacion activa
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
AnimatedSprite(std::shared_ptr<Texture> texture = nullptr, std::string file = "", std::vector<std::string> *buffer = nullptr);
|
||||
AnimatedSprite(animatedSprite_t *animation);
|
||||
AnimatedSprite(AnimatedFile *animation);
|
||||
|
||||
// Destructor
|
||||
~AnimatedSprite();
|
||||
|
||||
Reference in New Issue
Block a user