World::World() : test(10)
{
t_background.loadFromFile("back.png");
s_backoground.setTexture(t_background);
camera.setSize(800, 600);
camera.setCenter(400, 300);
}
void World::boucle()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "Simulator");
window.setFramerateLimit(60);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
///Gestion de la création des Avant Poste ///
//av.av_build();
//test[2].setPosition(4000, 0);
window.clear();
window.draw(s_backoground);
for (int i ; i<test.size();i++);
{
window.draw(test[i]);
test[i].setPosition(position_playeur.x + (5*i), position_playeur.y);
}
window.display();
}
}