Skip to content

Instantly share code, notes, and snippets.

/Game.h Secret

Created September 5, 2016 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/eccb8b49d41581dcb4062d0a917aac15 to your computer and use it in GitHub Desktop.
Save anonymous/eccb8b49d41581dcb4062d0a917aac15 to your computer and use it in GitHub Desktop.
#pragma once
#include "Includes.h"
#include "Player.h"
class Game
{
private:
sf::RenderWindow window;
sf::Clock clock;
sf::Font robotoFont;
sf::Text fps, posX, posY;
sf::Time timePerTick;
sf::Time timeSinceLastUpdate;
sf::Time frameTime;
unsigned int width, height;
std::string fpsText;
std::string windowTitle;
// Move this to the Entity class
Player player;
// Private methods
void initialize();
void loadContent();
void update();
void draw();
public:
Game(unsigned int width, unsigned int height, std::string windowTitle);
// Game loop
void run();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment