cast token type to enum value
This commit is contained in:
2
token.gd
2
token.gd
@@ -8,7 +8,7 @@ var color_polygon
|
|||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
color_polygon = $Color
|
color_polygon = $Color
|
||||||
type = randi_range(0, 3)
|
type = randi_range(0, 3) as token_type
|
||||||
match type:
|
match type:
|
||||||
token_type.TYPE_1:
|
token_type.TYPE_1:
|
||||||
color_polygon.color = Color.RED
|
color_polygon.color = Color.RED
|
||||||
|
|||||||
Reference in New Issue
Block a user