TiledCS
TiledCS copied to clipboard
Flipped objects throw an OverflowException on ParseXml
ParseObjects
doesn't check nor clear flip flags, so int.Parse
throws an OverflowException
when attempting to parse a flipped object.
Started making a pull request, but wasn't sure if you wanted another set of 6 functions called IsObjectFlipped...
or adding three booleans to the object itself. So I'll leave the implementation to you =].
Hey @juanferrer
Thanks for letting me know. Will have a look at it!
With kind regards, TheBoneJarmer
Hey @juanferrer
I just published TiledCS 3.3.2. This includes a fix for the error you got as well as extra stuff to fetch the flipped state of a tile linked to an object. To start with, each object now has a field dataRotationFlag
. This is similar to the TiledLayer.dataRotationFlags
field.
And just like with tiles you can use the helper methods IsTileFlippedDiagonal
, IsTileFlippedVertical
and IsTileFlippedHorizontal
. These now accept a parameter of type TiledObject
. I'd say, give it a shot and let me know if it works for you. :)
With kind regards, TheBoneJarmer
Didn't hear back so I assume all went well. If not do not hesitate to open up this issue again. :)
Oh, sorry. Yes, my bad. The update fixed it. Thanks!