summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Objects/BaseDoor.gd
diff options
context:
space:
mode:
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