Ya lleva la cuenta de los objetos recogidos

This commit is contained in:
2022-07-14 11:03:35 +02:00
parent e752e90630
commit 8f3fc5b52a
5 changed files with 86 additions and 49 deletions

View File

@@ -5,6 +5,7 @@
#include "asset.h"
#include "enemy.h"
#include "item.h"
#include "item_tracker.h"
#include <string>
#include <vector>
@@ -45,6 +46,7 @@ private:
std::vector<Item *> item_list; // Listado con los items que hay en la habitación
LTexture *texture; // Textura con los graficos de la habitación
Asset *asset; // Objeto con la ruta a todos los ficheros de recursos
Item_tracker *item_tracker; // Lleva el control de los objetos recogidos
SDL_Renderer *renderer; // El renderizador de la ventana
SDL_Texture *map_texture; // Textura para dibujar el mapa de la habitación
@@ -65,7 +67,7 @@ private:
public:
// Constructor
Room(std::string _file_path, SDL_Renderer *_renderer, Asset *_asset);
Room(std::string _file_path, SDL_Renderer *_renderer, Asset *_asset, Item_tracker *_item_tracker);
// Destructor
~Room();
@@ -98,7 +100,7 @@ public:
bool enemyCollision(SDL_Rect &rect);
// Indica si hay colision con un objeto a partir de un rectangulo
SDL_Point itemCollision(SDL_Rect &rect);
bool itemCollision(SDL_Rect &rect);
};
#endif