Ajout de la fonction render au monde
Joueur déplaçable début du cast de rayon Trop fatigué pour faire de la trigo
This commit is contained in:
parent
52a261de58
commit
f21fc6f805
5 changed files with 117 additions and 4 deletions
16
main.cpp
16
main.cpp
|
@ -9,6 +9,22 @@ int main()
|
|||
World world(10,10);
|
||||
world.setBlock(BlockType::AIR,1,1,8,8);
|
||||
world.setBlock(BlockType::WALL,4,4,2,2);
|
||||
world.player.move(2,2);
|
||||
std::cout << world << std::endl;
|
||||
|
||||
sf::RenderWindow window(sf::VideoMode(800,600),"Da raycasting");
|
||||
world.render(window);
|
||||
window.display();
|
||||
|
||||
while (window.isOpen())
|
||||
{
|
||||
sf::Event event;
|
||||
while (window.pollEvent(event))
|
||||
{
|
||||
if (event.type == sf::Event::Closed)
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue