renombrades extensions .h a .hpp
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user