-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngine.cpp
More file actions
30 lines (24 loc) · 873 Bytes
/
Engine.cpp
File metadata and controls
30 lines (24 loc) · 873 Bytes
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
#include <QtQml>
#include "Engine.h"
#include "Window.h"
#include "LocalImageProvider.h"
#include "SharedState.h"
#include "States/LogoState.h"
#include "States/MainMenuState.h"
#include "States/GameState.h"
#include "States/GoalState.h"
Engine::Engine()
{
m_localImageProvider = new LocalImageProvider();
m_sharedState = new SharedState();
// Registration of QML types
qmlRegisterType<Window>("MemoryLeek", 1, 0, "Window");
qmlRegisterType<States::LogoState>("MemoryLeek", 1, 0, "LogoState");
qmlRegisterType<States::MainMenuState>("MemoryLeek", 1, 0, "MenuState");
qmlRegisterType<States::GameState>("MemoryLeek", 1, 0, "GameState");
qmlRegisterType<States::GoalState>("MemoryLeek", 1, 0, "GoalState");
// Registration of components
registerComponent(m_sharedState);
// Registration of image providers
addImageProvider("local", m_localImageProvider);
}