añadidos nuevos ficheros de clases
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// Constructor
|
||||
Sprite::Sprite()
|
||||
{
|
||||
init(0, 0, 0, 0, nullptr, nullptr);
|
||||
init(nullptr, nullptr);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
@@ -14,7 +14,7 @@ Sprite::~Sprite()
|
||||
}
|
||||
|
||||
// Inicializador
|
||||
void Sprite::init(int x, int y, Uint16 w, Uint16 h, LTexture *texture, SDL_Renderer *renderer)
|
||||
/*void Sprite::init(LTexture *texture, SDL_Renderer *renderer, int x, int y, Uint16 w, Uint16 h)
|
||||
{
|
||||
// Establece el alto y el ancho del sprite
|
||||
setWidth(w);
|
||||
@@ -32,10 +32,10 @@ void Sprite::init(int x, int y, Uint16 w, Uint16 h, LTexture *texture, SDL_Rende
|
||||
|
||||
// Establece el rectangulo de donde coger la imagen
|
||||
setSpriteClip(0, 0, w, h);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Inicializador
|
||||
void Sprite::init(SDL_Rect rect, LTexture *texture, SDL_Renderer *renderer)
|
||||
void Sprite::init(LTexture *texture, SDL_Renderer *renderer, SDL_Rect rect)
|
||||
{
|
||||
// Establece el alto y el ancho del sprite
|
||||
mWidth = rect.w;
|
||||
|
||||
Reference in New Issue
Block a user