|
ShitEngine
基于 C++20 与 SDL3 的轻量级 2D 游戏引擎
|
配置管理类 更多...
#include <Config.h>
Public 成员函数 | |
| bool | init () |
| 加载 settings.json | |
| void | loadFromJson (const Json &j) |
| 从 JSON 对象加载配置 | |
| Config (const Config &)=delete | |
| Config & | operator= (const Config &)=delete |
| Config (Config &&)=delete | |
| Config & | operator= (Config &&)=delete |
静态 Public 成员函数 | |
| static Config & | GetInstance () |
| static bool | Init () |
| static const ProjectConfig & | GetProjectConfig () |
| 项目配置 | |
| static const WindowConfig & | GetWindowConfig () |
| 窗口配置 | |
配置管理类
从 settings.json 读取配置,若无配置文件则全字段使用默认值。 在 Game::Init() 中自动调用 Init()。
|
delete |
|
delete |
|
static |
|
inlinestatic |
项目配置
|
inlinestatic |
窗口配置
|
inlinestatic |
| bool init | ( | ) |
加载 settings.json
| void loadFromJson | ( | const Json & | j | ) |
从 JSON 对象加载配置