Mes recomanacions de cppcheck aplicades
Abans de tocar unes cosetes de strings buits
This commit is contained in:
@@ -12,12 +12,20 @@ Balloon::Balloon(float x, float y, Uint8 kind, float vel_x, float speed, Uint16
|
||||
pos_x_(x),
|
||||
pos_y_(y),
|
||||
vel_x_(vel_x),
|
||||
being_created_(creation_timer > 0),
|
||||
blinking_(false),
|
||||
enabled_(true),
|
||||
invulnerable_(creation_timer > 0),
|
||||
stopped_(true),
|
||||
visible_(true),
|
||||
creation_counter_(creation_timer),
|
||||
creation_counter_ini_(creation_timer),
|
||||
stopped_counter_(0),
|
||||
kind_(kind),
|
||||
counter_(0),
|
||||
travel_y_(1.0f),
|
||||
speed_(speed)
|
||||
{
|
||||
enabled_ = true;
|
||||
|
||||
switch (kind_)
|
||||
{
|
||||
@@ -243,21 +251,6 @@ Balloon::Balloon(float x, float y, Uint8 kind, float vel_x, float speed, Uint16
|
||||
|
||||
// Alinea el circulo de colisión con el objeto
|
||||
updateColliders();
|
||||
|
||||
// Inicializa variables
|
||||
stopped_ = true;
|
||||
stopped_counter_ = 0;
|
||||
blinking_ = false;
|
||||
visible_ = true;
|
||||
invulnerable_ = true;
|
||||
being_created_ = true;
|
||||
|
||||
// Actualiza valores
|
||||
being_created_ = creation_counter_ == 0 ? false : true;
|
||||
invulnerable_ = being_created_ == false ? false : true;
|
||||
|
||||
counter_ = 0;
|
||||
travel_y_ = 1.0f;
|
||||
}
|
||||
|
||||
// Centra el globo en la posición X
|
||||
|
||||
Reference in New Issue
Block a user