17 lines
371 B
GDScript3
17 lines
371 B
GDScript3
|
class_name Selector
|
||
|
extends Node2D
|
||
|
|
||
|
var selector = null
|
||
|
var data = {}
|
||
|
var is_selected = false:
|
||
|
set(value):
|
||
|
is_selected = value
|
||
|
if is_selected:
|
||
|
selector = preload("res://gui/selector.tscn").instantiate()
|
||
|
add_child(selector)
|
||
|
selector.global_position = global_position
|
||
|
selector.scale = Vector2(2,2)
|
||
|
else:
|
||
|
if selector != null:
|
||
|
selector.queue_free()
|