renombrades extensions .h a .hpp

This commit is contained in:
2025-10-17 21:45:19 +02:00
parent 50ccb2ccc2
commit 46974ef2eb
144 changed files with 1758 additions and 1783 deletions

View File

@@ -1,10 +1,10 @@
#include "bullet_manager.h"
#include "bullet_manager.hpp"
#include <algorithm> // Para remove_if
#include "bullet.h" // Para Bullet
#include "param.h" // Para param
#include "player.h" // Para Player
#include "bullet.hpp" // Para Bullet
#include "param.hpp" // Para param
#include "player.hpp" // Para Player
// Constructor
BulletManager::BulletManager()
@@ -39,10 +39,9 @@ void BulletManager::freeBullets() {
if (!bullets_.empty()) {
// Elimina las balas deshabilitadas del vector
bullets_.erase(
std::remove_if(bullets_.begin(), bullets_.end(),
[](const std::shared_ptr<Bullet>& bullet) {
return !bullet->isEnabled();
}),
std::remove_if(bullets_.begin(), bullets_.end(), [](const std::shared_ptr<Bullet>& bullet) {
return !bullet->isEnabled();
}),
bullets_.end());
}
}
@@ -103,7 +102,7 @@ auto BulletManager::isBulletOutOfBounds(const std::shared_ptr<Bullet>& bullet) -
auto collider = bullet->getCollider();
return (collider.x < play_area_.x ||
collider.x > play_area_.x + play_area_.w ||
collider.y < play_area_.y ||
collider.y > play_area_.y + play_area_.h);
collider.x > play_area_.x + play_area_.w ||
collider.y < play_area_.y ||
collider.y > play_area_.y + play_area_.h);
}