Files
Frostbite2D/Game/include/npc/NpcDataLoader.h
Lenheart caad22cca7 feat(npc): 添加NPC数据加载、动画和对象功能
实现NPC系统的核心功能,包括:
1. 新增NpcDataLoader用于加载NPC索引和配置数据
2. 添加NpcAnimation处理NPC动画显示
3. 创建NpcObject实现NPC交互和显示逻辑
4. 在GameMapTestScene中集成测试NPC功能
2026-04-07 23:02:03 +08:00

21 lines
376 B
C++

#pragma once
#include <map>
#include <optional>
#include <string>
namespace frostbite2D::npc {
struct NpcConfig {
int id = -1;
std::string path;
std::string name;
std::string fieldName;
std::string fieldAnimationPath;
};
bool loadNpcIndex(std::map<int, std::string>& outIndex);
std::optional<NpcConfig> loadNpcConfig(int npcId);
} // namespace frostbite2D::npc