// // Created by misaki on 2025/9/8. // #pragma once #include #include #include // 资源句柄,防止裸指针到处飞 template using Handle = std::shared_ptr; /// 宠物句柄 // 前向声明 class IPet; /// 宠物接口 using IPetPtr = Handle; /// 宠物句柄 // 事件类型 enum class Emotion { Feed, /// 喂食 Happy, /// 高兴 Angry, /// 生气 Upset /// 沮丧 }; // 成长阶段 enum class Stage { Baby, /// 幼年 Teen, /// 青年 Adult /// 成长 }; // 数值封装 struct Vitals { int hp = 100; // 0-100 /// 生命值 int intimacy = 0; // 0-100 /// 亲密度 }; // 身份设定 struct Persona { std::string systemPrompt; /// 系统提示 std::string greet; /// 默认欢迎语 // …可扩展 }; // 动物元数据(只读) struct AnimalManifest { std::string id; // "snow_leopard" /// ID std::string displayName; /// 显示名称 Persona persona; /// 身份设定 std::unordered_map modelPath; /// 阶段→模型 std::unordered_map audioPath; /// 阶段→音频 std::string version; /// 版本 };