主界面点击音效

This commit is contained in:
chenxi 2023-06-01 20:34:41 +08:00
parent 2adecefa79
commit 58e5bbc33d

View File

@ -24,7 +24,13 @@ function BottomBtnCell:refresh(desc, selected, showAni)
end
function BottomBtnCell:addClickListener(func)
self:getBaseObject():addClickListener(func, GConst.CLICK_SOUND.NORMAL)
self:getBaseObject():addClickListener(function()
local audioPath = AudioManager.CLICK_ID[GConst.CLICK_SOUND.NORMAL]
if audioPath then
AudioManager:playEffect(audioPath)
end
func()
end, GConst.CLICK_SOUND.NONE)
end
function BottomBtnCell:getCurLocalPosX()