Commit pa que Mon arregle el codi mentre em dutxe

This commit is contained in:
2024-10-09 21:48:01 +02:00
parent 3c1dcad3ab
commit f2fa216b0d
34 changed files with 862 additions and 1218 deletions

View File

@@ -4,9 +4,10 @@
#include <SDL2/SDL_stdinc.h> // for Uint16
#include <string> // for string
#include <vector> // for vector
#include <memory>
#include "utils.h" // for circle_t
class AnimatedSprite;
class Texture;
#include "animated_sprite.h"
#include "texture.h"
// Tipos de objetos
#define ITEM_POINTS_1_DISK 1
@@ -22,7 +23,7 @@ class Item
{
private:
// Objetos y punteros
AnimatedSprite *sprite; // Sprite con los graficos del objeto
std::unique_ptr<AnimatedSprite> sprite; // Sprite con los graficos del objeto
// Variables
float posX; // Posición X del objeto
@@ -49,10 +50,10 @@ public:
Uint16 timeToLive; // Temporizador con el tiempo que el objeto está presente
// Constructor
Item(int kind, float x, float y, SDL_Rect *playArea, Texture *texture, std::vector<std::string> *animation);
Item(int kind, float x, float y, SDL_Rect *playArea, std::shared_ptr<Texture> texture, std::vector<std::string> *animation);
// Destructor
~Item();
~Item() = default;
// Centra el objeto en la posición X
void allignTo(int x);