Files
godot-apointa/scripts/actions/action_pickup.gd
2026-05-16 11:51:19 +02:00

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)