diff options
author | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-09 16:25:05 +0200 |
---|---|---|
committer | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-09 16:25:05 +0200 |
commit | e7845dfe77cafebd30efb660ef56006d5388efb1 (patch) | |
tree | 1f7b96cc93cfa6a8b213b4529e93cef9092bfb95 /Scripts/Checkpoint.gd | |
parent | 1782e704c10c4ddf2955f72dd32ca4d068aec3e0 (diff) | |
parent | f590408e30faa9bbb29969348a4f3b6328eed491 (diff) | |
download | 2023-e7845dfe77cafebd30efb660ef56006d5388efb1.tar.gz 2023-e7845dfe77cafebd30efb660ef56006d5388efb1.tar.bz2 2023-e7845dfe77cafebd30efb660ef56006d5388efb1.zip |
Merge branch 'master' of bunny.garden:jam/gmtk/2022
the commit.
Diffstat (limited to '')
-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 d8c671e..119419a 100644 --- a/Scripts/Checkpoint.gd +++ b/Scripts/Checkpoint.gd @@ -3,17 +3,12 @@ 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 - + $Sprite2Dclosed.visible = visited + $Sprite2Dopen.visible = !visited + + func _on_area_2d_body_entered(body): - hide() set_was_visited(true) |