clang-format
This commit is contained in:
2025-07-23 20:55:50 +02:00
parent d33c1f5dc5
commit ec008ef5dd
61 changed files with 308 additions and 253 deletions

View File

@@ -171,13 +171,13 @@ void Balloon::handleVerticalMovement() {
handleBottomCollision();
}
bool Balloon::isOutOfHorizontalBounds(float minX, float maxX) const {
return x_ < minX || x_ > maxX;
auto Balloon::isOutOfHorizontalBounds(float min_x, float max_x) const -> bool {
return x_ < min_x || x_ > max_x;
}
void Balloon::handleHorizontalBounce(float minX, float maxX) {
void Balloon::handleHorizontalBounce(float min_x, float max_x) {
playBouncingSound();
x_ = std::clamp(x_, minX, maxX);
x_ = std::clamp(x_, min_x, max_x);
vx_ = -vx_;
if (type_ == BalloonType::POWERBALL) {
@@ -187,7 +187,7 @@ void Balloon::handleHorizontalBounce(float minX, float maxX) {
}
}
bool Balloon::shouldCheckTopCollision() const {
auto Balloon::shouldCheckTopCollision() const -> bool {
// Colisión en la parte superior solo si el globo va de subida
return vy_ < 0;
}