0

I have this data from a Tiled tmx file

<objectgroup color="#00a9ff" name="poly" width="500" height="24">
<properties>
<property name="poly" value="1"/>
</properties>
<object name="poly" x="305" y="472">
<properties>
<property name="value" value="1"/>
</properties>

<polygon points="109,6 395,71 -142,69"/>
</object>
</objectgroup>
</map>

I want to make CGPoints from the polygon points but when I make an NSArray from polygon points I dont get 3 CGPoints or the items in the array, I get all the values together as a single item in the array.

How can I separate polygon points="109,6 395,71 -142,69" into 3 CGPoints?

thank you for the help :D

Xofear
  • 210
  • 1
  • 8
  • 1
    You can look it up in or use this reader: https://github.com/KoboldKit/KoboldKit/blob/master/KoboldKit/KoboldKitFree/Framework/TilemapModel/TMX/KKTMXReader.m – CodeSmile Sep 05 '14 at 09:14
  • or you can wait for ios 8 which comes with its own editor and you wont have to deal with the tmx reading headache! – user2421700 Sep 05 '14 at 22:37

0 Answers0