aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/Checkpoint.gd
blob: d8c671e4cccd60a5d936d66abac1b7d5da9c1495 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
extends Node2D


var was_visited = false

@onready var sprite : Sprite2D = $Sprite2D


func set_was_visited(visited: bool):
	was_visited = visited
	if(visited):
		hide()
	else:
		show()
	# TODO change the sprite to indicate the change

func _on_area_2d_body_entered(body):
	hide()
	set_was_visited(true)