Limited Space
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
ld54/nodes/triggers/checkpoint.gd

11 lines
260 B

extends Area2D
# Called when the node enters the scene tree for the first time.
func _ready():
body_entered.connect(on_body_entered)
func on_body_entered(body):
if body.is_in_group('player'):
g_game_state.checkpoint(body.global_position)
queue_free()