-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEngineInit.h
More file actions
68 lines (61 loc) · 1.16 KB
/
Copy pathEngineInit.h
File metadata and controls
68 lines (61 loc) · 1.16 KB
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
#pragma once
#include "Core/ModuleLoader.h"
#if SH_EDITOR
#include "Editor/Project.h"
#endif
#include <memory>
namespace sh
{
namespace core
{
class GarbageCollection;
class AssetBundle;
}
namespace window
{
class Window;
}
namespace render
{
class Renderer;
}
namespace game
{
class ImGUImpl;
class ComponentModule;
class GameThread;
class RenderThread;
class GameManager;
}
class EngineInit
{
public:
EngineInit();
~EngineInit();
void Start();
void Clean();
private:
void LoadModule();
void InitResource();
void ProcessInput();
void Loop();
void SyncThread();
private:
core::ModuleLoader moduleLoader;
core::GarbageCollection* gc = nullptr;
game::GameThread* gameThread = nullptr;
game::RenderThread* renderThread = nullptr;
game::ComponentModule* componentModule = nullptr;
game::GameManager* gameManager = nullptr;
std::unique_ptr<window::Window> window;
std::unique_ptr<game::ImGUImpl> gui;
#if SH_EDITOR
std::unique_ptr<editor::Project> project;
#else
std::unique_ptr<core::AssetBundle> assetBundle;
#endif
std::unique_ptr<render::Renderer> renderer;
int limitFps = 144;
bool bStop = false;
};
}