edmundep Posted October 5, 2014 Share Posted October 5, 2014 Is it possible to give the animation a frame index range instead of listing all the frames something like this this.flame.animations.add('burn2',[29,59]); // will play from frame 29 - 59this.flame.animations.add('burn',[0,59,'burn2]); // will play from 0 - 59 then play burn2 animation Thanks, haven't seen anything in the docs for this. Kyle Link to comment Share on other sites More sharing options...
rich Posted October 6, 2014 Share Posted October 6, 2014 If they are integers you need then you can do it like this:animations.add('burn', game.math.numberArray(29, 59));If you need frames from a texture atlas, then use Phaser.Animation.generateFrameNames instead. Link to comment Share on other sites More sharing options...
edmundep Posted October 6, 2014 Author Share Posted October 6, 2014 If they are integers you need then you can do it like this:animations.add('burn', game.math.numberArray(29, 59));If you need frames from a texture atlas, then use Phaser.Animation.generateFrameNames instead. Thanks for the array generator. I'm curious too.. I have been using createjs, its a canvas drawing api and a pretty powerful one, but wanted to try out phaser. One thing createjs does is allow me to name animations like animations.add ('burn',[frames]);// then create another animation that uses some frames but also another animation.animations.add('burn2',[frames, 'burn'] // so this one at the end of all the frames plays the burn animation aswell.Is this something that i would have to do manually? I'm assuming its not integrated in this system? Link to comment Share on other sites More sharing options...
Recommended Posts