From 678a8fbd4c360ecad6be7a8bed0a8618cc77be5f Mon Sep 17 00:00:00 2001 From: Fang Date: Tue, 1 Aug 2023 11:10:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9F=B3=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/audio_manager.lua | 4 ++++ lua/app/module/common/common_manager.lua | 1 + lua/app/ui/collection/cell/collection_hero_cell.lua | 1 + lua/app/ui/hero/armor_info_comp.lua | 1 + lua/app/ui/hero/weapon_info_comp.lua | 4 ++++ 5 files changed, 11 insertions(+) diff --git a/lua/app/common/audio_manager.lua b/lua/app/common/audio_manager.lua index c3945c3e..11d78b31 100644 --- a/lua/app/common/audio_manager.lua +++ b/lua/app/common/audio_manager.lua @@ -37,6 +37,10 @@ AudioManager.EFFECT_ID = { LINK_CANCEL = "assets/arts/sounds/sfx/battle/link_cancel.wav", FUNC_OPEN = "assets/arts/sounds/sfx/ui/func_open.wav", BATTLE_BOX_OPEN = "assets/arts/sounds/sfx/ui/ui_battle_open_box.wav", + EQUIP_WEAPON_UP = "assets/arts/sounds/sfx/ui/equip_up.wav", + EQUIP_ARMOR_UP = "assets/arts/sounds/sfx/ui/armor_up.wav", + DUNGEON_SMASH = "assets/arts/sounds/sfx/ui/smash.wav", + STAR_GET = "assets/arts/sounds/sfx/ui/star_get.wav", } AudioManager.BO_EFFECT_ID = { diff --git a/lua/app/module/common/common_manager.lua b/lua/app/module/common/common_manager.lua index 81a19d06..674bcbb9 100644 --- a/lua/app/module/common/common_manager.lua +++ b/lua/app/module/common/common_manager.lua @@ -10,6 +10,7 @@ function CommonManager:showMopUpUI(rewards, remainCount, callback, customtitleTx ---- 有目标的扫荡 可为nil target = target, } + AudioManager:playEffect(AudioManager.EFFECT_ID.DUNGEON_SMASH) UIManager:showUI("app/ui/common/mop_up_ui", params) end diff --git a/lua/app/ui/collection/cell/collection_hero_cell.lua b/lua/app/ui/collection/cell/collection_hero_cell.lua index 77654a3f..b4c2871b 100644 --- a/lua/app/ui/collection/cell/collection_hero_cell.lua +++ b/lua/app/ui/collection/cell/collection_hero_cell.lua @@ -14,6 +14,7 @@ function CollectionHeroCell:init() self.btnCollect:addClickListener(function() if DataManager.CollectionData:getCanCollectPoint(GConst.CollectionConst.TYPE.HERO, self.heroData.id) > 0 then + AudioManager:playEffect(AudioManager.EFFECT_ID.STAR_GET) ModuleManager.CollectionManager:reqHeroPoint(self.heroData.id) EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.COLLECTION_CLICK_GET_POINT, self.imgIcon:getPosition()) else diff --git a/lua/app/ui/hero/armor_info_comp.lua b/lua/app/ui/hero/armor_info_comp.lua index 18d46be3..66a02b14 100644 --- a/lua/app/ui/hero/armor_info_comp.lua +++ b/lua/app/ui/hero/armor_info_comp.lua @@ -272,6 +272,7 @@ end -- 播放升级动效 function ArmorInfoComp:playUpgradeEffect(part) + AudioManager:playEffect(AudioManager.EFFECT_ID.EQUIP_ARMOR_UP) self:playPartUpgradeEffect(part) self.rootCurEffect:removeAllChildren() local stage = DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), part):getStage() + 1 diff --git a/lua/app/ui/hero/weapon_info_comp.lua b/lua/app/ui/hero/weapon_info_comp.lua index da352930..a4840a3e 100644 --- a/lua/app/ui/hero/weapon_info_comp.lua +++ b/lua/app/ui/hero/weapon_info_comp.lua @@ -179,6 +179,10 @@ end -- 播放动效 function WeaponInfoComp:playEffect(isUpgrade, isUpSection) self.rootEffect:removeAllChildren() + + if isUpgrade or isUpSection then + AudioManager:playEffect(AudioManager.EFFECT_ID.EQUIP_WEAPON_UP) + end -- 升级 if isUpgrade then EffectManager:loadUIEffectAsync(EFFECT_UP_GRADE, self.uiRoot, self.rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)