Commit 00107cee authored by Chen Jiping's avatar Chen Jiping

feat:调整猫咪动画逻辑;调整图片动画频率

parent 583c8e38
...@@ -352,25 +352,36 @@ cc.Class({ ...@@ -352,25 +352,36 @@ cc.Class({
} }
this._showStandby = true; this._showStandby = true;
//播放待机音频
if(this.data.guideAudioUrl2){
const state = this.playAni('begin', 0);
//播放完成,停止动画 const clickCat = (audioUrl, aniName) =>{
this.playAudioByUrl(this.data.guideAudioUrl2, () => { //播放待机音频
state.stop(); if(audioUrl){
this._showStandby = false;
this.playAni('normal', 0); const state = this.playAni(aniName, 0);
});
//播放完成,停止动画
this.playAudioByUrl(audioUrl, () => {
state.stop();
this._showStandby = false;
this.playAni('normal', 0);
});
}
else{
this.playAni(aniName, 1, () => {
this._showStandby = false;
});
}
}
//如果已经结束,就播放结束音频;其他情况就播放待机音频
if (this._shown) {
clickCat(this.data.guideAudioUrl3, 'finish');
} }
else{ else{
this.playAni('begin', 1, () => { clickCat(this.data.guideAudioUrl2, 'begin');
this._showStandby = false;
});
} }
}); });
const picNode = cc.find("Canvas/content/bg_green/pic"); const picNode = cc.find("Canvas/content/bg_green/pic");
......
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