window
This commit is contained in:
@@ -38,6 +38,10 @@ int main() {
|
|||||||
|
|
||||||
// Draw the sprite
|
// Draw the sprite
|
||||||
window.clear(sf::Color::Black);
|
window.clear(sf::Color::Black);
|
||||||
|
if(player.getPosition().x > 400) {
|
||||||
|
player.setPosition({40, 40});
|
||||||
|
}
|
||||||
|
player.move({1.0f, 0});
|
||||||
window.draw(player);
|
window.draw(player);
|
||||||
window.display();
|
window.display();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user