From 440020e642f539079867577435a9f8b02075699b Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 10 Mar 2025 18:22:09 +0100 Subject: initial commit --- map/objects/stairs.gd | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 map/objects/stairs.gd (limited to 'map/objects/stairs.gd') 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 -- cgit v1.2.3