0 Members and 2 Guests are viewing this topic.
#include <SFML/Graphics.hpp>#include "Player.h"int main(){ //Create main window, using the best available resolution, and make the reference sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Window"); sf::RenderWindow &rApp = App; //Control framerate to reduce CPU usage App.SetFramerateLimit(30); //Reference Classes Player player(rApp); //This is the main loop, it will loop until you exit the system. while (App.IsOpened()) { //Here we process the events list sf::Event Event; while (App.GetEvent(Event)) { //Close window: exit if (Event.Type == sf::Event::Closed) { App.Close(); } //Clear the screen with a color App.Clear(); //Here you will draw all of the stuff in the frame buffer player.Update(); //Render the frame on screen App.Display(); } } return EXIT_SUCCESS;}