-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.h
46 lines (34 loc) · 951 Bytes
/
Main.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
// Author: Annie Berend (5033782) - Jonathan Verbeek (5058288)
#pragma once
#include <QObject>
#include "GameWindow.h"
#include "Game.h"
#include "SoundManager.h"
// Main program entry class
class CMain : public QObject
{
Q_OBJECT
public:
// Constructor
CMain(QObject* parent = nullptr) : QObject(parent) {}
public:
// Runs the complete program loop
int run(int argc, char* argv[]);
// Singleton getter
static CMain* get();
// Returns the GameWindow instance
CGameWindow* getGameWindow() const;
// Returns the Game instance
CGame* getGameInstance() const;
// Returns the SoundManager instance
CSoundManager* getSoundManager() const;
private:
// Singleton instance
static CMain* singletonInstance;
// The CGameWindow instance
CGameWindow* gameWindow;
// The CGame instance
CGame* gameInstance;
// The CSoundManager instance
CSoundManager* soundManager;
};