La powerball ja no mata

La powerball no pillava la rotació si es creava amb el rellotge actiu
This commit is contained in:
2024-11-16 12:45:58 +01:00
parent 065336c310
commit da74b8dfce
5 changed files with 38 additions and 65 deletions

View File

@@ -385,7 +385,7 @@ bool Game::checkPlayerBalloonCollision(std::shared_ptr<Player> &player)
{
for (auto &balloon : balloon_manager_->getBalloons())
{
if (!balloon->isStopped() && !balloon->isInvulnerable())
if (!balloon->isStopped() && !balloon->isInvulnerable() && !balloon->isPowerBall())
{
if (checkCollision(player->getCollider(), balloon->getCollider()))
{
@@ -753,7 +753,7 @@ void Game::throwCoffee(int x, int y)
smart_sprites_.back()->setEnabled(true);
smart_sprites_.back()->setFinishedCounter(1);
smart_sprites_.back()->setSpriteClip(0, param.game.item_size, param.game.item_size, param.game.item_size);
smart_sprites_.back()->enableRotate();
smart_sprites_.back()->setRotate(true);
smart_sprites_.back()->setRotateSpeed(10);
smart_sprites_.back()->setRotateAmount(90.0);
}