Jump to content

Animation, fire event on end?


TomFiveThumbs
 Share

Recommended Posts

Here are my animations

baddie.animations.add('fly',[0,1],5,true);baddie.animations.add('hit',[2,0,2],10,false);baddie.animations.play('fly');

When the baddie is hit:

baddie.animations.play('hit');

It plays the hit animation once, then stays on the last frame.

 

Is there a way I can get it to fire an event, or process a function after the animation is done? I can see there is a killOnComplete option, but no onComplete function option.

 

The only real way I can see this working is having a timer or counter, then going back to the fly animation, but that's a bit sloppy and could get annoying with multiple baddies.

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...