Commit 2a145010 authored by 范雪寒's avatar 范雪寒

feat: 第一次播放音效,第二次播放语音

parent 256a8bcf
...@@ -430,16 +430,19 @@ export class MyGame extends Game { ...@@ -430,16 +430,19 @@ export class MyGame extends Game {
label.visible = true; label.visible = true;
tweenChange(label, { alpha: 1 }, 0.2); tweenChange(label, { alpha: 1 }, 0.2);
} }
if (wordMiddle.alpha == 1) {
this.playAudio('click_line');
} else {
this.playAudio(popUpData.groupAudios[letterData.group].audio);
}
groupShowedList[letterData.group] = true; groupShowedList[letterData.group] = true;
if (groupShowedList.every(show => show == true)) { if (groupShowedList.every(show => show == true)) {
const changeBtn = this.seekChildByName('changeBtn'); const changeBtn = this.seekChildByName('changeBtn');
changeBtn.visible = true; changeBtn.visible = true;
tweenChange(changeBtn, { alpha: 1 }, 0.2); tweenChange(changeBtn, { alpha: 1 }, 0.2);
} }
this.playAudio('click_line', true, () => {
this.playAudio(popUpData.groupAudios[letterData.group].audio);
});
}); });
wordBase.addChild(wordMiddle); wordBase.addChild(wordMiddle);
......
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