Acabat el nou motor per a textos en pantalla

This commit is contained in:
2024-10-30 09:25:28 +01:00
parent b43782786a
commit 20c51d0796
11 changed files with 269 additions and 274 deletions

View File

@@ -28,13 +28,13 @@ Balloon::Balloon(float x, float y, BalloonType type, BalloonSize size, float vel
vy_ = 0;
max_vy_ = 3.0f;
const int size = static_cast<int>(size_);
gravity_ = param.balloon.at(size).grav;
default_vy_ = param.balloon.at(size).vel;
h_ = w_ = BALLOON_SIZE[size];
power_ = BALLOON_POWER[size];
menace_ = BALLOON_MENACE[size];
score_ = BALLOON_SCORE[size];
const int index = static_cast<int>(size_);
gravity_ = param.balloon.at(index).grav;
default_vy_ = param.balloon.at(index).vel;
h_ = w_ = BALLOON_SIZE[index];
power_ = BALLOON_POWER[index];
menace_ = BALLOON_MENACE[index];
score_ = BALLOON_SCORE[index];
break;
}
@@ -44,25 +44,25 @@ Balloon::Balloon(float x, float y, BalloonType type, BalloonSize size, float vel
default_vy_ = max_vy_ = vy_ = fabs(vx_ * 2.0f);
gravity_ = 0.00f;
const int size = static_cast<int>(size_);
h_ = w_ = BALLOON_SIZE[size];
power_ = BALLOON_POWER[size];
menace_ = BALLOON_MENACE[size];
score_ = BALLOON_SCORE[size];
const int index = static_cast<int>(size_);
h_ = w_ = BALLOON_SIZE[index];
power_ = BALLOON_POWER[index];
menace_ = BALLOON_MENACE[index];
score_ = BALLOON_SCORE[index];
break;
}
case BalloonType::POWERBALL:
{
const int size = 3;
h_ = w_ = BALLOON_SIZE[size];
const int index = 3;
h_ = w_ = BALLOON_SIZE[index];
power_ = score_ = menace_ = 0;
vy_ = 0;
max_vy_ = 3.0f;
gravity_ = param.balloon.at(size).grav;
default_vy_ = param.balloon.at(size).vel;
gravity_ = param.balloon.at(index).grav;
default_vy_ = param.balloon.at(index).vel;
sprite_->disableRotate();
sprite_->setRotateSpeed(0);