[]Animator无法监听complete
首先,我新增了多个clip到Animator:
this.ani = this.actor.getComponentByType(Laya.Animator) as Laya.Animator;
this.ani.addClip(clipSuccess, this.ANIM_SUCCESS_IDLE_NICK,0,34);
this.ani.addClip(clipFailed, this.ANIM_FAILED_IDLE_NICK,0,34);
this.ani.addClip(clipCardInHand, this.ANIM_CARD_IN_HAND_IDLE_NICK,0,34);
//监听动画完成
this.ani.on(Laya.Event.COMPLETE, this, this.onAniComplete);
之后,当我动画播放完成后,设置的监听动画结束播放监听无效.
请问这个监听添加有错误么?监听不是应该添加到Animator对象上么?
this.ani = this.actor.getComponentByType(Laya.Animator) as Laya.Animator;
this.ani.addClip(clipSuccess, this.ANIM_SUCCESS_IDLE_NICK,0,34);
this.ani.addClip(clipFailed, this.ANIM_FAILED_IDLE_NICK,0,34);
this.ani.addClip(clipCardInHand, this.ANIM_CARD_IN_HAND_IDLE_NICK,0,34);
//监听动画完成
this.ani.on(Laya.Event.COMPLETE, this, this.onAniComplete);
之后,当我动画播放完成后,设置的监听动画结束播放监听无效.
请问这个监听添加有错误么?监听不是应该添加到Animator对象上么?
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Monica - 知识达人
赞同来自: