From 276b7664bd4a475a3ca93a682c16b49c504c58f7 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 6 May 2024 16:30:46 +0200 Subject: update --- Scenes/Entities/Objects/BaseDoor.gd | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Scenes/Entities/Objects/BaseDoor.gd (limited to 'Scenes/Entities/Objects/BaseDoor.gd') 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 -- cgit v1.2.3