Jump to content

Sprite animation over multiple textures


jimini
 Share

Recommended Posts

Hey guys, been playing around with phaser and loving it.

 

I currently have a butt load of spritesheets to add in, and sadly in a few instances 1 animation spills over multiple textures.

Digging through the docs and forums I'm under the impression that phaser currently does not support changing texture mid animations?

 

I'm not overly convinced I can bring the spritesheets down so that 1 animation fits in 1 texture :(

 

My current theory would be to break that down into individual animation parts.. ie dance_01, which will play dance_02 on animation complete, changing the texture and continuing the animation in the process, but this sounds kinda messy?

 

Hoping someone may have a good solution to this (or can point me to one as I'm sure I'm not the first to ask this - just couldn't really find an answer myself ) :) 

 

any thoughts/suggestions would be awesome, thanks for any help

 

Link to comment
Share on other sites

I'm afraid there's no immediately easy way to do this yet. I want to add in support for it, and for multi-file texture atlases (which are sort of the same thing) but this work hasn't been done yet. So you'll have to find a work around that best suits you. Essentially all the AnimationManager would do is let you specify a texture with an animation sequence / frame, and Sprite.loadTexture when it hits it. So it would do it similar to how you've worked it out already, it'd just hide it from you a bit.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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