aboutsummaryrefslogblamecommitdiffstats
path: root/Scripts/Checkpoint.gd
blob: 565afef48983a73034b6afb30d21b89a31d53b1e (plain) (tree)
1
2
3
4
5
6
7
8
9




                       


                                    
                    

                                      
             

                                      


                                                       
              
                             
extends Node2D


var was_visited = false


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

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