diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2025-03-10 18:22:09 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2025-03-10 18:22:09 +0100 |
commit | 440020e642f539079867577435a9f8b02075699b (patch) | |
tree | 99acccfc1574a8ffc656d6f64ff934949edb1f52 /map/objects/stairs.gd |
Diffstat (limited to 'map/objects/stairs.gd')
-rw-r--r-- | map/objects/stairs.gd | 11 |
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 |