10 lines
255 B
GDScript
10 lines
255 B
GDScript
class_name ActionPickup
|
|
extends ClickAction
|
|
|
|
@export var item_id: String = ""
|
|
@export var destroy_path: NodePath
|
|
|
|
func execute(clickable: Node, hit_position: Vector3) -> void:
|
|
clickable.get_node(destroy_path).queue_free()
|
|
print("Picked up: " + item_id)
|