forked from jaildesigner-jailgames/jaildoctors_dilemma
Trabajando en la sección EnterID
This commit is contained in:
52
source/enter_id.h
Normal file
52
source/enter_id.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
#include <SDL2/SDL.h>
|
||||
#include "common/asset.h"
|
||||
#include "common/screen.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/text.h"
|
||||
#include "common/texture.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifndef ENTER_ID_H
|
||||
#define ASK_ME_H
|
||||
|
||||
class EnterID
|
||||
{
|
||||
private:
|
||||
// Punteros y objetos
|
||||
Asset *asset; // Objeto con los ficheros de recursos
|
||||
options_t *options; // Puntero a las opciones del juego
|
||||
Screen *screen; // Objeto encargado de dibujar en pantalla
|
||||
SDL_Event *eventHandler; // Manejador de eventos
|
||||
SDL_Renderer *renderer; // El renderizador de la ventana
|
||||
Text *text; // Objeto para escribir texto en pantalla
|
||||
Texture *texture; // Textura para la fuente para el texto
|
||||
|
||||
// Variables
|
||||
int counter; // Contador
|
||||
section_t section; // Estado del bucle principal para saber si continua o se sale
|
||||
Uint32 ticks; // Contador de ticks para ajustar la velocidad del programa
|
||||
Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa
|
||||
|
||||
// Actualiza las variables
|
||||
void update();
|
||||
|
||||
// Dibuja en pantalla
|
||||
void render();
|
||||
|
||||
// Comprueba el manejador de eventos
|
||||
void checkEventHandler();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
EnterID(SDL_Renderer *renderer, Screen *screen, Asset *asset, options_t *options);
|
||||
|
||||
// Destructor
|
||||
~EnterID();
|
||||
|
||||
// Bucle principal
|
||||
section_t run();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user