diff options
author | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-08 16:43:32 +0200 |
---|---|---|
committer | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-08 16:43:32 +0200 |
commit | 78b6db9f792e18d848383856693cff4ef223a10f (patch) | |
tree | 4d0385ae8eb8f450a6b2c40c1886a964134d154d /Scripts/Checkpoint.gd | |
parent | bf17c8a97b77cdb783a2751e7ee4a90843a00f06 (diff) | |
download | 2023-78b6db9f792e18d848383856693cff4ef223a10f.tar.gz 2023-78b6db9f792e18d848383856693cff4ef223a10f.tar.bz2 2023-78b6db9f792e18d848383856693cff4ef223a10f.zip |
checkpoint detection and UI
Diffstat (limited to 'Scripts/Checkpoint.gd')
-rw-r--r-- | Scripts/Checkpoint.gd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Scripts/Checkpoint.gd b/Scripts/Checkpoint.gd new file mode 100644 index 0000000..ed10f74 --- /dev/null +++ b/Scripts/Checkpoint.gd @@ -0,0 +1,14 @@ +extends Node2D + + +var was_visited = false + +@onready var sprite : Sprite2D = $Sprite2D + + +func set_was_visited(visited: bool): + was_visited = visited + # TODO change the sprite to indicate the change + +func _on_area_2d_body_entered(body): + set_was_visited(true) |