Commit 4105c92c authored by Chen Jiping's avatar Chen Jiping

feat:调整音频播放逻辑

parent 2fb2c068
...@@ -475,10 +475,17 @@ cc.Class({ ...@@ -475,10 +475,17 @@ cc.Class({
//设置不可点击 //设置不可点击
this._cantouch = false; this._cantouch = false;
playAudio(this.audioBtn.clip, () => {
let audioUrl = word.lrcData.audio_url; let audioUrl = word.lrcData.audio_url;
if(isInitial){
this.playTextAutio(labelNode, audioUrl, () => {
this._cantouch = true;
})
}
else{
playAudio(this.audioBtn.clip, () => {
//显示完,则播放音频 //显示完,则播放音频
if (this._shown) { if (this._shown) {
this.playTextAutio(labelNode, audioUrl, () => { this.playTextAutio(labelNode, audioUrl, () => {
...@@ -490,7 +497,7 @@ cc.Class({ ...@@ -490,7 +497,7 @@ cc.Class({
} }
}) })
}
}) })
return labelNode; return labelNode;
......
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