summaryrefslogtreecommitdiffhomepage
path: root/Game.cpp
blob: a1b54aea22d338feb908cf9574c0e9dfa4eb5315 (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 "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()
{
    if (m_screen)
        m_screen->draw();
}