Commit f60e58c6 authored by 李维's avatar 李维

修复重复点击音频按钮一直变大的问题

parent 01ad3cbe
......@@ -684,9 +684,9 @@ export default class NewClass extends cc.Component {
}
const script = node.getComponent("playIconAni_NJ_usercenter");
script.play();
script && script.play();
playAudioByUrl(node.audio_url, () => {
script.stop();
script && script.stop();
})
}
......
......@@ -35,6 +35,9 @@ cc.Class({
},
play() {
if(this.playTween) {
this.playTween.stop();
}
this.playTween = cc.tween(this.node)
.by(0.5, { scale: 0.1 })
.by(0.5, { scale: -0.1 })
......@@ -45,6 +48,7 @@ cc.Class({
stop() {
this.playTween.stop();
this.playTween = null;
}
// update (dt) {},
});
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