main
Johannes Hendrik Gerard van der Weide 2023-10-11 10:22:08 +02:00
parent 60a371cdca
commit 723475e2a5
3 changed files with 22 additions and 22 deletions

14
src/Game.hpp Normal file
View File

@ -0,0 +1,14 @@
class Game
{
public:Game();
void run();
private:
void processEvents();
void update();
void render();
private:
sf::RenderWindow mWindow;
sf::CircleShape mPlayer;
};

8
src/ProjectName.cpp Normal file
View File

@ -0,0 +1,8 @@
#include <SFML/Graphics.hpp>
#include <Game.hpp>
int main()
{
Game game;
game.run();
}

View File

@ -1,22 +0,0 @@
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML Application");
sf::CircleShape shape;
shape.setRadius(40.f);
shape.setPosition(100.f, 100.f);
shape.setFillColor(sf::Color::Cyan);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
}