Commit e6f0384c authored by liujiangnan's avatar liujiangnan

feat: 事件只注册一次

parent 3ca16b2a
......@@ -158,7 +158,7 @@ cc.Class({
this.initData();
this.initAudio();
this.initView();
// this.initListener();
this.initListener();
},
_cantouch: null,
......@@ -428,17 +428,18 @@ cc.Class({
tip.active = true;
var dragonDisplay = tip.getComponent(dragonBones.ArmatureDisplay);
const state = dragonDisplay.playAnimation(name, times);
return state;
},
dragonDisplay.once(dragonBones.EventObject.COMPLETE, () => {
initListener() {
const tip = cc.find('Canvas/tipFrame/tip');
var dragonDisplay = tip.getComponent(dragonBones.ArmatureDisplay);
dragonDisplay.on(dragonBones.EventObject.COMPLETE, () => {
tip.active = false;
if (cb) {
cb();
}
this.playAni('normal', 0)
this.photoBtnClick();
})
return state;
},
......@@ -792,12 +793,6 @@ cc.Class({
this.playAni('begin', 0)
this.playTipAni('normal', 1, () => {
console.log('play ani end');
this.playAni('normal', 0)
this.photoBtnClick();
})
},
......
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