using System; using UnityEngine; using Cysharp.Threading.Tasks; namespace GameWrapper.Team { /// /// 映射PaintType枚举,避免直接依赖 注意后期修改 TODO 优化 /// public enum TeamPaintType { None = 0, Fort = 1, CaterpillarBelt = 2, Entirety = 3, Max = 4, } /// /// 角色添加数据 /// public struct CharAddData { public uint ID; public int Idx; } /// /// 载具添加数据 /// public struct VehicleAddData { public uint ID; public int Idx; } /// /// 载具接口 /// public interface IVehicleModelService { //获取载具游戏模型路径 string GetVehicleGameModelPath(int vehicleId); // 获取炮台模型路径 string GetBatteryModelPath(string modelPath); // 获取载具涂装路径 string GetVehiclePaintPath(int vehicleID, int paintID); // 获取载具涂装材质 UniTask GetVehiclePaintMaterial(string paintPath); // 查找载具部件根节点 GameObject FindVehiclePartRoot(GameObject vehicleModel, int vehicleId, TeamPaintType type); // 组合配置数据 object CombineConfigData(object vehicleData); // 检查载具数据字典是否包含指定ID bool VehicleDataDicContainsKey(uint id); // 获取载具数据 object GetVehicleData(uint id); // 获取载具发展数据 object GetVehicleDevelopment(uint id); } /// /// 角色接口 /// public interface ICharacterModelService { // 获取角色显示模型路径 string GetCharacterDisplayModelPath(string nameId); // 检查角色数据字典是否包含指定ID bool CharacterDataDicContainsKey(uint id); // 获取角色数据 object GetCharacterData(uint id); // 创建表情管理器 object CreateEmojiManager(GameObject go, string eyesColor, string eyeBrowsType, string eyeBrowsColor, bool isActive); // 切换表情 void SwitchEmoji(object emojiManager, int emojiId); // 释放表情管理器 void DisposeEmojiManager(object emojiManager); } /// /// 编队队伍接口 /// public interface ITeamService { // 获取团队信息 object GetTeamByIndex(int idx, bool isLegionBattle); // 获取队伍中的所有角色ID uint[] GetAllCharacters(object team); // 获取队伍中的所有载具ID uint[] GetVehicleIDs(object team); // 获取默认团队ID uint GetTeamNoneID(); // 获取载具Shader Shader GetVehicleShader(); } /// /// 配置表接口 /// public interface ITableService { // 获取皮肤配置 object GetSkinConfig(int skinID, int roleID); // 获取电池配置 object GetBatteryConfig(long weaponId); // 获取角色属性配置 bool TryGetCharacterAttriData(int id, out object data); } /// /// 相机接口 /// public interface ITeamEditCameraObj { Camera teamEditCamera { get; } void SetCameraAntialiasing(Camera camera); } public static class TeamServiceHandle { public static IVehicleModelService VehicleService { get; set; } public static ICharacterModelService CharacterService { get; set; } public static ITeamService TeamService { get; set; } public static ITableService TableService { get; set; } public static ITeamEditCameraObj TeamEditCameraObj { get; set; } } }