-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
81 lines (71 loc) · 1.81 KB
/
config.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
70
71
72
73
74
75
76
77
78
79
#pragma once
#ifndef __CONFIG__
#define __CONFIG__
#include <iosfwd>
#include "raylib.h"
#include <string>
#include "utils/json.hpp"
// 로고, 메인메뉴, 게임 화면 등 각각의 씬
enum class Scene
{
logo = 0, titleMenu, game, scoreScene, settingScreen
};
// 전역적으로 사용할 싱글톤 클래스
class SceneManager
{
private:
SceneManager() {}
static SceneManager* instance;
public:
static SceneManager* GetInstance()
{
if (instance != nullptr)
{
return instance;
}else
{
instance = new SceneManager();
return instance;
}
}
~SceneManager();
bool SaveJson();
bool LoadJson();
void LoadResource(); // Resource Initializing
// Game Manage Variable
bool gameExit;
Scene scene;
Scene lastSce;
float volume = 1.0f;
bool isLog = false;
Music music; // 배경음악 선언
Font fontStrawberry;
Font fontGukdae;
Font fontNice;
};
class LangManager
{
private:
LangManager() {}
static LangManager* instance;
std::string GetString(const char* lang, std::string _elem);
nlohmann::json outputData;
public:
static LangManager* GetInstance()
{
if (instance != nullptr)
{
return instance;
}else
{
instance = new LangManager();
return instance;
}
}
~LangManager();
void Init();
void LoadStrings(const char* lang);
// 멤버 변수
std::string title, start, mainMenu, settings, exit, settingsScreen, save, load, volume, log;
};
#endif