Commit 3f084fb1 authored by Chen Jiping's avatar Chen Jiping

fix:修复结束后,再点击猫咪不播放音频问题

parent 8ad5ad63
......@@ -337,6 +337,9 @@ cc.Class({
catBtn.addComponent(cc.Button);
catBtn.on('click', () => {
console.log(this._canClickCat, this._showStandby);
if(!this._cantouch){
return;
}
......@@ -353,6 +356,9 @@ cc.Class({
const clickCat = (audioUrl, aniName) =>{
console.log(audioUrl, aniName);
//播放待机音频
if(audioUrl){
......@@ -366,7 +372,7 @@ cc.Class({
});
}
else{
this.playAni(aniName, 1, () => {
this.playAni(aniName, 0, () => {
this._showStandby = false;
});
}
......@@ -379,7 +385,7 @@ cc.Class({
}
else{
clickCat(this.data.guideAudioUrl2, 'normal');
clickCat(this.data.guideAudioUrl2, 'begin');
}
});
......@@ -407,6 +413,7 @@ cc.Class({
.call(() => {
if(times > 2){
this._cantouch = true;
this._showStandby = false;
return;
}
......@@ -793,11 +800,13 @@ cc.Class({
if(duration - currentTime > 0.6){
this.textTwinkle(node);
cc.audioEngine.setFinishCallback(audioId, () => {
this._showStandby = false;
showNext();
});
}
else{
this.textTwinkle(node, () => {
this._showStandby = false;
showNext();
});
}
......@@ -870,6 +879,7 @@ cc.Class({
.to(0.5, { scale: node.initScale })
.call(() => {
this._cantouch = true;
if(this._shown){
return;
}
......
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