Jump to content

Spritesheet, Change Image


startupper
 Share

Recommended Posts

I'm a little irritated at the moment.
A sprite sheet is to be loaded and displayed. The sprite sheet consists of several individual images (2, 3, ... 5, ... 10, ... any). I would like to change these pictures.
Unfortunately, I find no suitable example. On the basis of an animation, with Play and Change Texture, it can not be, it is always only a single picture to the next switch.
Does anyone have a suggestion? Thank you.

PS: Of course, I also have a JASON file to it.

Link to comment
Share on other sites

Are you looking to use frames from multiple spritesheets for a single animation? I don't think you can mix frames fromendifferent sources that way. 

Or are you looking to switch to a new texture on a sprite for new animations? This can be done. After loading a new texture on the sprite, you will need to redefine the animations, then play the animation. 

Im away from my computer ATM, so I can't show you and example. I'll try to the next time I'm able of you haven't gotten it to work till then. 

Link to comment
Share on other sites

Hey Flashy,
It is one Spritesheet. One JSON-File.
Maybe i mean "change texture"!?

I just want to exchange pictures.
If ..., then go from picture 1 to picture 2.
If ..., what else, then go from picture 2 to picture 3.

Later i build it then with buttons, or something else, depending on how I need it.
As I said, animation play I think for overflow, because there are only standing images, no anis.

spriteshee_example.jpg

Link to comment
Share on other sites

just create more than one animation and put animations.play into the if, example on your example:

a = animation from 1 to 2;

b = animation from 2 to 3;

if.... a.play

else....b.play

i'm noob here but i think this can be work

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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