TheBoneJarmer / TiledCS

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

replace TiledProperty.type with enum #83

Closed BBQGiraffe closed 2 years ago

BBQGiraffe commented 2 years ago

currently TiledProperty.type is a string, this makes using it quite ugly, could probably use Enum.TypeParse if you convert the type string to uppercase(since int, object, bool, and string are C# types and thus can't be used for enums), then if TryParse fails the type could just default to String

TheBoneJarmer commented 2 years ago

Hey @BBQGiraffe

Thanks for the suggestion! I think it is a good idea. As a matter of fact, I thought I already done this as I replaced string fields not that long ago with an enum where possible.

With kind regards, TheBoneJarmer

TheBoneJarmer commented 2 years ago

Hey @BBQGiraffe

I would like to let you know I just added support for this in the develop. This change will be available with the next release.

With kind regards, TheBoneJarmer

TheBoneJarmer commented 2 years ago

Hi @BBQGiraffe

I would like to let you know I just released TiledCS 3.3.0, this version includes this change.

With kind regards, TheBoneJarmer