Naprawiono białe kwadraty i zmieniono tło
This commit is contained in:
6
main.cpp
6
main.cpp
@@ -13,7 +13,7 @@ int main()
|
||||
window.setFramerateLimit(60);
|
||||
|
||||
sf::Texture backgroundTexture;
|
||||
backgroundTexture.loadFromFile("../assets/img/background.jpg"); // wczytywanie tła
|
||||
backgroundTexture.loadFromFile("../assets/img/space.jpg"); // wczytywanie tła
|
||||
sf::Sprite backgroundSprite(backgroundTexture); // tworzenie tła
|
||||
|
||||
Player ship(240,650, "../assets/ship/Dreadnought-Base.png"); // tworzenie statku
|
||||
@@ -41,6 +41,10 @@ int main()
|
||||
ship.shoot();
|
||||
}
|
||||
|
||||
if(event.type == sf::Event::MouseButtonPressed) {
|
||||
ship.shoot();
|
||||
}
|
||||
|
||||
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Escape)) {
|
||||
window.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user