Plansza to be continued (WIP)
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "SFML/Graphics.hpp"
|
||||
#include "headers/Player.h"
|
||||
#include "headers/Bullet.h"
|
||||
#include "headers/Background.h"
|
||||
#include "headers/AudioManager.h"
|
||||
#include "headers/Meteor.h"
|
||||
@@ -17,17 +16,13 @@ int main()
|
||||
|
||||
sf::Image icon;
|
||||
icon.loadFromFile("../assets/img/icon/ikonka.png");
|
||||
|
||||
mainWindow.setIcon(128, 128, icon.getPixelsPtr());
|
||||
Plansza plansza(mainWindow.getSize().y, mainWindow.getSize().x);
|
||||
|
||||
Plansza plansza(mainWindow.getSize().y, mainWindow.getSize().x);
|
||||
Background background("../assets/img/background/background.png", 2.0f); //tutaj predkosc tla, mozna zwiekszyc jak za wolno
|
||||
|
||||
|
||||
AudioManager audioManager;
|
||||
if (!audioManager.loadBackgroundMusic("../assets/music/background.ogg")) {
|
||||
return -1;
|
||||
}
|
||||
audioManager.loadBackgroundMusic("../assets/music/background.ogg");
|
||||
audioManager.playBackgroundMusic();
|
||||
|
||||
audioManager.loadSoundEffect("shoot", "../assets/sounds/shoot.ogg");
|
||||
@@ -133,7 +128,6 @@ int main()
|
||||
audioManager.playSoundEffect("fail", 70.f);
|
||||
audioManager.stopBackgroundMusic();
|
||||
while (errorWindow.isOpen()) {
|
||||
sf::Event event;
|
||||
while (errorWindow.pollEvent(event)) {
|
||||
if (event.type == sf::Event::Closed || sf::Keyboard::isKeyPressed(sf::Keyboard::Escape)) {
|
||||
errorWindow.close();
|
||||
|
||||
Reference in New Issue
Block a user