-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
41 lines (34 loc) · 955 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
40
41
#pragma once
#include "SFML/Window.hpp"
#include "SFML/Graphics.hpp"
#include "SFML/Audio.hpp"
#include "PlayerPaddle.h"
#include "PlayerPaddle2.h"
#include "Score1.h"
#include "Score2.h"
#include "GameBall.h"
#include "GameObjectManager.h"
class Game
{
public:
static int Start();
static sf::RenderWindow& GetWindow();
const static sf::Event& GetInput();
const static GameObjectManager& GetGameObjectManager();
const static int SCREEN_WIDTH = 1024;
const static int SCREEN_HEIGHT = 768;
static int scoreP1;
static int scoreP2;
private:
static bool IsExiting();
static void GameLoop();
static void ShowSplashScreen();
static void ShowMenu();
static void ShowSetting();
static void ShowTutorial();
enum GameState { Uninitialized, ShowingSplash, Paused,
ShowingMenu, Playing, Exiting, SetGame, OpenTutorial };
static GameState _gameState;
static sf::RenderWindow _mainWindow;
static GameObjectManager _gameObjectManager;
};