Commit 9e3d9230 authored by liujiangnan's avatar liujiangnan

fix: 播放音频重复问题

parent 841960e2
...@@ -162,8 +162,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -162,8 +162,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.tip_right.active = pages.length > 0 && index < pages.length - 1; this.tip_right.active = pages.length > 0 && index < pages.length - 1;
cc.find("s_group/startbg/btn_close", this.startNode).active = index === pages.length - 1; cc.find("s_group/startbg/btn_close", this.startNode).active = index === pages.length - 1;
let page = pages[index]; let page = pages[index];
if (page) if (page) {
cc.audioEngine.stopAll();
playAudioByUrl(page["data"].audio); playAudioByUrl(page["data"].audio);
}
} }
initListener() { initListener() {
......
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