#include "GameScreen.h" #include GameScreen::GameScreen() : m_const {}, m_generator {m_const.m_bullets} { } void 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; } (void) collided; } void GameScreen::draw() { m_const.draw(); m_player.draw(); DrawFPS(5, 5); DrawText(TextFormat("%d", m_const.m_bullets.size()), 5, 25, 20, DARKGRAY); }