summaryrefslogtreecommitdiffhomepage
path: root/GameScreen.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-18 10:59:32 +0200
committerAki <please@ignore.pl>2022-04-18 10:59:32 +0200
commitf0891205710c2d5c9b78a9d275de88a77c2ccda3 (patch)
tree6e473a2a542fae6addc6f83912c3a4e91244e879 /GameScreen.cpp
parent04a09e6a59200092e7e4ccde94535a921c01c4c4 (diff)
downloadbullethell2022-f0891205710c2d5c9b78a9d275de88a77c2ccda3.zip
bullethell2022-f0891205710c2d5c9b78a9d275de88a77c2ccda3.tar.gz
bullethell2022-f0891205710c2d5c9b78a9d275de88a77c2ccda3.tar.bz2
Moved collision checks to player class
Diffstat (limited to 'GameScreen.cpp')
-rw-r--r--GameScreen.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/GameScreen.cpp b/GameScreen.cpp
index 774956e..4315060 100644
--- a/GameScreen.cpp
+++ b/GameScreen.cpp
@@ -16,11 +16,7 @@ GameScreen::update(const float dt)
m_player.update(dt);
m_generator.update(dt);
m_const.update(dt);
- bool collided = false;
- for (const auto& bullet : m_const.m_bullets) {
- if (CheckCollisionCircles(m_player.m_position, 9, bullet.position, bullet.radius))
- collided = true;
- }
+ bool collided = m_player.collide(m_const.m_bullets);
(void) collided;
}