1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-25 09:34:24 +00:00
hella-farm/behaviours/collectable.gd

15 lines
250 B
GDScript

extends Node2D
class_name Collectable
signal collected(tag: StringName)
@export var tag: StringName
func _on_mouse_area_mouse_entered() -> void:
collected.emit(tag)
func _on_collected(t: StringName) -> void:
Log.p(self, "Collected: %s" % t)