Love2dCS icon indicating copy to clipboard operation
Love2dCS copied to clipboard

All enums should derive from int

Open Shadowblitz16 opened this issue 6 years ago • 2 comments

All enums should derive from int makes them easier to loop through. if any enums are strings they should use internal lookup dictionaries of <int, string>

Shadowblitz16 avatar Aug 27 '19 13:08 Shadowblitz16

@endlesstravel did you see this?

Shadowblitz16 avatar Jan 08 '20 05:01 Shadowblitz16

yea, i read that. Although no declaration is displayed, the current enumeration types are all from int. I think using map will slow down access speed. You can use Enum.GetValues(...) when traversing, but note that some enumeration values are invalid (for example: BodyType.). I will remove invalid enumeration values in the next version.

I'm sorry for the long response. I think I've replied, but for some reasons, GitHub seems to only deal with some of the issue's replies (my reply sent at the same time). :sad:

endlesstravel avatar Jan 28 '20 09:01 endlesstravel