Me voy a la cama. Sigo con la reescritura de todo el código
This commit is contained in:
@@ -2,22 +2,11 @@
|
||||
#include "balloon.h"
|
||||
|
||||
// Constructor
|
||||
Balloon::Balloon()
|
||||
Balloon::Balloon(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, LTexture *texture, SDL_Renderer *renderer)
|
||||
{
|
||||
mSprite = new AnimatedSprite();
|
||||
disable();
|
||||
}
|
||||
|
||||
// Destructor
|
||||
Balloon::~Balloon()
|
||||
{
|
||||
delete mSprite;
|
||||
mSprite = nullptr;
|
||||
}
|
||||
|
||||
// Inicializador
|
||||
void Balloon::init(float x, float y, Uint8 kind, float velx, float speed, Uint16 creationtimer, LTexture *texture, SDL_Renderer *renderer)
|
||||
{
|
||||
const Uint8 NUM_FRAMES_BALLON = 10;
|
||||
const Uint8 NUM_FRAMES_BALLON_POP = 12;
|
||||
const Uint8 NUM_FRAMES_BALLON_BORN = 10;
|
||||
@@ -435,6 +424,13 @@ void Balloon::init(float x, float y, Uint8 kind, float velx, float speed, Uint16
|
||||
mSprite->setSpriteClip(mSprite->getAnimationClip(0, 0));
|
||||
}
|
||||
|
||||
// Destructor
|
||||
Balloon::~Balloon()
|
||||
{
|
||||
delete mSprite;
|
||||
mSprite = nullptr;
|
||||
}
|
||||
|
||||
// Centra el globo en la posición X
|
||||
void Balloon::allignTo(int x)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user