GrappleTest/Objects/Checkpoint/Checkpoint.gd
2024-03-17 21:56:16 -05:00

7 lines
189 B
GDScript

extends Area2D
func _on_body_shape_entered(_body_rid, body, _body_shape_index, _local_shape_index):
if "checkpointPos" in body:
body.checkpointPos = body.global_position
queue_free()