TheBoneJarmer / TiledCS

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

use dictionaries instead of arrays for properties #84

Closed BBQGiraffe closed 2 years ago

BBQGiraffe commented 2 years ago

getting specific items from a TiledProperty array is tedious, it would be much more efficient if properties were in a string indexed dictionary rather than an array

TheBoneJarmer commented 2 years ago

Hey @BBQGiraffe

Thanks for the suggestion. Unfortunately, I can't do it. Properties in Tiled are made up of tree parts. These are name, type and value. A dictionary is only useful for the name and value part. But I think the type is important too since Tiled saves the value as a string in the XML.

With kind regards, TheBoneJarmer