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

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

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