enhancing title screen
This commit is contained in:
@@ -87,7 +87,6 @@ void Item::init(Uint8 value, float x, float y, LTexture *texture, SDL_Renderer *
|
||||
case ITEM_COFFEE_MACHINE:
|
||||
mWidth = 32;
|
||||
mHeight = 32;
|
||||
//mPosX = (rand() % (PLAY_AREA_WIDTH - mWidth - 3)) + 3;
|
||||
mPosX = (((int)x + (PLAY_AREA_WIDTH / 2)) % (PLAY_AREA_WIDTH - mWidth - 5)) + 2;
|
||||
mPosY = PLAY_AREA_TOP - mHeight;
|
||||
mVelX = 0.0f;
|
||||
@@ -98,7 +97,6 @@ void Item::init(Uint8 value, float x, float y, LTexture *texture, SDL_Renderer *
|
||||
mSprite->setAnimationFrames(0, 1, 32 * 1, 16 * 2, mWidth, mHeight);
|
||||
mSprite->setAnimationFrames(0, 2, 32 * 2, 16 * 2, mWidth, mHeight);
|
||||
mSprite->setAnimationFrames(0, 3, 32 * 3, 16 * 2, mWidth, mHeight);
|
||||
//mSprite->setSpriteClip(mSprite->getAnimationClip(0, 0));
|
||||
mSprite->setPosX(mPosX);
|
||||
mSprite->setPosY(mPosY);
|
||||
mCollider.r = 10;
|
||||
@@ -108,17 +106,6 @@ void Item::init(Uint8 value, float x, float y, LTexture *texture, SDL_Renderer *
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (mClass == ITEM_COFFEE_MACHINE)
|
||||
{
|
||||
printf("-creation-\n");
|
||||
printf("x\t%f\n", mPosX);
|
||||
printf("y\t%f\n", mPosY);
|
||||
printf("ax\t%f\n", mAccelX);
|
||||
printf("ay\t%f\n", mAccelY);
|
||||
printf("r\t%i\n", mCollider.r);
|
||||
printf("---\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Centra el objeto en la posición X
|
||||
@@ -162,16 +149,6 @@ void Item::render()
|
||||
// Actualiza la posición y estados del objeto
|
||||
void Item::move()
|
||||
{
|
||||
//if (mClass == ITEM_COFFEE_MACHINE)
|
||||
//{
|
||||
// printf("-move-\n");
|
||||
// printf("x\t%f\n", mPosX);
|
||||
// printf("y\t%f\n", mPosY);
|
||||
// printf("ax\t%f\n", mAccelX);
|
||||
// printf("ay\t%f\n", mAccelY);
|
||||
// printf("---\n");
|
||||
//}
|
||||
|
||||
mStatus = 0;
|
||||
|
||||
// Calcula la nueva posición
|
||||
|
||||
Reference in New Issue
Block a user