Commit 96354cdc authored by Friends233's avatar Friends233

修改音效

parent 69ef8070
...@@ -215,7 +215,6 @@ export default class BlockManager extends cc.Component { ...@@ -215,7 +215,6 @@ export default class BlockManager extends cc.Component {
if (els.length === 0) return if (els.length === 0) return
const { script } = els.pop() const { script } = els.pop()
script.playClearAni(() => { script.playClearAni(() => {
cc.audioEngine.play(this.clearAudio,false,1)
cc.find('Canvas').dispatchEvent(this.addScoreEvent) cc.find('Canvas').dispatchEvent(this.addScoreEvent)
if (els.length == 0) { if (els.length == 0) {
cc.find('Canvas').dispatchEvent(this.checkIsSet) cc.find('Canvas').dispatchEvent(this.checkIsSet)
...@@ -224,9 +223,13 @@ export default class BlockManager extends cc.Component { ...@@ -224,9 +223,13 @@ export default class BlockManager extends cc.Component {
await waitTime(Config.blockAniDelay) await waitTime(Config.blockAniDelay)
recursionPlay(els) recursionPlay(els)
} }
if(eliminateBlocks.length >0){
cc.audioEngine.play(this.clearAudio,false,1)
}
eliminateBlocks.forEach((els) => { eliminateBlocks.forEach((els) => {
recursionPlay(els) recursionPlay(els)
}) })
} }
/** 检查矩阵能否放入 */ /** 检查矩阵能否放入 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment