Canvas::update=>render
This commit is contained in:
parent
c053b38c03
commit
6923904c61
3 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ Canvas::Canvas()
|
||||||
game_font = loadFont("retro_font.ttf");
|
game_font = loadFont("retro_font.ttf");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Canvas::update(const GameState & gameState) {
|
void Canvas::render(const GameState & gameState) {
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
renderMaze();
|
renderMaze();
|
||||||
|
|
|
@ -26,7 +26,7 @@ void Game::run() {
|
||||||
accumulator -= delta_time;
|
accumulator -= delta_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas.update(gameState);
|
canvas.render(gameState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ using Sprite = sf::Sprite;
|
||||||
class Canvas {
|
class Canvas {
|
||||||
public:
|
public:
|
||||||
Canvas();
|
Canvas();
|
||||||
void update(const GameState & gameState);
|
void render(const GameState & gameState);
|
||||||
std::optional<sf::Event> pollEvent();
|
std::optional<sf::Event> pollEvent();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue