summaryrefslogtreecommitdiff
path: root/map/objects/stairs.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-03-10 18:22:09 +0100
committerDaniel Weipert <git@mail.dweipert.de>2025-03-10 18:22:09 +0100
commit440020e642f539079867577435a9f8b02075699b (patch)
tree99acccfc1574a8ffc656d6f64ff934949edb1f52 /map/objects/stairs.gd
initial commitHEADmain
Diffstat (limited to 'map/objects/stairs.gd')
-rw-r--r--map/objects/stairs.gd11
1 files changed, 11 insertions, 0 deletions
diff --git a/map/objects/stairs.gd b/map/objects/stairs.gd
new file mode 100644
index 0000000..3ebaf80
--- /dev/null
+++ b/map/objects/stairs.gd
@@ -0,0 +1,11 @@
+extends Door
+
+
+@export var invert_direction := true
+
+
+func _on_body_entered(body: Node2D) -> void:
+ if body is Player:
+ await super._on_body_entered(body)
+ if invert_direction:
+ Game.current_direction *= -1