blob: 4315060e8ab07744563933df823c42552ce15f04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "GameScreen.h"
#include <raylib.h>
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 = m_player.collide(m_const.m_bullets);
(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);
}
|