cleanup time-based: elimina base classes frame-based (MovingSprite/SmartSprite/AnimatedSprite/Writer/Fade), MovingSprite::update(dt_s) integra rotacio
This commit is contained in:
@@ -11,8 +11,7 @@ class SmartSprite : public AnimatedSprite {
|
||||
SmartSprite(Texture *texture, SDL_Renderer *renderer); // Constructor
|
||||
|
||||
void init(); // Inicializa el objeto
|
||||
void update() override; // Actualiza la posicion (frame-based)
|
||||
void update(float dt_s) override; // Actualiza la posicion (time-based)
|
||||
void update(float dt_s) override; // Actualiza la posicion
|
||||
void render() override; // Pinta el objeto en pantalla
|
||||
|
||||
[[nodiscard]] auto getEnabledCounter() const -> int; // Obtiene el valor de la variable
|
||||
@@ -31,11 +30,10 @@ class SmartSprite : public AnimatedSprite {
|
||||
bool on_destination_; // Indica si está en el destino
|
||||
int dest_x_; // Posicion de destino en el eje X
|
||||
int dest_y_; // Posicion de destino en el eje Y
|
||||
int enabled_counter_; // Contador per a deshabilitar-lo (frame-based)
|
||||
float remaining_time_s_{0.0F}; // Temps restant per a deshabilitar-lo (time-based)
|
||||
int enabled_counter_; // Contador (frames, derivat de remaining_time_s_ * 60)
|
||||
float remaining_time_s_{0.0F}; // Temps restant per a deshabilitar-lo
|
||||
bool finished_; // Indica si ya ha terminado
|
||||
|
||||
void checkMove(); // Comprueba el movimiento
|
||||
void checkFinished(); // Comprueba si ha terminado (frame-based)
|
||||
void checkFinishedTimeBased(float dt_s); // Comprueba si ha terminado (time-based)
|
||||
void checkMove(); // Comprueba el movimiento
|
||||
void checkFinished(float dt_s); // Comprueba si ha terminado
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user