extends KinematicBody2D

export var id = 0

var activated = false

func activate():
	$activation_area.set_deferred("monitoring", false)
	$AnimationPlayer.play("activate")
	Global.checkpoint = id
	
func _on_area_body_enter(body):
	activate()
	Audio.play_sound("checkpoint", false)

func _ready():
	$activation_area.connect("body_entered", self, "_on_area_body_enter")
	
