| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 | using YooAsset;namespace GFGGame{    public class ResPathUtil    {        public const string FONT_DIR_PATH = "Assets/ResIn/Font";        public static readonly string UI_DIR_PATH = "Assets/ResIn/UI";        public static readonly string UUI_DIR_PATH = "Assets/ResIn/UUI";        public static readonly string PREFAB_DIR_PATH = "Assets/ResIn/Prefab";        public static readonly string LoginRes_DIR_PATH = "Assets/ResIn/LoginRes";        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 Voice_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Voice";        public static readonly string VIDEO_DIR_PATH = $"{RES_ROOT_DIR_PATH}/video";        public static readonly string TEXTURE_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Texture";        public static readonly string TEXTURE_DRESSUP_DIR_PATH = $"{TEXTURE_DIR_PATH}/DressUp";        public static readonly string TEXTURE_SCENEBG_DIR_PATH = $"{TEXTURE_DIR_PATH}/SceneBg";        public static readonly string TEXTURE_BGIMG_DIR_PATH = $"{TEXTURE_DIR_PATH}/BgImg";        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 STUDIO_FILING_DIR_PATH = $"{RES_ROOT_DIR_PATH}/Texture/Studios/CYJD/";        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 GetUUIPrefabPath(string res)        {            return $"{UUI_DIR_PATH}/{res}.prefab";        }        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)        {            if (res.IndexOf("kp_") == 0)            {                return GetCardIconPath(res);            }            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_BGIMG_DIR_PATH}/{res}.{extName}";        }        public static string GetFightBgImgPath(string res, string extName = "png")        {            return $"{TEXTURE_FIGHT_DIR_PATH}/{res}.{extName}";        }        public static string GetSceneBgPath(string res, string extName = "jpg")        {            return $"{TEXTURE_SCENEBG_DIR_PATH}/{res}.{extName}";        }        public static string GetDressUpLayerSpriteResPath(ItemCfg itemCfg, int layerId){            string res = GetDressUpLayerResName(itemCfg, layerId);            if(itemCfg.subType == ConstDressUpItemType.BEI_JING)            {                return GetSceneBgPath(res);            }            return GetDressUpPath(res);        }        public static string GetDressUpPath(string res, string extName = "png")        {            return $"{TEXTURE_DRESSUP_DIR_PATH}/{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/SuitIcon/{res}.{extName}";        }        public static string GetChapterGuideIconPath(string res, string extName = "png")        {            return $"{TEXTURE_DIR_PATH}/FieldGuide/ChapterIcon/{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 GetCardIconPath(string res, string extName = "jpg")        {            return $"{TEXTURE_DIR_PATH}/Card/Card/{res}.{extName}";        }        public static string GetCardSkillPath(string res, string extName = "png")        {            return $"{TEXTURE_DIR_PATH}/Card/Skill/{res}.{extName}";        }        public static string GetCardSoundPath(string res, string extName = "mp3")        {            return $"{SOUND_DIR_PATH}/Card/{res}.{extName}";        }        public static string GetVoicePath(string res, string extName = "wav")        {            return $"{Voice_DIR_PATH}/{res}.{extName}";        }        public static string GetVideoPath(string res, string extName = "mp4")        {            return $"{VIDEO_DIR_PATH}/{res}.{extName}";        }        public static string GetMusicPath(string res, string extName = "mp3")        {            return $"{MUSIC_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 GetLoginResPath(string res, string extName = "prefab")        {            return $"{LoginRes_DIR_PATH}/{res}.{extName}";        }        public static string GetDressUpAnimationDirPath(string res)        {            return $"{ANIMATION_DIR_PATH}/DressUp/{res}";        }        public static string GetDressUpLayerAnimationResPath(ItemCfg itemCfg, int layerId)        {            string res = GetDressUpLayerResName(itemCfg, layerId);            return GetDressUpAnimationPath(res);        }        public static string GetDressUpAnimationPath(string res, string extName = "prefab")        {            return $"{GetDressUpAnimationDirPath(res)}/{res}.{extName}";        }        public static bool CheckDressUpAnimationResExist(string res, string extName = "prefab")        {            if (string.IsNullOrEmpty(res))            {                return false;            }            string resPath = ResPathUtil.GetDressUpAnimationPath(res, extName);            return YooAssets.CheckResExist(resPath);        }        public static string GetDressUpLayerEffectResPath(ItemCfg itemCfg, int layerId)        {            string res = GetDressUpLayerResName(itemCfg, layerId);            return GetDressUpEffectPath(res);        }        public static string GetDressUpEffectDirPath(string res)        {            return $"{EFFECT_DIR_PATH}/DressUp/{res}";        }        public static string GetDressUpEffectPath(string res, bool inAniDir = false, string extName = "prefab")        {            if (inAniDir)            {                return $"{GetDressUpEffectDirPath(res)}/{res}_2.{extName}";            }            return $"{GetDressUpEffectDirPath(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}";        }        public static string GetDressUpLayerResName(ItemCfg itemCfg, int layerId)        {            string res = itemCfg.res;            switch (layerId)            {                case 1:                    res = itemCfg.resLayer1 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer1);                    break;                case 2:                    res = itemCfg.resLayer2 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer2);                    break;                case 3:                    res = itemCfg.resLayer3 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer3);                    break;            }            return res;        }        public static string GetStudioChapterPicPath(string res, string extName = "png")        {            return $"{STUDIO_FILING_DIR_PATH}{"dangan_"}{res}.{extName}";        }        public static string GetStudioFilingPicPath(string res, string extName = "png")        {            return $"{STUDIO_FILING_DIR_PATH}{res}.{extName}";        }        public static string GetStoryDialogCGPath(string dir, string res, string extName = "prefab")        {            return $"{ANIMATION_DIR_PATH}/{dir}/{res}.{extName}";        }    }}
 |