Continuemtreballant enels credits
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#pragma once
|
||||
#include "SDL2/SDL.h"
|
||||
#include <memory>
|
||||
#include "balloon_manager.h"
|
||||
#include "texture.h"
|
||||
#include "tiled_bg.h"
|
||||
|
||||
#include <SDL2/SDL_render.h> // Para SDL_Texture
|
||||
#include <SDL2/SDL_stdinc.h> // Para Uint32
|
||||
#include <memory> // Para unique_ptr
|
||||
#include "param.h"
|
||||
class BalloonManager;
|
||||
class TiledBG;
|
||||
|
||||
class Credits
|
||||
{
|
||||
@@ -14,7 +16,13 @@ private:
|
||||
std::unique_ptr<TiledBG> tiled_bg_; // Objeto para dibujar el mosaico animado de fondo
|
||||
|
||||
// Variables
|
||||
Uint32 ticks_ = 0; // Contador de ticks para ajustar la velocidad del programa
|
||||
Uint32 ticks_ = 0; // Contador de ticks para ajustar la velocidad del programa
|
||||
Uint32 counter_ = 0; // Contador para la lógica de la clase
|
||||
SDL_Rect credits_rect_src_ = param.game.game_area.rect; // Rectangulo con el texto de los créditos (origen)
|
||||
SDL_Rect credits_rect_dst_ = param.game.game_area.rect; // Rectangulo con el texto de los créditos (destino)
|
||||
SDL_Rect mini_logo_rect_src_ = param.game.game_area.rect; // Rectangulo con el mini logo de JailGames y el texto de copyright (origen)
|
||||
SDL_Rect mini_logo_rect_dst_ = param.game.game_area.rect; // Rectangulo con el mini logo de JailGames y el texto de copyright (destino)
|
||||
int mini_logo_final_pos_ = 0;
|
||||
|
||||
// Actualiza las variables
|
||||
void update();
|
||||
@@ -31,6 +39,9 @@ private:
|
||||
// Crea la textura con el texto
|
||||
void fillTextTexture();
|
||||
|
||||
// Actualiza el destino de los rectangulos de las texturas
|
||||
void updateRects();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Credits();
|
||||
|
||||
Reference in New Issue
Block a user