#how would you use an unnamed enum?
1 messages · Page 1 of 1 (latest)
I believe in that case they act more or less like integer constants?
This code works for example:
enum {THING_A, THING_B}
func _ready():
var my_thing = THING_A
_do_stuff(my_thing)
func _do_stuff(thing: int):
print("Thing is %s" % thing)
ah ok so the enum members can be referenced directly
also, if you've got:
class_name Parent
enum {CONST_A, CONST_B}
you can do Parent.CONST_A anywhere
useful, thanks!