-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.h
69 lines (49 loc) · 1.5 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
//#include "enemy.h"
#pragma once
class Game //: private sf::NonCopyable // was causing issues when creating game instance in enemy
{
public:
//Game();
//void run();
int getWindowWidth();
int getWindowHeight();
/* Static access method. */
static Game* getInstance();
private:
/* Private constructor to prevent instancing. */
//Game();
//void processEvents();
//void update(sf::Time elapsedTime);
//void render();
//void screenBound(sf::Sprite& gameObject);
//void updateStatistics(sf::Time elapsedTime);
//void handlePlayerInput(sf::Keyboard::Key key, bool isPressed);
private:
/* Here will be the instance stored. */
static Game* instance;
static const int windowWidth = 640;
static const int windowHeight = 480;
//static const float playerSpeed;
//static const float enemySpeed;
//static const sf::Time TimePerFrame;
//sf::RenderWindow mWindow;
//sf::Texture mPlayerTexture;
//sf::Sprite mPlayer;
//sf::Texture mBackgroundTexture;
//sf::Sprite mBackground;
//sf::Font mFont;
//sf::Text mStatisticsText;
//sf::Time mStatisticsUpdateTime;
//std::size_t mStatisticsNumFrames;
//bool mIsMovingUp;
//bool mIsMovingDown;
//bool mIsMovingRight;
//bool mIsMovingLeft;
//bool mIsShooting;
// Classes
//Enemy enemy;
};