|
|
@@ -48,7 +48,8 @@ level::~level() {}
|
|
|
|
|
|
void level::add_bullet(bullet b) {
|
|
|
bullets_.emplace_back(std::make_unique<bullet>(std::move(b)));
|
|
|
- // TODO: Add to collision boxes...
|
|
|
+ // TODO: Add to correct collision boxes...
|
|
|
+ collidables[0].emplace_back(bullets_.back().get());
|
|
|
}
|
|
|
|
|
|
void level::update(float delta) {
|
|
|
@@ -60,6 +61,7 @@ void level::update(float delta) {
|
|
|
b->update(delta);
|
|
|
}
|
|
|
check_collisions();
|
|
|
+ // TODO: This is a bad hack until I can properly disassociate collision info
|
|
|
for (auto & b : bullets_) {
|
|
|
if (math::intersects(player_->render_info().points,
|
|
|
b->render_info().points)) {
|