Commit 9e6542b6 authored by Li Mingzhe's avatar Li Mingzhe

feat: 喇叭消失 显示

parent 7e8eb8a3
......@@ -735,10 +735,13 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
if (this.checkClickTarget(this.speakerIcon)) {
this.clickedSpeaker();
return;
if (this.speakerIcon.active) {
if (this.checkClickTarget(this.speakerIcon)) {
this.clickedSpeaker();
return;
}
}
this.clickWrong();
}
......@@ -882,6 +885,17 @@ export class PlayComponent implements OnInit, OnDestroy {
this.shadowArr.push(shadow);
}
refreshSpeakerActive() {
const data = this.picArr[this.curPageIndex];
if (data.audio_url) {
this.speakerIcon.active = true;
this.speakerIcon.visible = true;
} else {
this.speakerIcon.active = false;
this.speakerIcon.visible = false;
}
}
checkGameEnd() {
......@@ -897,7 +911,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this.refreshPageLabel();
if (this.curPageIndex >= this.picArr.length) {
this.gameEnd();
return;
......@@ -918,6 +931,9 @@ export class PlayComponent implements OnInit, OnDestroy {
this.refreshTitleLabel(true);
this.refreshAnswerNum();
this.refreshSpeakerActive();
this.canTouch = true;
}, 2500);
......
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