Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17112

Animation Component Question?

$
0
0

@luke2125 wrote:

Hi,

var anim = this.getComopnent(cc.Animation);

// play the first animation
anim.play('position-anim');

// play the second animation
anim.play('rotation-anim');

The above code, should play the position-anim, then the rotation-anim, consecutively? Correct? The reason I ask, that in my game, I set it up like above, but it just plays the 2nd anim, and doesn't play the 1st anim, then the 2nd anim? Or should I use the Animation Event

cc.Class({
extends: cc.Component,

onAnimCompleted: function (num, string) {
    console.log('onAnimCompleted: param1[%s], param2[%s]', num, string);
}

});

Would appreciate any info....Thanks and God Bless....

Sincerely,

Sunday

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17112

Trending Articles