9 lines
159 B
GDScript
9 lines
159 B
GDScript
extends Area2D
|
|
|
|
signal player_entered
|
|
|
|
func _on_body_entered(body: Node2D) -> void:
|
|
if body.name == "player":
|
|
print("You win!")
|
|
player_entered.emit(body)
|