|
|
@@ -5,7 +5,6 @@ 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";
|
|
|
@@ -42,6 +41,7 @@ namespace GFGGame
|
|
|
{
|
|
|
return $"{UI_DIR_PATH}/{res}/{res}";
|
|
|
}
|
|
|
+
|
|
|
public static string GetUUIPrefabPath(string res)
|
|
|
{
|
|
|
return $"{UUI_DIR_PATH}/{res}.prefab";
|
|
|
@@ -51,10 +51,12 @@ namespace GFGGame
|
|
|
{
|
|
|
return GetCommonGameResPath("kp_sx_" + score);
|
|
|
}
|
|
|
+
|
|
|
public static string GetCommonGameResPath(string res)
|
|
|
{
|
|
|
return "ui://CommonGame/" + res;
|
|
|
}
|
|
|
+
|
|
|
//===================================↑↑↑UI路径↑↑↑================================
|
|
|
public static string GetIconPath(string res, string extName)
|
|
|
{
|
|
|
@@ -62,57 +64,71 @@ namespace GFGGame
|
|
|
{
|
|
|
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)
|
|
|
+ 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 GetNpcPicFacePath(string res, string extName = "png")
|
|
|
{
|
|
|
return $"{TEXTURE_DIR_PATH}/Npc/Face/{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}";
|
|
|
@@ -122,38 +138,67 @@ namespace GFGGame
|
|
|
{
|
|
|
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")
|
|
|
+
|
|
|
+ public static string GetFontPath1(string res, string extName = "TTF")
|
|
|
+ {
|
|
|
+ return $"{FONT_DIR_PATH}/1/{res}.{extName}";
|
|
|
+ }
|
|
|
+
|
|
|
+ public static string GetFontPath2(string res, string extName = "TTF")
|
|
|
+ {
|
|
|
+ return $"{FONT_DIR_PATH}/2/{res}.{extName}";
|
|
|
+ }
|
|
|
+
|
|
|
+ public static string GetFontPath3(string res, string extName = "TTF")
|
|
|
{
|
|
|
- return $"{FONT_DIR_PATH}/{res}.{extName}";
|
|
|
+ return $"{FONT_DIR_PATH}/3/{res}.{extName}";
|
|
|
}
|
|
|
+
|
|
|
+ public static string GetFontPath4(string res, string extName = "TTF")
|
|
|
+ {
|
|
|
+ return $"{FONT_DIR_PATH}/4/{res}.{extName}";
|
|
|
+ }
|
|
|
+
|
|
|
+ public static string GetFontPath5(string res, string extName = "TTF")
|
|
|
+ {
|
|
|
+ return $"{FONT_DIR_PATH}/5/{res}.{extName}";
|
|
|
+ }
|
|
|
+
|
|
|
public static string GetPrefabPath(string res, string extName = "prefab")
|
|
|
{
|
|
|
return $"{PREFAB_DIR_PATH}/{res}.{extName}";
|
|
|
@@ -168,6 +213,7 @@ namespace GFGGame
|
|
|
{
|
|
|
return $"{LoginRes_DIR_PATH}/{res}.{extName}";
|
|
|
}
|
|
|
+
|
|
|
public static string GetDressUpAnimationDirPath(string res)
|
|
|
{
|
|
|
return $"{ANIMATION_DIR_PATH}/DressUp/{res}";
|
|
|
@@ -178,6 +224,7 @@ namespace GFGGame
|
|
|
string res = GetDressUpLayerResName(itemCfg, layerId);
|
|
|
return GetDressUpAnimationPath(res);
|
|
|
}
|
|
|
+
|
|
|
public static string GetDressUpAnimationPath(string res, string extName = "prefab")
|
|
|
{
|
|
|
return $"{GetDressUpAnimationDirPath(res)}/{res}.{extName}";
|
|
|
@@ -189,20 +236,23 @@ namespace GFGGame
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
string resPath = ResPathUtil.GetDressUpAnimationPath(res, extName);
|
|
|
return YooAssets.CheckResExist(resPath);
|
|
|
}
|
|
|
|
|
|
public static string GetDressUpLayerEffectResPath(ItemCfg itemCfg, int layerId, bool inAniDir)
|
|
|
{
|
|
|
- if(DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(itemCfg.Id))
|
|
|
+ if (DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(itemCfg.Id))
|
|
|
{
|
|
|
//场景类型的物品特效都不分动画和静态
|
|
|
inAniDir = false;
|
|
|
}
|
|
|
+
|
|
|
string res = GetDressUpLayerResName(itemCfg, layerId);
|
|
|
return GetDressUpEffectPath(res, inAniDir);
|
|
|
}
|
|
|
+
|
|
|
public static string GetDressUpEffectDirPath(string res)
|
|
|
{
|
|
|
return $"{EFFECT_DIR_PATH}/DressUp/{res}";
|
|
|
@@ -214,45 +264,56 @@ namespace GFGGame
|
|
|
{
|
|
|
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 = "png")
|
|
|
{
|
|
|
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";
|
|
|
@@ -278,6 +339,7 @@ namespace GFGGame
|
|
|
res = itemCfg.ResLayer3 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.ResLayer3);
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@@ -290,7 +352,7 @@ namespace GFGGame
|
|
|
{
|
|
|
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}";
|
|
|
@@ -310,7 +372,7 @@ namespace GFGGame
|
|
|
{
|
|
|
return $"{LUCKY_BOX_TITLE_PATH}{res}.{extName}";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public static string GetEmojiResPath(string dir, string res, string extName = "prefab")
|
|
|
{
|
|
|
return $"{ANIMATION_DIR_PATH}/{dir}/{res}.{extName}";
|