añadido a param.txt los parametros de los globos para velocidad y gravedad
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
#include "balloon.h"
|
||||
|
||||
// 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, std::vector<std::string> *animation, param_t *param)
|
||||
{
|
||||
this->param = param;
|
||||
sprite = new AnimatedSprite(texture, "", animation);
|
||||
disable();
|
||||
|
||||
@@ -22,8 +23,8 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
this->velX = velx;
|
||||
velY = 0;
|
||||
maxVelY = 3.0f;
|
||||
gravity = 0.09f;
|
||||
defaultVelY = 2.6f;
|
||||
gravity = param->balloon1.grav;
|
||||
defaultVelY = param->balloon1.vel;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score = BALLOON_SCORE_1;
|
||||
@@ -44,8 +45,8 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
this->velX = velx;
|
||||
velY = 0;
|
||||
maxVelY = 3.0f;
|
||||
gravity = 0.10f;
|
||||
defaultVelY = 3.5f;
|
||||
gravity = param->balloon2.grav;
|
||||
defaultVelY = param->balloon2.vel;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score = BALLOON_SCORE_2;
|
||||
@@ -66,8 +67,8 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
this->velX = velx;
|
||||
velY = 0;
|
||||
maxVelY = 3.0f;
|
||||
gravity = 0.10f;
|
||||
defaultVelY = 4.50f;
|
||||
gravity = param->balloon3.grav;
|
||||
defaultVelY = param->balloon3.vel;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score = BALLOON_SCORE_3;
|
||||
@@ -88,8 +89,8 @@ Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 c
|
||||
this->velX = velx;
|
||||
velY = 0;
|
||||
maxVelY = 3.0f;
|
||||
gravity = 0.10f;
|
||||
defaultVelY = 4.95f;
|
||||
gravity = param->balloon4.grav;
|
||||
defaultVelY = param->balloon4.vel;
|
||||
|
||||
// Puntos que da el globo al ser destruido
|
||||
score = BALLOON_SCORE_4;
|
||||
|
||||
Reference in New Issue
Block a user