marca paràmetre animation com a const al constructor de Balloon i Item
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
#include "game/defaults.hpp" // for PLAY_AREA_LEFT, PLAY_AREA_RIGHT, PLAY_AR...
|
#include "game/defaults.hpp" // for PLAY_AREA_LEFT, PLAY_AREA_RIGHT, PLAY_AR...
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, std::vector<std::string> *animation, SDL_Renderer *renderer) {
|
Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, const std::vector<std::string> *animation, SDL_Renderer *renderer) {
|
||||||
sprite_ = new AnimatedSprite(texture, renderer, "", animation);
|
sprite_ = new AnimatedSprite(texture, renderer, "", animation);
|
||||||
disable();
|
disable();
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class Balloon {
|
|||||||
static constexpr int POWERBALL_SCREENPOWER_MINIMUM = 10;
|
static constexpr int POWERBALL_SCREENPOWER_MINIMUM = 10;
|
||||||
static constexpr int POWERBALL_COUNTER = 8;
|
static constexpr int POWERBALL_COUNTER = 8;
|
||||||
|
|
||||||
Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, std::vector<std::string> *animation, SDL_Renderer *renderer); // Constructor
|
Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, Texture *texture, const std::vector<std::string> *animation, SDL_Renderer *renderer); // Constructor
|
||||||
~Balloon(); // Destructor
|
~Balloon(); // Destructor
|
||||||
|
|
||||||
Balloon(const Balloon &) = delete;
|
Balloon(const Balloon &) = delete;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
class Texture;
|
class Texture;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Item::Item(Id id, float x, float y, Texture *texture, std::vector<std::string> *animation, SDL_Renderer *renderer) {
|
Item::Item(Id id, float x, float y, Texture *texture, const std::vector<std::string> *animation, SDL_Renderer *renderer) {
|
||||||
sprite_ = new AnimatedSprite(texture, renderer, "", animation);
|
sprite_ = new AnimatedSprite(texture, renderer, "", animation);
|
||||||
|
|
||||||
this->id_ = id;
|
this->id_ = id;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Item {
|
|||||||
COFFEE_MACHINE = 6,
|
COFFEE_MACHINE = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
Item(Id id, float x, float y, Texture *texture, std::vector<std::string> *animation, SDL_Renderer *renderer); // Constructor
|
Item(Id id, float x, float y, Texture *texture, const std::vector<std::string> *animation, SDL_Renderer *renderer); // Constructor
|
||||||
~Item(); // Destructor
|
~Item(); // Destructor
|
||||||
|
|
||||||
Item(const Item &) = delete;
|
Item(const Item &) = delete;
|
||||||
|
|||||||
Reference in New Issue
Block a user