summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Scenes/Entities/Objects')
-rw-r--r--Scenes/Entities/Objects/BaseDoor.gd21
-rw-r--r--Scenes/Entities/Objects/BaseDoor.tscn20
-rw-r--r--Scenes/Entities/Objects/Wood.tscn1
3 files changed, 42 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
diff --git a/Scenes/Entities/Objects/BaseDoor.tscn b/Scenes/Entities/Objects/BaseDoor.tscn
new file mode 100644
index 0000000..845c35d
--- /dev/null
+++ b/Scenes/Entities/Objects/BaseDoor.tscn
@@ -0,0 +1,20 @@
+[gd_scene load_steps=4 format=3 uid="uid://bkb3qv5y0sp8d"]
+
+[ext_resource type="Texture2D" uid="uid://br534x61nyy8k" path="res://Assets/Stages/core_indoor_walls.png" id="1_jqsa6"]
+[ext_resource type="Script" path="res://Scenes/Entities/Objects/BaseDoor.gd" id="1_silnh"]
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_5r3qy"]
+size = Vector2(16, 16)
+
+[node name="BaseDoor" type="StaticBody2D"]
+collision_layer = 8
+collision_mask = 0
+script = ExtResource("1_silnh")
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+shape = SubResource("RectangleShape2D_5r3qy")
+
+[node name="Sprite2D" type="Sprite2D" parent="."]
+texture = ExtResource("1_jqsa6")
+region_enabled = true
+region_rect = Rect2(560, 96, 16, 16)
diff --git a/Scenes/Entities/Objects/Wood.tscn b/Scenes/Entities/Objects/Wood.tscn
index d9cd90e..c81a498 100644
--- a/Scenes/Entities/Objects/Wood.tscn
+++ b/Scenes/Entities/Objects/Wood.tscn
@@ -4,6 +4,7 @@
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1je2f"]
radius = 7.0
+height = 28.0
[node name="Wood" type="StaticBody2D"]
z_index = -1