diff options
Diffstat (limited to 'Scripts')
-rw-r--r-- | Scripts/Checkpoint.gd | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Scripts/Checkpoint.gd b/Scripts/Checkpoint.gd index 565afef..119419a 100644 --- a/Scripts/Checkpoint.gd +++ b/Scripts/Checkpoint.gd @@ -6,14 +6,9 @@ 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 - + $Sprite2Dclosed.visible = visited + $Sprite2Dopen.visible = !visited + + func _on_area_2d_body_entered(body): - hide() set_was_visited(true) |