Commit pa que Mon arregle el codi mentre em dutxe
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "animated_sprite.h" // for AnimatedSprite
|
||||
class Texture;
|
||||
#include "texture.h"
|
||||
#include <memory>
|
||||
|
||||
// Clase SmartSprite
|
||||
class SmartSprite : public AnimatedSprite
|
||||
{
|
||||
private:
|
||||
// Variables
|
||||
bool enabled; // Indica si esta habilitado
|
||||
bool onDestination; // Indica si está en el destino
|
||||
int destX; // Posicion de destino en el eje X
|
||||
int destY; // Posicion de destino en el eje Y
|
||||
int enabledCounter; // Contador para deshabilitarlo
|
||||
bool finished; // Indica si ya ha terminado
|
||||
bool onDestination_; // Indica si está en el destino
|
||||
int destX_; // Posicion de destino en el eje X
|
||||
int destY_; // Posicion de destino en el eje Y
|
||||
int finishedCounter_; // Contador para deshabilitarlo
|
||||
bool finished_; // Indica si ya ha terminado
|
||||
|
||||
// Comprueba el movimiento
|
||||
void checkMove();
|
||||
@@ -23,7 +23,7 @@ private:
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
SmartSprite(Texture *texture);
|
||||
SmartSprite(std::shared_ptr<Texture> texture);
|
||||
|
||||
// Destructor
|
||||
~SmartSprite() = default;
|
||||
@@ -37,17 +37,8 @@ public:
|
||||
// Pinta el objeto en pantalla
|
||||
void render();
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
bool isEnabled();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
int getEnabledCounter();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setEnabledCounter(int value);
|
||||
void setFinishedCounter(int value);
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setDestX(int x);
|
||||
@@ -56,14 +47,14 @@ public:
|
||||
void setDestY(int y);
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
int getDestX();
|
||||
int getDestX() const;
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
int getDestY();
|
||||
int getDestY() const;
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
bool isOnDestination();
|
||||
bool isOnDestination() const;
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
bool hasFinished();
|
||||
bool hasFinished() const;
|
||||
};
|
||||
Reference in New Issue
Block a user