2023-10-30 02:21:50 +02:00
|
|
|
extends StaticBody3D
|
|
|
|
|
|
|
|
@onready var label: Label3D = $Label
|
2023-10-31 23:15:33 +02:00
|
|
|
@export var id: String = "0"
|
2023-10-30 02:21:50 +02:00
|
|
|
|
2023-10-31 23:15:33 +02:00
|
|
|
signal click(id: String)
|
2023-10-30 02:21:50 +02:00
|
|
|
|
2023-11-05 22:32:50 +02:00
|
|
|
func _on_click(event):
|
2023-10-31 23:15:33 +02:00
|
|
|
click.emit(id)
|
2023-10-30 02:21:50 +02:00
|
|
|
|
|
|
|
func set_device_name(text):
|
|
|
|
assert(label != null, "Device has to be added to the scene tree")
|
|
|
|
label.text = text
|