Commit 5b24a2ff authored by Guo Yuhang's avatar Guo Yuhang

card taget tween add

Signed-off-by: Guo Yuhang's avatar郭宇航 <guoyuhang@iplayabc.com>
parent 3f5abfa2
......@@ -232,6 +232,20 @@ cc.Class({
// 背景图添加按钮
bgbackNode.addComponent(cc.Button);
// img添加按钮
imgNode.addComponent(cc.Button);
imgNode.on('click', () => {
cc.tween(bgbackNode)
.call(() => {
bgbackNode.opacity = 1000;
// labelNode.opacity = 0;
var playAudio = bgbackNode.getComponent(cc.AudioSource);
var flipButton = bgbackNode.getComponent(cc.Button);
flipButton.enabled = true;
playAudio.play();
}).to(0.3, { scaleY: 1 })
.start();
});
const playAudioBtnNode = cardNode.getChildByName('playbtn');
const playAudioBtnImgNode = cardNode.getChildByName('btnimg');
......
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