Crystalline-awakening/collectables/crystal/collect_crystal.gd

15 lines
232 B
GDScript3
Raw Normal View History

2025-05-17 17:38:34 +00:00
extends Area2D
2025-05-17 17:04:03 +00:00
2025-05-18 13:40:05 +00:00
signal _picked_up
2025-05-18 12:35:48 +00:00
2025-05-18 10:14:53 +00:00
func _ready():
2025-05-18 13:40:05 +00:00
add_to_group("crystals")
2025-05-18 10:14:53 +00:00
print("ready")
2025-05-17 17:38:34 +00:00
func _on_body_entered(body: Node2D) -> void:
2025-05-18 13:40:05 +00:00
add_user_signal("_picked_up")
emit_signal("_picked_up")
2025-05-18 10:14:53 +00:00
self.queue_free()
print("meow")
2025-05-18 12:35:48 +00:00