2024-08-20 01:18:41 +00:00
|
|
|
class_name Coin extends Area2D
|
2024-08-13 01:21:31 +00:00
|
|
|
|
2024-08-20 01:18:41 +00:00
|
|
|
signal coinCollected
|
2024-08-13 01:21:31 +00:00
|
|
|
|
|
|
|
func _on_body_entered(body):
|
|
|
|
if body.is_in_group("player"):
|
|
|
|
print("something hit the coin")
|
2024-08-20 01:18:41 +00:00
|
|
|
coinCollected.emit()
|
2024-08-13 01:21:31 +00:00
|
|
|
queue_free()
|