TheBoneJarmer / TiledCS

TiledCS is a dotnet library for loading Tiled tilesets and maps
MIT License
139 stars 51 forks source link

Cannot get tileoffset of a tileset #82

Closed puthre closed 2 years ago

puthre commented 2 years ago

I have the following tileset


<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.9" tiledversion="1.9.0" name="turrets" tilewidth="256" tileheight="512" tilecount="8" columns="0">
<tileoffset x="-64" y="200"/>
 <grid orientation="orthogonal" width="1" height="1"/>
 <tile id="0">
  <image width="256" height="512" source="0001.png"/>
  <animation>
   <frame tileid="0" duration="100"/>
   <frame tileid="1" duration="100"/>
   <frame tileid="2" duration="100"/>
   <frame tileid="3" duration="100"/>
   <frame tileid="4" duration="100"/>
   <frame tileid="5" duration="100"/>
   <frame tileid="6" duration="100"/>
   <frame tileid="7" duration="100"/>
  </animation>
 </tile>
 <tile id="1">
  <image width="256" height="512" source="0002.png"/>
 </tile>
 <tile id="2">
  <image width="256" height="512" source="0003.png"/>
 </tile>
 <tile id="3">
  <image width="256" height="512" source="0004.png"/>
 </tile>
 <tile id="4">
  <image width="256" height="512" source="0005.png"/>
 </tile>
 <tile id="5">
  <image width="256" height="512" source="0006.png"/>
 </tile>
 <tile id="6">
  <image width="256" height="512" source="0007.png"/>
 </tile>
 <tile id="7">
  <image width="256" height="512" source="0008.png"/>
 </tile>
</tileset>

I can't find a way to retrieve the tileoffset values.

Thank you.

TheBoneJarmer commented 2 years ago

Hi @puthre

You are absolutely correct. I was not aware such a thing exists to be honest so I will release a patch NuGet asap. Thank you for letting me know!

With kind regards, TheBoneJarmer

TheBoneJarmer commented 2 years ago

Alrighty, NuGet package has been released!