Răsfoiți Sursa

摘星标题字

huangxiaoyue 1 an în urmă
părinte
comite
4d0fee9bfe

+ 8 - 0
GameClient/Assets/Editor/ArtsRes/ImportArtResTool.cs

@@ -167,6 +167,10 @@ namespace GFGEditor
         public static string MiniGameMergeTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/MiniGame/MergeGame/";
         public static string MiniGameMergeMd5FileSaveName = "MiniGameMergeMd5";
 
+        public static string[] LuckyBoxTitleImgPaths { get { return new string[] { ResRootPath + "UI/LuckyBoxTitleImg/" }; } }
+        public static string LuckyBoxTitleImgTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/LuckyBoxTitleImg/";
+        public static string LuckyBoxTitleImgMd5FileSaveName = "LuckyBoxTitleImgMd5";
+
         public static void Test()
         {
             ImportClip(NpcFaceSrcPaths, NpcFaceTargetPath, NpcFacepMd5FileSaveName);
@@ -304,6 +308,10 @@ namespace GFGEditor
             EditorUtility.DisplayProgressBar("进度", "正在导入小游戏资源", 1);
             ImportRes(MiniGameMergePaths, MiniGameMergeTargetPath, MiniGameMergeMd5FileSaveName);
 
+            //摘星标题资源
+            EditorUtility.DisplayProgressBar("进度", "正在导入摘星标题资源", 1);
+            ImportRes(LuckyBoxTitleImgPaths, LuckyBoxTitleImgTargetPath, LuckyBoxTitleImgMd5FileSaveName);
+
             EditorUtility.ClearProgressBar();
             AssetDatabase.Refresh();
             Debug.LogWarning("导入美术资源成功!");

+ 3 - 0
GameClient/Assets/Editor/ToolsMenu.cs

@@ -296,6 +296,9 @@ namespace GFGEditor
 
             FileUtil.DeleteUnnecessaryImage(ImportArtResTool.TextureTargetPath, new string[] { ImportArtResTool.EffectTextureMd5FileSaveName });
 
+            FileUtil.DeleteUnnecessaryImage(ImportArtResTool.LuckyBoxTitleImgTargetPath, new string[] { ImportArtResTool.LuckyBoxTitleImgMd5FileSaveName });
+
+            
             DeleteFileHelper.TrySvnRemoveDeleteFile();
             EditorUtility.ClearProgressBar();
         }

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Utils/ResPathUtil.cs

@@ -33,6 +33,7 @@ namespace GFGGame
         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 MINIGAME_DIR_PATH = $"{TEXTURE_DIR_PATH}/MiniGame/";
+        public static readonly string LUCKY_BOX_TITLE_PATH = $"{TEXTURE_DIR_PATH}/LuckyBoxTitle/";
 
         public static readonly string SQLITE_FILE_PATH = CONFIG_DIR_PATH + "/" + LauncherConfig.SQL_FILE_NAME;
 
@@ -303,5 +304,10 @@ namespace GFGGame
         {
             return $"{MINIGAME_DIR_PATH}HRDGame/{res}.{extName}";
         }
+
+        public static string GetLuckyBoxTitlePath(string res, string extName = "png")
+        {
+            return $"{LUCKY_BOX_TITLE_PATH}/{res}.{extName}";
+        }
     }
 }

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -94,7 +94,8 @@ namespace GFGGame
             {
                 //comRes.m_loaRes.url = string.Format("ui://LuckyBox/{0}", _luckyBoxCfg.resArr[_modelIndex]);
                 comRes.m_loaRes.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[_modelIndex]);
-                comRes.m_loaTitle.url = "ui://LuckyBox/" + _luckyBoxCfg.resArr[_modelIndex];
+                comRes.m_loaTitle.url = ResPathUtil.GetLuckyBoxTitlePath(_luckyBoxCfg.resArr[_modelIndex]);
+                // "ui://LuckyBox/" + _luckyBoxCfg.resArr[_modelIndex];
                 comRes.m_loaRes.SetPosition(-110, -170, 1);
                 int direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
                 float scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000f : 1;