Commit 279f0a69 authored by yu's avatar yu

1

parent fbefa595
......@@ -197,6 +197,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.cleanLaba();
this.resetText();
this.resetRecord();
this.stopQuestionAudio();
// cc.audioEngine.stopAll();
// play.active = false;
// stop.active = true;
......@@ -211,6 +212,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.cleanLaba();
this.resetText();
this.resetRecord();
this.stopQuestionAudio();
// cc.audioEngine.stopAll();
// play.active = false;
// stop.active = true;
......@@ -233,6 +235,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private onMyRecordPlay(item) {
this.cleanLaba();
// cc.audioEngine.stopAll();
this.stopQuestionAudio();
item.getComponent(Item).stopRecord();
item.getComponent(Item).stopAction();
}
......@@ -242,6 +245,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.resetText();
this.resetRecord();
// cc.audioEngine.stopAll();
this.stopQuestionAudio();
item.getComponent(Item).playRecord();
item.getComponent(Item).playAction();
//
......@@ -293,6 +297,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
return idx;
}
private stopQuestionAudio() {
if (this.questionAudioId > -1) pg.audio.stopAudio(this.questionAudioId);
}
private intervalId;
private questionAudioId = -1;
private playLaba() {
......@@ -503,7 +511,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.refreshArrow();
this.arrowAction();
if (this.data.bgAudio || this.data.bgAudio != "") {
if (this.data.bgAudio && this.data.bgAudio != "") {
this.btn_audio_on.active = true;
}
}
......
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