Jump to content

Display source rectangle of a sprite


peterjohnston
 Share

Recommended Posts

For my first game in Phaser, I'm attempting a puzzle slider game, where an image is broken into a grid of smaller squares with one piece missing and it's mixed up, and you have to slide the pieces around to solve the image.

 

My problem is, I don't know how to create multiple sprites which each have a texture that comes from a specific source rectangle on a single image that is loaded in. Is there a way to get a source rectangle from an image in Phaser?

 

Thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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