aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/Checkpoint.gd
diff options
context:
space:
mode:
authorLibravatar perivesta <>2023-07-08 16:45:32 +0200
committerLibravatar perivesta <>2023-07-08 16:45:32 +0200
commit8b08fec313ac3517e782d946cbd203958801e6be (patch)
treecab276d81c92fd0ff8d75694c4c252812b4b827c /Scripts/Checkpoint.gd
parentd98cee8592e15f23ce85e8d54abb29aa341c97da (diff)
parent78b6db9f792e18d848383856693cff4ef223a10f (diff)
download2023-8b08fec313ac3517e782d946cbd203958801e6be.tar.gz
2023-8b08fec313ac3517e782d946cbd203958801e6be.tar.bz2
2023-8b08fec313ac3517e782d946cbd203958801e6be.zip
Merge branch 'game-control'
Diffstat (limited to '')
-rw-r--r--Scripts/Checkpoint.gd14
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)