-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
39 lines (32 loc) · 761 Bytes
/
Game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "stdafx.h"
#include "Map.h"
#include "ResourceManager.h"
#include "SpatialGrid.h"
#define ET Game::GetET() //Creating a macro for returning the elapsed time
class Game
{
public:
static void Start();
static float GetET() { return elapsedTime; }
static unsigned int noobjects;
static sf::RenderWindow mainWindow;
static Map map;
static ResourceManager resManager;
enum GameState {
Playing, Exiting
};
static GameState gameState;
private:
static void GameLoop();
static void Handle_FPS();
static int nframes;
static float fpsavg;
static float fpscountertimer;
static sf::Font font;
static sf::Text fpsText;
static sf::Clock fps;
static float elapsedTime;
static sf::Event currentEvent;
static sf::View view;
};