Resueltos los dos últimos problemas
This commit is contained in:
@@ -45,7 +45,7 @@ MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vel
|
||||
spriteClip = {0, 0, w, h};
|
||||
|
||||
// Establece el centro de rotación
|
||||
center = {0, 0};
|
||||
center = nullptr;
|
||||
|
||||
// Establece el tipo de volteado
|
||||
currentFlip = SDL_FLIP_NONE;
|
||||
@@ -73,7 +73,7 @@ void MovingSprite::clear()
|
||||
|
||||
angle = 0.0; // Angulo para dibujarlo
|
||||
rotateEnabled = false; // Indica si ha de rotar
|
||||
center = {0, 0}; // Centro de rotación
|
||||
center = nullptr; // Centro de rotación
|
||||
rotateSpeed = 0; // Velocidad de giro
|
||||
rotateAmount = 0.0; // Cantidad de grados a girar en cada iteración
|
||||
counter = 0; // Contador interno
|
||||
@@ -101,7 +101,9 @@ void MovingSprite::move()
|
||||
void MovingSprite::render()
|
||||
{
|
||||
if (enabled)
|
||||
texture->render(renderer, (int)x, (int)y, &spriteClip, zoomW, zoomH, angle, ¢er, currentFlip);
|
||||
{
|
||||
texture->render(renderer, (int)x, (int)y, &spriteClip, zoomW, zoomH, angle, center, currentFlip);
|
||||
}
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
|
||||
Reference in New Issue
Block a user