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

fix: 动画不播的问题

parent 095f605d
...@@ -304,6 +304,13 @@ cc.Class({ ...@@ -304,6 +304,13 @@ cc.Class({
bg.active = true; bg.active = true;
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.on('click', () => {
console.log('汪汪汪');
this.showLetterAnimation();
});
return letterBg; return letterBg;
}, },
...@@ -316,12 +323,12 @@ cc.Class({ ...@@ -316,12 +323,12 @@ cc.Class({
const BtnBigLetter = cc.find('Canvas/bg/BtnBigLetter'); const BtnBigLetter = cc.find('Canvas/bg/BtnBigLetter');
const BtnSmallLetter = cc.find('Canvas/bg/BtnSmallLetter'); const BtnSmallLetter = cc.find('Canvas/bg/BtnSmallLetter');
const bgBtn = cc.find('Canvas/bg/Img_letter_bg'); // const bgBtn = cc.find('Canvas/bg/Img_letter_bg');
console.log('bgBtn = ' + bgBtn); // console.log('bgBtn = ' + bgBtn);
bgBtn.on('click', () => { // bgBtn.on('click', () => {
console.log('汪汪汪'); // console.log('汪汪汪');
this.showLetterAnimation(); // this.showLetterAnimation();
}); // });
BtnBigLetter.on('click', () => { BtnBigLetter.on('click', () => {
BtnBigLetter.getChildByName('Img_normal').active = false; BtnBigLetter.getChildByName('Img_normal').active = false;
......
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