From 3c1dcad3abde62cb5a2aa834eba8c95be45fd4a8 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Tue, 8 Oct 2024 23:15:55 +0200 Subject: [PATCH] Commit de anar al llit amb el portatil --- source/balloon.cpp | 7 ++----- source/game.cpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/source/balloon.cpp b/source/balloon.cpp index 195dffa..312f12e 100644 --- a/source/balloon.cpp +++ b/source/balloon.cpp @@ -8,9 +8,10 @@ // Constructor Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, std::vector *animation) + : kind(kind), speed(speed) { sprite = std::make_unique(texture, "", animation); - disable(); + //disable(); enabled = true; @@ -268,10 +269,6 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c counter = 0; travelY = 1.0f; - this->speed = speed; - - // Tipo - this->kind = kind; } // Centra el globo en la posición X diff --git a/source/game.cpp b/source/game.cpp index ee30cd0..3f0a8a8 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -1933,7 +1933,7 @@ void Game::update() // Vacia los vectores freeBullets(); - freeBalloons(); + //freeBalloons(); freeItems(); freeSmartSprites(); }