namespace GFGGame { public class ResPathUtil { public const string RESIN_TXT_DIR_PATH = "Assets/ResIn/Txt"; public const string FONT_DIR_PATH = "Assets/ResIn/Font"; public static readonly string UI_DIR_PATH = "Assets/ResIn/UI"; public static readonly string PREFAB_DIR_PATH = "Assets/ResIn/Prefab"; public static readonly string TEXTURE_FIGHT_DIR_PATH = "Assets/ResIn/Fight"; public static readonly string CONFIG_DIR_PATH = "Assets/Game/CSShare/Sqlite"; public const string RES_ROOT_DIR_PATH = "Assets/Res"; public static readonly string MUSIC_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Music"; public static readonly string SOUND_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Sound"; public static readonly string TEXTURE_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Texture"; public static readonly string ANIMATION_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Animation"; public static readonly string EFFECT_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Effect"; public static readonly string Material_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Material"; public static readonly string Shader_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Shader"; public static readonly string Model_DIR_PATH = $"{RES_ROOT_DIR_PATH}/model"; public static readonly string SQLITE_FILE_PATH = CONFIG_DIR_PATH + "/" + LauncherConfig.SQL_FILE_NAME; public static string GetUIPackagePath(string res) { return $"{UI_DIR_PATH}/{res}/{res}"; } public static string GetScorePath(int score) { return GetCommonGameResPath("kp_sx_" + score); } public static string GetCommonGameResPath(string res) { return "ui://CommonGame/" + res; } //===================================↑↑↑UI路径↑↑↑================================ public static string GetIconPath(string res, string extName) { return $"{TEXTURE_DIR_PATH}/Icon/{res}.{extName}"; } public static string GetIconPath(ItemCfg itemCfg) { return GetIconPath(itemCfg.res, ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true)); } public static string GetBgImgPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/BgImg/{res}.{extName}"; } public static string GetFightBgImgPath(string res, string extName = "png") { return $"{TEXTURE_FIGHT_DIR_PATH}/{res}.{extName}"; } public static string GetDressUpPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/DressUp/{res}.{extName}"; } public static string GetNpcPicSPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/Npc/PicS/{res}.{extName}"; } public static string GetNpcPicFPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/Npc/PicF/{res}.{extName}"; } public static string GetPhotographBorderPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/Photograph/border/{res}.{extName}"; } public static string GetFieldGuideIconPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/FieldGuide/Icon/{res}.{extName}"; } public static string GetNpcHeadPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/Npc/Head/{res}.{extName}"; } public static string GetCardPath(string res, string extName = "jpg") { return $"{TEXTURE_DIR_PATH}/Card/Bg/{res}.{extName}"; } public static string GetCardSmallPath(string res, string extName = "jpg") { return $"{TEXTURE_DIR_PATH}/Card/Card/{res}.{extName}"; } public static string GetCardSoundPath(string res, string extName = "mp3") { return $"{SOUND_DIR_PATH}/Card/{res}.{extName}"; } public static string GetMusicPath(string res, string extName = "mp3") { return $"{MUSIC_DIR_PATH}/{res}.{extName}"; } public static string GetTxtPath(string res, string extName = "txt") { return $"{RESIN_TXT_DIR_PATH}/{res}.{extName}"; } public static string GetFontPath(string res, string extName = "TTF") { return $"{FONT_DIR_PATH}/{res}.{extName}"; } public static string GetPrefabPath(string res, string extName = "prefab") { return $"{PREFAB_DIR_PATH}/{res}.{extName}"; } public static string GetDressUpAnimationPath(string res, string extName = "prefab") { return $"{ANIMATION_DIR_PATH}/DressUp/{res}/{res}.{extName}"; } public static bool CheckDressUpAnimationExist(string res, string extName = "prefab") { if(string.IsNullOrEmpty(res)) { return false; } string resPath = ResPathUtil.GetDressUpAnimationPath(res, extName); return VEngine.Versions.Contains(resPath); } public static string GetDressUpEffectPath(string res, bool inAni = false, string extName = "prefab") { if(inAni) { return $"{EFFECT_DIR_PATH}/DressUpAni/{res}/{res}.{extName}"; } return $"{EFFECT_DIR_PATH}/DressUp/{res}/{res}.{extName}"; } public static string GetViewEffectPath(string uiName, string resName, string extName = "prefab") { return $"{EFFECT_DIR_PATH}/UI/{uiName}/{resName}.{extName}"; } public static string GetCardAnimationPath(string res, string extName = "prefab") { return $"{ANIMATION_DIR_PATH}/Card/{res}/{res}.{extName}"; } public static string GetActivityPath(string res, string extName = "jpg") { return $"{TEXTURE_DIR_PATH}/Activity/Activity/{res}.{extName}"; } public static string GetActivityShow1Path(string res, string extName = "jpg") { return $"{TEXTURE_DIR_PATH}/Activity/Show1/{res}.{extName}"; } public static string GetActivityShow2Path(string res, string extName = "jpg") { return $"{TEXTURE_DIR_PATH}/Activity/Show1/{res}.{extName}"; } public static string GetTravelBgPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/Travel/Bg/{res}.{extName}"; } public static string GetTravelRolePath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/Travel/Role/{res}.{extName}"; } public static string GetHeadPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/Head/Head/{res}.{extName}"; } public static string GetHeadBorderPath(string res, string extName = "png") { if (string.IsNullOrEmpty(res)) return ""; return $"{TEXTURE_DIR_PATH}/Head/HeadBorder/{res}.{extName}"; } public static string GetShaderPath(string res) { return $"{Shader_DIR_PATH}/{res}.shader"; } public static string GetLeagueIconPath(string res, string extName = "png") { return $"{TEXTURE_DIR_PATH}/LeagueIcon/{res}.{extName}"; } } }