diff --git a/Assets/Editor/AutoPack.cs b/Assets/Editor/AutoPack.cs index 8f05f25df9..c0b4edb958 100644 --- a/Assets/Editor/AutoPack.cs +++ b/Assets/Editor/AutoPack.cs @@ -34,6 +34,7 @@ public class AutoPack : EditorWindow static string ABPath; static string APKPath; static string PackTime; + static bool CommitToGit; // 判断是否要重新导出工程 static string[] ExportTypeList = @@ -132,6 +133,7 @@ public class AutoPack : EditorWindow ExportType = EditorGUILayout.Popup("请选择出包方式", ExportType, ExportTypeList); EditorGUILayout.Space(); + CommitToGit = EditorGUILayout.ToggleLeft("是否要提交到Git", CommitToGit); EditorGUILayout.Space(); @@ -381,10 +383,13 @@ public class AutoPack : EditorWindow } private static void GitCommit(int index) { - EditorUtility.DisplayProgressBar("正在提交修改", "", 0f); - ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt"); - ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit 'AutoPack:"+ PackConfig[index][0]+" "+PackTime+"/"+ PackConfig[index][2] +".apk'"); - EditorUtility.ClearProgressBar(); + if (CommitToGit) + { + EditorUtility.DisplayProgressBar("正在提交修改", "", 0f); + ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt"); + ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit -m 'AutoPack:" + PackConfig[index][0] + " " + PackTime + "/" + PackConfig[index][2] + ".apk'"); + EditorUtility.ClearProgressBar(); + } } diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index 14aa100aab..f4bc8ee4b4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -28,6 +28,10 @@ local func=nil this.time = Timer.New() this.time2 = Timer.New() this.time3 = Timer.New() +local Sound_Recruit2 +local Sound_Recruit3 +local Sound_Recruit4 + --初始化组件(用于子类重写) function SingleRecruitPanel:InitComponent() this.spLoader = SpriteLoader.New() @@ -150,6 +154,7 @@ function SingleRecruitPanel:BindEvent() UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType) end this.jumpBtnGo:SetActive(false) + this.StopPanelSound() end) --确定按钮 Util.AddClick(self.goBtn,function() @@ -200,7 +205,7 @@ end --界面打开时调用(用于子类重写) function SingleRecruitPanel:OnOpen(...) this.UI_Effect_open:SetActive(true) - SoundManager.PlaySound(SoundConfig.Sound_Recruit4) + Sound_Recruit4 = SoundManager.PlaySound(SoundConfig.Sound_Recruit4) this.UI_Effect_choukaSSR:SetActive(false) this.UI_Effect_choukaSR:SetActive(false) this.UI_Effect_choukaR:SetActive(false) @@ -290,7 +295,7 @@ function SingleRecruitPanel:TenOpenPanel() this.UI_Effect_choukaSR:SetActive(false) this.UI_Effect_choukaR:SetActive(false) this.UI_Effect_appear:SetActive(true) - SoundManager.PlaySound(SoundConfig.Sound_Recruit2) + Sound_Recruit2 = SoundManager.PlaySound(SoundConfig.Sound_Recruit2) end, timeNum) this.time:Start() this.time3 = Timer.New(function () @@ -326,7 +331,7 @@ function SingleRecruitPanel:UpdataPanelData(_heroData) Game.GlobalEvent:DispatchEvent(GameEvent.UI.OnUpdateData, self.uiConfig.id) this.jumpBtnGo:SetActive(false) this.UI_Effect_appear:SetActive(false) - SoundManager.PlaySound(SoundConfig.Sound_Recruit3) + Sound_Recruit3 = SoundManager.PlaySound(SoundConfig.Sound_Recruit3) if heroStaticData and testLiveGO then poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO) @@ -446,8 +451,22 @@ function SingleRecruitPanel:OnClose() poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO) end heroStaticData, testLiveGO = nil, nil + this.StopPanelSound() +end +function this.StopPanelSound() + if Sound_Recruit2 then + SoundManager.StopSound(Sound_Recruit2) + Sound_Recruit2 = nil + end + if Sound_Recruit3 then + SoundManager.StopSound(Sound_Recruit3) + Sound_Recruit3 = nil + end + if Sound_Recruit4 then + SoundManager.StopSound(Sound_Recruit4) + Sound_Recruit4 = nil + end end - function SingleRecruitPanel:GetProStr(index) local proStr="" if index==1 then