Commit eef99449 authored by 范雪寒's avatar 范雪寒

fix: 重音问题

parent 92983a2f
...@@ -30,6 +30,15 @@ cc.Class({ ...@@ -30,6 +30,15 @@ cc.Class({
} }
}, },
log(str) {
const middleLayerNode = cc.find('middleLayer')
if (middleLayerNode) {
middleLayerNode.getComponent('middleLayer').log(str);
} else {
console.log(str);
}
},
onTouchEnd(event) { onTouchEnd(event) {
this.scheduleOnce(() => { this.scheduleOnce(() => {
if (GameData._isPageTurning) { if (GameData._isPageTurning) {
...@@ -220,6 +229,11 @@ cc.Class({ ...@@ -220,6 +229,11 @@ cc.Class({
this.audioDuration = cc.audioEngine.getDuration(this.audioID); this.audioDuration = cc.audioEngine.getDuration(this.audioID);
this.textDuration = this.audioDuration / this.layoutText.childrenCount; this.textDuration = this.audioDuration / this.layoutText.childrenCount;
this.textIndex = 0; this.textIndex = 0;
if (this.textDuration == -1) {
this.textDuration = 1;
}
this.schedule(this.chengeTextColor, this.textDuration, this.layoutText.childrenCount, 0.01) this.schedule(this.chengeTextColor, this.textDuration, this.layoutText.childrenCount, 0.01)
}); });
}, },
......
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