system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Wurzelpilz |
extends Node2D
enum Check {
right,
left,
down,
up
}
var my_enum : Check
that does not work: the identifier Check is not a valid type (not a script, or class)
(Check) var my_enum
system
2
|
|
|
|
Reply From: |
r.bailey |
Think the easy solution here is to just not type the my_enum value. You can still use the enum, just set it to the my_enum wherever. Example below.
enum Check { right, left, down, up }
var my_check_enum
func _ready() :
my_check_enum = Check.right
func somethingelse -> void:
my_check_enum = Check.up