Browse Source

战斗音乐

guodong 3 years ago
parent
commit
8e7ca75e02

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

@@ -5,6 +5,7 @@ using System.IO;
 using UnityEditor;
 using UnityEditor.Compilation;
 using UnityEngine;
+using VEngine.Editor.Builds;
 
 namespace GFGEditor
 {
@@ -233,5 +234,25 @@ namespace GFGEditor
             CommitWhenRelease = true;
         }
 
+        [MenuItem("Tools/BuildTest/发布临时版本", false, (int)TOOL_MENU_PRIORITY.BuildBundlesRes)]
+        public static void BuildBundlesResTemp()
+        {
+            VEngine.Utility.buildPath = "Bundles_temp";
+            ImportArtResTool.ResRootDirNameDressUp = "正式资源-demo1";
+            EditorUtility.DisplayProgressBar("进度", "正在发布临时版本", 1);
+            VEngine.Editor.Builds.BuildScript.BuildCustomBundles(new string[] { "Res", "ResIn" });
+            EditorUtility.ClearProgressBar();
+            VEngine.Utility.buildPath = "Bundles";
+            ImportArtResTool.ResRootDirNameDressUp = "正式资源";
+        }
+
+        [MenuItem("XAssets/Versions/Copy To StreamingAssets Temp")]
+        public static void CopyToStreamingAssets()
+        {
+            VEngine.Utility.buildPath = "Bundles_temp";
+            BuildScript.CopyToStreamingAssets();
+            VEngine.Utility.buildPath = "Bundles";
+        }
+
     }
 }

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -108,6 +108,10 @@ namespace GFGGame
             _levelID = (string)viewData;
             _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
             _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
+            if(!string.IsNullOrEmpty(_fightCfg.music))
+            {
+                MusicManager.Instance.Play(ResPathUtil.GetMusicPath(_fightCfg.music, "mp3"));
+            }
             _ui.m_compNeed.target.visible = _fightCfg.needItemId > 0 || _fightCfg.needSuitId > 0 || _fightCfg.needTagsArr.Length > 0;
             if (_ui.m_compNeed.target.visible)
             {

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs

@@ -59,6 +59,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
             _chapterID = (int)viewData;
             StoryDataManager.currentChapter = _chapterID;
             _compChapter = (GComponent)UIPackage.CreateObject("Main", "CompChapter" + _chapterID);

+ 1 - 1
GameClient/Assets/MD5/MusicMd5

@@ -1 +1 @@
-)../../../gfg/正式资源/music/fight.mp3 488360779cc496ac14788cf3735a22f9+../../../gfg/正式资源/music/zhuxian.mp3 f29da32eeb48f1b5238c0c5785004fe0
+)../../../gfg/正式资源/music/fight.mp3 56b058e235c4fba98836db41659f2419+../../../gfg/正式资源/music/zhuxian.mp3 df04daf64ee200e01eaec8499989b9ab)../../../gfg/正式资源/music/music.mp3 2d16fe3156881a8cab72a210b43c20f4

+ 1 - 1
GameClient/ProjectSettings/ProjectSettings.asset

@@ -699,7 +699,7 @@ PlayerSettings:
   webGLThreadsSupport: 0
   webGLDecompressionFallback: 0
   scriptingDefineSymbols:
-    7: ILRuntime1;PT_DEV111
+    7: ILRuntime1;PT_DEV111;PT_TEMP111
   additionalCompilerArguments: {}
   platformArchitecture: {}
   scriptingBackend: