23 lines
392 B
C++
23 lines
392 B
C++
|
|
#include "state.hpp"
|
|
#include "tile/empty.hpp"
|
|
#include <memory>
|
|
|
|
using World::State;
|
|
|
|
State::State() {
|
|
m_map.set_tile({0, 0}, std::make_unique<Tile::Empty>());
|
|
}
|
|
|
|
void State::update(const Graphics::Context& ctx) {
|
|
m_builder.update(m_map, ctx);
|
|
m_player.update();
|
|
m_map.update();
|
|
}
|
|
|
|
void State::render(const Graphics::Context& ctx) const {
|
|
m_map.render(ctx);
|
|
m_builder.render(ctx);
|
|
}
|
|
|