You (might) want @export_flags
Though, collision layer and mask use this because it can set multiple layers or masks on/off. If you only want one style set at a time, you should stick to enums.
This is implemented as a “bitset”, binary being used to store up to 32 true or false values. When using the @export_flags
you will get an int
instead of an enum
, checking values involves binary operations like this to check one value my_flag & 0b1000 != 0
I wrote a similar example as a advanced recommendation to replace an Array[bool]
type.