ShitEngine
基于 C++20 与 SDL3 的轻量级 2D 游戏引擎
载入中...
搜索中...
未找到
Config类 参考

配置管理类 更多...

#include <Config.h>

Public 成员函数

bool init ()
 加载 settings.json
void loadFromJson (const Json &j)
 从 JSON 对象加载配置
 Config (const Config &)=delete
Configoperator= (const Config &)=delete
 Config (Config &&)=delete
Configoperator= (Config &&)=delete

静态 Public 成员函数

static ConfigGetInstance ()
static bool Init ()
static const ProjectConfigGetProjectConfig ()
 项目配置
static const WindowConfigGetWindowConfig ()
 窗口配置

详细描述

配置管理类

从 settings.json 读取配置,若无配置文件则全字段使用默认值。 在 Game::Init() 中自动调用 Init()

构造及析构函数说明

◆ Config() [1/2]

Config ( const Config & )
delete

◆ Config() [2/2]

Config ( Config && )
delete

成员函数说明

◆ GetInstance()

Config & GetInstance ( )
static

◆ GetProjectConfig()

const ProjectConfig & GetProjectConfig ( )
inlinestatic

项目配置

◆ GetWindowConfig()

const WindowConfig & GetWindowConfig ( )
inlinestatic

窗口配置

◆ Init()

bool Init ( )
inlinestatic

◆ init()

bool init ( )

加载 settings.json

◆ loadFromJson()

void loadFromJson ( const Json & j)

从 JSON 对象加载配置

◆ operator=() [1/2]

Config & operator= ( Config && )
delete

◆ operator=() [2/2]

Config & operator= ( const Config & )
delete

该类的文档由以下文件生成: