Commit 583c8e38 authored by Chen Jiping's avatar Chen Jiping

feat:修复结束音频被播放逻辑,并修改图片晃动频率

parent da125625
......@@ -373,26 +373,6 @@ cc.Class({
});
let textNode = cc.find("Canvas/content/bg_green/bg_word-background/text");
let wordNodeArr = textNode.wordNodeArr;
let handNode = cc.find("Canvas/content/bg_green/bg_word-background/text/icon_hand");
handNode.addComponent(cc.Button);
handNode.on('click', () => {
if(!this._cantouch){
return;
}
let wordNode = wordNodeArr[2 * this._curIndex];
this.playTextAutio(wordNode, wordNode.data.lrcData.audio_url, () => {
this._cantouch = true;
})
});
const picNode = cc.find("Canvas/content/bg_green/pic");
picNode.addComponent(cc.Button);
picNode.on('click', () => {
......@@ -409,10 +389,10 @@ cc.Class({
const rota = () => {
cc.tween(picNode)
.to(0.3, { angle: rotation - 15 })
.to(0.3, { angle: rotation })
.to(0.3, { angle: rotation + 15 })
.to(0.3, { angle: rotation })
.to(0.1, { angle: rotation - 15 })
.to(0.1, { angle: rotation })
.to(0.1, { angle: rotation + 15 })
.to(0.1, { angle: rotation })
.call(() => {
if(times > 2){
this._cantouch = true;
......@@ -690,6 +670,8 @@ cc.Class({
return;
}
this._cantouch = false;
this._shown = true;
let handNode = cc.find("Canvas/content/bg_green/bg_word-background/text/icon_hand");
......@@ -701,6 +683,7 @@ cc.Class({
const state = this.playAni('finish', 0);
this.playAudioByUrl(this.data.guideAudioUrl3, () => {
this._cantouch = true;
state.stop();
this.playAni('normal', 0);
})
......@@ -764,6 +747,9 @@ cc.Class({
if (len == 1) {
const showNext = () => {
this.playAni('normal', 0);
this._cantouch = true;
if(this._shown){
return;
......@@ -776,9 +762,7 @@ cc.Class({
this._curIndex = 0;
console.log("the first time");
}
this.playAni('normal', 0);
}
this.moveHand(this._curIndex, () => {
this._cantouch = 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