Commit 095f605d authored by 范雪寒's avatar 范雪寒

feat: log

parent e6eca39c
......@@ -143,6 +143,7 @@ cc.Class({
letterPosList: null,
initData() {
this._writingIdx = 0;
this.letterPosList = {};
for (const key in letterData) {
if (Object.hasOwnProperty.call(letterData, key)) {
......@@ -311,11 +312,14 @@ cc.Class({
},
initListener() {
console.log('initListener');
const BtnBigLetter = cc.find('Canvas/bg/BtnBigLetter');
const BtnSmallLetter = cc.find('Canvas/bg/BtnSmallLetter');
const bgBtn = cc.find('Canvas/bg/Img_letter_bg');
console.log('bgBtn = ' + bgBtn);
bgBtn.on('click', () => {
console.log('汪汪汪');
this.showLetterAnimation();
});
......@@ -330,7 +334,8 @@ cc.Class({
cc.audioEngine.play(this.switchAudio, false, 0.8);
this.setLetter(this.letter.toUpperCase());
// this.showLetterAnimation();
this._writingIdx++;
this.startEditMode();
});
BtnSmallLetter.on('click', () => {
......@@ -344,7 +349,8 @@ cc.Class({
cc.audioEngine.play(this.switchAudio, false, 0.8);
this.setLetter(this.letter.toLowerCase());
// this.showLetterAnimation();
this._writingIdx++;
this.startEditMode();
});
......@@ -381,9 +387,6 @@ cc.Class({
_writingIdx: 0,
async showLetterAnimation() {
if (!this._writingIdx) {
this._writingIdx = 0;
}
this._writingIdx++;
const writingIdx = this._writingIdx;
console.log('set writingIdx = ' + writingIdx);
......
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