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

16 lines
250 B
GDScript3
Raw Normal View History

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