Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

动画监听事件中用lastframe, 为什么设loop, pingpong模式回调才起作用?

$
0
0

@704436993 写道:

lastframe事件在default, normal, reverse的模式下都无法调用。但是在loop,pingpong模式下才能调用,为什么啊?
onPlay:function(event) {
var state=event.detail;
var type =event.type;
console.log(event);
console.log(state);
console.log(type);
},

onLoad: function () {
var anim = this.getComponent(cc.Animation);
anim.play('TestAni');
anim.on('lastframe',this.onPlay,this);
},

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>