summaryrefslogtreecommitdiffhomepage
path: root/Game.cpp
blob: 13790d5682efd578d3bc2992faba83d968415d65 (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
32
#include "Game.h"

#include <memory>
#include <utility>

#include <raylib.h>

#include "Screen.h"


void
Game::set(std::unique_ptr<Screen> screen)
{
    m_screen = std::move(screen);
}


void
Game::update(const float dt)
{
    if (m_screen)
        m_screen->update(dt);
}


void
Game::draw()
{
    ClearBackground(BLACK);
    if (m_screen)
        m_screen->draw();
}