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

feat: 喇叭消失 显示

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