#pragma once
#include "EngineCore/Game.h"
#include "Global/Script/CharacterConfig.h"
#include "Global/Script/EquipmentConfig.h"
#include "Global/Script/MonsterConfig.h"
#include "Global/Save/SavaManager.h"
class Global_Game
{

public:
    Global_Game(const Global_Game &) = delete;
    Global_Game &operator=(const Global_Game &) = delete;
    Global_Game(Global_Game &&) = delete;
    Global_Game &operator=(Global_Game &&) = delete;
    // 全局访问点
    static Global_Game &GetInstance()
    {
        static Global_Game instance; // 局部静态变量，保证只初始化一次
        return instance;
    }

    // 游戏资源加载之前的初始化
    void Init();
    // 游戏资源加载之后的初始化
    void InitGame();

public:
    // 当前游戏状态 0未初始化
    int game_state = 0;

public:
    // 字体资源
    std::vector<TTF_Font *> Fonts;
    // 角色配置文件
    std::vector<GlobalCharacterScript::CharacterConfig> CharacterConfigs;
    // 装备路径Map
    std::map<int, std::string> EquipmentPathMap;

    // 怪物相关
    std::map<int, std::string> MonsterPathMap;                        // 路径
    std::map<int, GlobalMonsterScript::MonsterConfig> MonsterInfoMap; // 信息
    GlobalMonsterScript::MonsterConfig GetMonsterInfo(int id); // 获取怪物信息

    // 游戏资源初始化标志
    bool InitFlag = false;

private:
    Global_Game(/* args */);
    ~Global_Game();

    void InitFont();
};
