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

fix: 全部使用自然拼读语音

parent e65e3fb4
...@@ -305,10 +305,8 @@ cc.Class({ ...@@ -305,10 +305,8 @@ cc.Class({
bg.opacity = 255; bg.opacity = 255;
// cc.find('LetterMask/bg', letterBg).active = false; // cc.find('LetterMask/bg', letterBg).active = false;
letterBg.addComponent(cc.Button); letterBg.addComponent(cc.Button);
letterBg.on('click', () => { letterBg.on('click', () => {
console.log('汪汪汪');
this.showLetterAnimation(); this.showLetterAnimation();
}); });
return letterBg; return letterBg;
...@@ -414,13 +412,15 @@ cc.Class({ ...@@ -414,13 +412,15 @@ cc.Class({
console.log('writingIdx = ' + writingIdx); console.log('writingIdx = ' + writingIdx);
console.log('this._writingIdx = ' + this._writingIdx); console.log('this._writingIdx = ' + this._writingIdx);
if (writingIdx == this._writingIdx) { if (writingIdx == this._writingIdx) {
if (this.letter == this.letter.toUpperCase()) { const audioClip = this[`small${this.letter.toUpperCase()}`];
const audioClip = this[`big${this.letter.toUpperCase()}`]; cc.audioEngine.play(audioClip, false, 0.8);
cc.audioEngine.play(audioClip, false, 0.8); // if (this.letter == this.letter.toUpperCase()) {
} else { // const audioClip = this[`big${this.letter.toUpperCase()}`];
const audioClip = this[`small${this.letter.toUpperCase()}`]; // cc.audioEngine.play(audioClip, false, 0.8);
cc.audioEngine.play(audioClip, false, 0.8); // } else {
} // const audioClip = this[`small${this.letter.toUpperCase()}`];
// cc.audioEngine.play(audioClip, false, 0.8);
// }
} }
}, },
......
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