ptotheaul Posted February 10, 2018 Share Posted February 10, 2018 I have a long animation that will not fit on a single 2048x2048 sprite sheet. I need to keep the spritesheet/atlas that size though. What is the best way to go about defining the animation. With one Texture Packer spritesheet/atlas it looks like this: caster = this.game.add.sprite(100, 100, 'caster', 'FIRE_00001.png'); animation = caster.animations.add('fire', Phaser.Animation.generateFrameNames('FIRE_000', 1, 23, '.png', 2), 30, true, false); Where the sprite sheet is caster.json and caster.png. With two sprite sheets the animations would be over two sprite sheets: caster-1.png caster-1.json and caster-2.png caster-2.json Since i have to preload both 'caster-1' and 'caster-2' I can't just reference a single atlas 'caster'. Do I have to create two animations and call oncomplete functions to play the next? It seems like there should be a simper way. Link to comment Share on other sites More sharing options...
rich Posted February 10, 2018 Share Posted February 10, 2018 You’ll have to manually link them somehow, as Phaser 2 doesn’t support multi atlas files (v3 does though) and it will need 2 animations, yes. Link to comment Share on other sites More sharing options...
Recommended Posts