extends Area signal picked_up export var goldToGive : int = 1 var rotateSpeed : float = 5.0 # called every frame func _process (delta): # rotate along the Y axis rotate_y(rotateSpeed * delta) func on_touch(body : KinematicBody): # is this the player? If so give them gold if body.is_in_group("Player"): body.give_gold(goldToGive) emit_signal("picked_up") queue_free()