Throw coffe with rotation and time stop with clock sound
This commit is contained in:
@@ -37,6 +37,9 @@ void MovingSprite::init(float x, float y, int w, int h, float velx, float vely,
|
||||
setZoomW(1);
|
||||
setZoomH(1);
|
||||
|
||||
// Establece el angulo con el que se dibujará
|
||||
setAngle(0.0);
|
||||
|
||||
// Establece la textura donde están los gráficos para el sprite
|
||||
setTexture(texture);
|
||||
|
||||
@@ -61,57 +64,63 @@ void MovingSprite::move()
|
||||
void MovingSprite::render()
|
||||
{
|
||||
//mTexture->render(mRenderer, (int)mPosX, (int)mPosY, &mSpriteClip);
|
||||
mTexture->render(mRenderer, (int)mPosX, (int)mPosY, &mSpriteClip, mZoomW, mZoomH);
|
||||
mTexture->render(mRenderer, (int)mPosX, (int)mPosY, &mSpriteClip, mZoomW, mZoomH, mAngle);
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getPosX()
|
||||
{
|
||||
return mPosX;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getPosY()
|
||||
{
|
||||
return mPosY;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getVelX()
|
||||
{
|
||||
return mVelX;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getVelY()
|
||||
{
|
||||
return mVelY;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getAccelX()
|
||||
{
|
||||
return mAccelX;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getAccelY()
|
||||
{
|
||||
return mAccelY;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getZoomW()
|
||||
{
|
||||
return mZoomW;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
// Obtiene el valor de la variable
|
||||
float MovingSprite::getZoomH()
|
||||
{
|
||||
return mZoomH;
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
double MovingSprite::getAngle()
|
||||
{
|
||||
return mAngle;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void MovingSprite::setPosX(float x)
|
||||
{
|
||||
@@ -158,4 +167,22 @@ void MovingSprite::setZoomW(float w)
|
||||
void MovingSprite::setZoomH(float h)
|
||||
{
|
||||
mZoomH = h;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void MovingSprite::setAngle(double a)
|
||||
{
|
||||
mAngle = a;
|
||||
}
|
||||
|
||||
// Incrementa el valor de la variable
|
||||
void MovingSprite::incAngle(double inc)
|
||||
{
|
||||
mAngle += inc;
|
||||
}
|
||||
|
||||
// Decrementa el valor de la variable
|
||||
void MovingSprite::decAngle(double dec)
|
||||
{
|
||||
mAngle -= dec;
|
||||
}
|
||||
Reference in New Issue
Block a user