summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Objects/BaseDoor.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-05-06 16:30:46 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-05-06 16:30:46 +0200
commit276b7664bd4a475a3ca93a682c16b49c504c58f7 (patch)
tree6b8f8cf0e1a82496c1f539e55e26bc078300b23a /Scenes/Entities/Objects/BaseDoor.gd
parent8c0e8b5bf73caaf2fd6f04fb97b9c13f2970c431 (diff)
update
Diffstat (limited to 'Scenes/Entities/Objects/BaseDoor.gd')
-rw-r--r--Scenes/Entities/Objects/BaseDoor.gd21
1 files changed, 21 insertions, 0 deletions
diff --git a/Scenes/Entities/Objects/BaseDoor.gd b/Scenes/Entities/Objects/BaseDoor.gd
new file mode 100644
index 0000000..7a6c8d4
--- /dev/null
+++ b/Scenes/Entities/Objects/BaseDoor.gd
@@ -0,0 +1,21 @@
+extends StaticBody2D
+
+
+@export var enabled: bool = true
+
+
+func _ready():
+ if enabled:
+ enable()
+ else:
+ disable()
+
+
+func enable():
+ visible = true
+ process_mode = Node.PROCESS_MODE_INHERIT
+
+
+func disable():
+ visible = false
+ process_mode = Node.PROCESS_MODE_DISABLED