如题
只找到了注册事件,没看到动画播放回调是什么
this.model.on(‘play’, this.onPlay, this);
this.model.on(‘stop’, this.onStop, this);
如题
只找到了注册事件,没看到动画播放回调是什么
this.model.on(‘play’, this.onPlay, this);
this.model.on(‘stop’, this.onStop, this);
这个动画有点弱鸡,连播放结束时间都没有
是啊,我现在都是自己设置播放次数,然后通过来定····
可是终归不好,我找了老半天,也没找到回调·····
希望大佬们能出来指点下
看下文档动画章节,下面是示例代码。
https://docs.cocos.com/creator/manual/zh/animation/scripting-animation.html#animation-组件
@property(cc.Label)
label: cc.Label = null;
@property(cc.SkeletonAnimationClip)
clip: cc.SkeletonAnimationClip = null;
@property(cc.SkeletonAnimation)
play: cc.SkeletonAnimation = null;
start() {
this.clip.wrapMode = cc.WrapMode.Normal;
// init logic
this.play.on('stop', ()=>{
console.log("????")
})
}
谢谢老大