Commit pa que Mon arregle el codi mentre em dutxe
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
class Texture;
|
||||
|
||||
// Constructor
|
||||
Item::Item(int kind, float x, float y, SDL_Rect *playArea, Texture *texture, std::vector<std::string> *animation)
|
||||
Item::Item(int kind, float x, float y, SDL_Rect *playArea, std::shared_ptr<Texture> texture, std::vector<std::string> *animation)
|
||||
: kind(kind), playArea(playArea)
|
||||
{
|
||||
sprite = new AnimatedSprite(texture, "", animation);
|
||||
sprite = std::make_unique<AnimatedSprite>(texture, "", animation);
|
||||
|
||||
enabled = true;
|
||||
timeToLive = 600;
|
||||
@@ -43,12 +43,6 @@ Item::Item(int kind, float x, float y, SDL_Rect *playArea, Texture *texture, std
|
||||
shiftColliders();
|
||||
}
|
||||
|
||||
// Destructor
|
||||
Item::~Item()
|
||||
{
|
||||
delete sprite;
|
||||
}
|
||||
|
||||
// Centra el objeto en la posición X
|
||||
void Item::allignTo(int x)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user