working on "How to play"
This commit is contained in:
@@ -92,24 +92,6 @@ void SmartSprite::setDestY(int value)
|
||||
mDestY = value;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void SmartSprite::setRotate(bool value)
|
||||
{
|
||||
mRotate = value;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void SmartSprite::setRotateSpeed(Uint16 value)
|
||||
{
|
||||
mRotateSpeed = value;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void SmartSprite::setRotateAmount(double value)
|
||||
{
|
||||
mRotateAmount = value;
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
int SmartSprite::getDestX()
|
||||
{
|
||||
@@ -122,37 +104,12 @@ int SmartSprite::getDestY()
|
||||
return mDestY;
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
bool SmartSprite::getRotate()
|
||||
{
|
||||
return mRotate;
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
Uint16 SmartSprite::getRotateSpeed()
|
||||
{
|
||||
return mRotateSpeed;
|
||||
}
|
||||
|
||||
// Establece la rotacion
|
||||
void SmartSprite::rotate()
|
||||
{
|
||||
if (mRotate)
|
||||
{
|
||||
if (mCounter % mRotateSpeed == 0)
|
||||
{
|
||||
incAngle(mRotateAmount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Actualiza la posición y comprueba si ha llegado a su destino
|
||||
bool SmartSprite::update()
|
||||
{
|
||||
if (mEnabled)
|
||||
{
|
||||
move();
|
||||
rotate();
|
||||
MovingSprite::update();
|
||||
|
||||
// Comprueba si se desplaza en el eje X hacia la derecha
|
||||
if ((getAccelX() > 0) || ((getAccelX() == 0) && (getVelX() > 0)))
|
||||
@@ -168,7 +125,6 @@ bool SmartSprite::update()
|
||||
setAccelX(0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
// Comprueba si se desplaza en el eje X hacia la izquierda
|
||||
else if ((getAccelX() < 0) || ((getAccelX() == 0) && (getVelX() < 0)))
|
||||
{
|
||||
@@ -244,9 +200,6 @@ bool SmartSprite::update()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mCounter++;
|
||||
mCounter %= 65000;
|
||||
}
|
||||
|
||||
return mIsOnDestination;
|
||||
|
||||
Reference in New Issue
Block a user