You can upload XML files with sprite definitions to speed up development. Each XML file must have an outer element (arbitrary), and any number of
Each <sprite>
element must have an img
tab, whose value must match the filename of the sprite you want to target.
Only the last part is looked at, so if you are uploading an image file ./my/cool/assets/head.png
and a XML <sprite>
with ./vanilla/head.png
, they will match on head.png
.
Each <sprite>
tag can then have left
,right
,top
, or bottom
tags. If you don't need one of them, leave it blank, don't set it to 0.
Example:
<sprites>
When the XML file is loaded, it will try to match any existing sprites on the grid.
<sprite img="test\head.png" top="-100" bottom="68"/>
<sprite img="test/body.png" top="-62" bottom="68" left="0"/>
</sprites>
When you subsequently load new sprites, it will look at the existing XML definitions.