bug hunting coffee machine on windows
This commit is contained in:
@@ -74,7 +74,7 @@ void Director::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sección
|
// Sección
|
||||||
mSection.name = PROG_SECTION_LOGO;
|
mSection.name = PROG_SECTION_GAME;
|
||||||
mSection.subsection = 0;
|
mSection.subsection = 0;
|
||||||
|
|
||||||
// Textos
|
// Textos
|
||||||
|
|||||||
@@ -2269,10 +2269,10 @@ void Game::resetItems()
|
|||||||
// Devuelve un item en función del azar
|
// Devuelve un item en función del azar
|
||||||
Uint8 Game::dropItem()
|
Uint8 Game::dropItem()
|
||||||
{
|
{
|
||||||
/*if (mPlayer[0]->isPowerUp() || (mCoffeeMachineEnabled))
|
if (mPlayer[0]->isPowerUp() || (mCoffeeMachineEnabled))
|
||||||
return NO_KIND;
|
return NO_KIND;
|
||||||
else
|
else
|
||||||
return ITEM_COFFEE_MACHINE;*/
|
return ITEM_COFFEE_MACHINE;
|
||||||
|
|
||||||
const Uint8 luckyNumber = rand() % 100;
|
const Uint8 luckyNumber = rand() % 100;
|
||||||
const Uint8 item = rand() % 6;
|
const Uint8 item = rand() % 6;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Item::Item()
|
Item::Item()
|
||||||
@@ -144,6 +145,16 @@ void Item::render()
|
|||||||
// Actualiza la posición y estados del objeto
|
// Actualiza la posición y estados del objeto
|
||||||
void Item::move()
|
void Item::move()
|
||||||
{
|
{
|
||||||
|
if (mClass == ITEM_COFFEE_MACHINE)
|
||||||
|
{
|
||||||
|
printf("---\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;
|
mStatus = 0;
|
||||||
|
|
||||||
// Calcula la nueva posición
|
// Calcula la nueva posición
|
||||||
@@ -186,7 +197,8 @@ void Item::move()
|
|||||||
mAccelX = 0;
|
mAccelX = 0;
|
||||||
mAccelY = 0;
|
mAccelY = 0;
|
||||||
mPosY = PLAY_AREA_BOTTOM - mHeight;
|
mPosY = PLAY_AREA_BOTTOM - mHeight;
|
||||||
if (mClass == ITEM_COFFEE_MACHINE) mStatus = 1;
|
if (mClass == ITEM_COFFEE_MACHINE)
|
||||||
|
mStatus = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actualiza la posición del sprite
|
// Actualiza la posición del sprite
|
||||||
|
|||||||
Reference in New Issue
Block a user