diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor.tscn
index b5096d4..8e20625 100644
--- a/DungeonShooting_Godot/prefab/map/RoomDoor.tscn
+++ b/DungeonShooting_Godot/prefab/map/RoomDoor.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=9 format=3 uid="uid://dl62yuh5q656a"]
+[gd_scene load_steps=10 format=3 uid="uid://dl62yuh5q656a"]
[ext_resource type="Script" path="res://src/framework/activity/ActivityObjectTemplate.cs" id="1_8es7a"]
[ext_resource type="Shader" path="res://resource/materlal/Blend.gdshader" id="2_d8jnk"]
@@ -20,11 +20,18 @@
atlas = ExtResource("3_knmoy")
region = Rect2(32, 0, 32, 32)
+[sub_resource type="AtlasTexture" id="AtlasTexture_j20kt"]
+atlas = ExtResource("3_knmoy")
+region = Rect2(32, 32, 16, 48)
+
[sub_resource type="SpriteFrames" id="SpriteFrames_ugstb"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wfl7i")
+}, {
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_j20kt")
}],
"loop": true,
"name": &"default",
@@ -32,7 +39,7 @@
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_xgcls"]
-size = Vector2(32, 16)
+size = Vector2(32, 23)
[node name="RoomDoor" type="Node"]
script = ExtResource("1_8es7a")
@@ -42,12 +49,13 @@
[node name="ShadowSprite" type="Sprite2D" parent="."]
z_index = -1
material = SubResource("ShaderMaterial_x5aop")
+position = Vector2(0, 8)
[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."]
material = SubResource("ShaderMaterial_f8vun")
-position = Vector2(0, -24)
+position = Vector2(0, -8)
sprite_frames = SubResource("SpriteFrames_ugstb")
[node name="Collision" type="CollisionShape2D" parent="."]
-position = Vector2(0, -16)
+position = Vector2(0, -3.5)
shape = SubResource("RectangleShape2D_xgcls")
diff --git a/DungeonShooting_Godot/resource/sprite/map/door1_down.png b/DungeonShooting_Godot/resource/sprite/map/door1_down.png
index 7e21474..a1fab70 100644
--- a/DungeonShooting_Godot/resource/sprite/map/door1_down.png
+++ b/DungeonShooting_Godot/resource/sprite/map/door1_down.png
Binary files differ
diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres
index 1b99d44..43cefea 100644
--- a/DungeonShooting_Godot/resource/theme/mainTheme.tres
+++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres
@@ -352,7 +352,7 @@
[sub_resource type="ImageTexture" id="58"]
-[sub_resource type="Image" id="Image_3d1h1"]
+[sub_resource type="Image" id="Image_51l8c"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@@ -362,7 +362,7 @@
}
[sub_resource type="ImageTexture" id="60"]
-image = SubResource("Image_3d1h1")
+image = SubResource("Image_51l8c")
[sub_resource type="StyleBoxTexture" id="61"]
content_margin_left = 2.0
@@ -372,7 +372,7 @@
texture = SubResource("60")
region_rect = Rect2(0, 0, 12, 12)
-[sub_resource type="Image" id="Image_0b41i"]
+[sub_resource type="Image" id="Image_hywip"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@@ -382,7 +382,7 @@
}
[sub_resource type="ImageTexture" id="63"]
-image = SubResource("Image_0b41i")
+image = SubResource("Image_hywip")
[sub_resource type="StyleBoxTexture" id="64"]
content_margin_left = 2.0
@@ -392,7 +392,7 @@
texture = SubResource("63")
region_rect = Rect2(0, 0, 12, 12)
-[sub_resource type="Image" id="Image_1dbrq"]
+[sub_resource type="Image" id="Image_l16ej"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@@ -402,7 +402,7 @@
}
[sub_resource type="ImageTexture" id="66"]
-image = SubResource("Image_1dbrq")
+image = SubResource("Image_l16ej")
[sub_resource type="StyleBoxTexture" id="67"]
content_margin_left = 2.0
@@ -412,7 +412,7 @@
texture = SubResource("66")
region_rect = Rect2(0, 0, 12, 12)
-[sub_resource type="Image" id="Image_5kk6x"]
+[sub_resource type="Image" id="Image_fsc06"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@@ -422,7 +422,7 @@
}
[sub_resource type="ImageTexture" id="69"]
-image = SubResource("Image_5kk6x")
+image = SubResource("Image_fsc06")
[sub_resource type="StyleBoxTexture" id="70"]
content_margin_left = 0.0
@@ -446,7 +446,7 @@
content_margin_right = 4.0
content_margin_bottom = 4.0
-[sub_resource type="Image" id="Image_1w8o8"]
+[sub_resource type="Image" id="Image_85j5h"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@@ -456,7 +456,7 @@
}
[sub_resource type="ImageTexture" id="56"]
-image = SubResource("Image_1w8o8")
+image = SubResource("Image_85j5h")
[sub_resource type="StyleBoxFlat" id="57"]
content_margin_left = 6.0
diff --git a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs
index 35bf2d9..0d581c1 100644
--- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs
+++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs
@@ -42,11 +42,11 @@
//房间横轴分散程度
private float _roomHorizontalMinDispersion = 0f;
- private float _roomHorizontalMaxDispersion = 0.9f;
+ private float _roomHorizontalMaxDispersion = 0.7f;
//房间纵轴分散程度
private float _roomVerticalMinDispersion = 0f;
- private float _roomVerticalMaxDispersion = 0.9f;
+ private float _roomVerticalMaxDispersion = 0.7f;
//区域限制
private bool _enableLimitRange = true;
diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs
index 5054245..0c28ee4 100644
--- a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs
+++ b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs
@@ -7,28 +7,6 @@
///
public class DungeonTile
{
- ///
- /// TileMap 底板的层级
- ///
- public const int FloorMapLayer = 0;
- ///
- /// TileMap 中层的层级
- ///
- public const int MiddleMapLayer = 1;
- ///
- /// TileMap 上层的层级
- ///
- public const int TopMapLayer = 2;
- ///
- /// 连接房间的过道的地板层级
- ///
- public const int AisleFloorMapLayer = 3;
-
- ///
- /// 配置层级的自定义数据名称
- ///
- public const string CustomTileLayerName = "TileLayer";
-
//--------------------- 导航 -------------------------
//已经标记过的点
@@ -72,24 +50,24 @@
//铺房间
if (roomInfo.RoomSplit == null)
{
- FillRect(FloorMapLayer, config.Floor, roomInfo.Position + Vector2.One,
+ FillRect(GameConfig.FloorMapLayer, config.Floor, roomInfo.Position + Vector2.One,
roomInfo.Size - new Vector2(2, 2));
- FillRect(TopMapLayer, config.IN_LT, roomInfo.Position, Vector2.One);
- FillRect(TopMapLayer, config.L, roomInfo.Position + new Vector2(0, 1),
+ FillRect(GameConfig.TopMapLayer, config.IN_LT, roomInfo.Position, Vector2.One);
+ FillRect(GameConfig.TopMapLayer, config.L, roomInfo.Position + new Vector2(0, 1),
new Vector2(1, roomInfo.Size.Y - 2));
- FillRect(TopMapLayer, config.IN_LB, roomInfo.Position + new Vector2(0, roomInfo.Size.Y - 1),
+ FillRect(GameConfig.TopMapLayer, config.IN_LB, roomInfo.Position + new Vector2(0, roomInfo.Size.Y - 1),
new Vector2(1, 1));
- FillRect(TopMapLayer, config.B, roomInfo.Position + new Vector2(1, roomInfo.Size.Y - 1),
+ FillRect(GameConfig.TopMapLayer, config.B, roomInfo.Position + new Vector2(1, roomInfo.Size.Y - 1),
new Vector2(roomInfo.Size.X - 2, 1));
- FillRect(TopMapLayer, config.IN_RB,
+ FillRect(GameConfig.TopMapLayer, config.IN_RB,
roomInfo.Position + new Vector2(roomInfo.Size.X - 1, roomInfo.Size.Y - 1),
Vector2.One);
- FillRect(TopMapLayer, config.R, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 1),
+ FillRect(GameConfig.TopMapLayer, config.R, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 1),
new Vector2(1, roomInfo.Size.Y - 2));
- FillRect(TopMapLayer, config.IN_RT, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 0),
+ FillRect(GameConfig.TopMapLayer, config.IN_RT, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 0),
Vector2.One);
- FillRect(MiddleMapLayer, config.T, roomInfo.Position + Vector2.Right,
+ FillRect(GameConfig.MiddleMapLayer, config.T, roomInfo.Position + Vector2.Right,
new Vector2(roomInfo.Size.X - 2, 1));
}
else
@@ -125,16 +103,16 @@
//获取自定义层级
// var customData = tileInstance.GetCellTileData(0, coords).GetCustomData(CustomTileLayerName);
// var layer = customData.AsInt32();
- // layer = Mathf.Clamp(layer, FloorMapLayer, TopMapLayer);
+ // layer = Mathf.Clamp(layer, GameConfig.FloorMapLayer, GameConfig.TopMapLayer);
- var layer = FloorMapLayer;
+ var layer = GameConfig.FloorMapLayer;
if (config.MiddleLayerAtlasCoords.Contains(atlasCoords))
{
- layer = MiddleMapLayer;
+ layer = GameConfig.MiddleMapLayer;
}
else if (config.TopLayerAtlasCoords.Contains(atlasCoords))
{
- layer = TopMapLayer;
+ layer = GameConfig.TopMapLayer;
}
_tileRoot.SetCell(layer, new Vector2I(roomInfo.Position.X + i, roomInfo.Position.Y + j),
@@ -286,7 +264,7 @@
break;
}
- FillRect(AisleFloorMapLayer, config.Floor, doorInfo.Cross + Vector2.One,
+ FillRect(GameConfig.AisleFloorMapLayer, config.Floor, doorInfo.Cross + Vector2.One,
new Vector2(GameConfig.CorridorWidth - 2, GameConfig.CorridorWidth - 2));
//墙壁, 0横向, 1纵向
@@ -319,50 +297,50 @@
if ((doorDir1 == DoorDirection.N && doorDir2 == DoorDirection.E) || //↑→
(doorDir2 == DoorDirection.N && doorDir1 == DoorDirection.E))
{
- FillRect(TopMapLayer, config.OUT_RT,
+ FillRect(GameConfig.TopMapLayer, config.OUT_RT,
doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1),
Vector2.One);
- FillRect(TopMapLayer, config.IN_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0),
+ FillRect(GameConfig.TopMapLayer, config.IN_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0),
Vector2.One);
- FillRect(MiddleMapLayer, config.T, doorInfo.Cross, new Vector2(GameConfig.CorridorWidth - 1, 1));
- FillRect(TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 1),
+ FillRect(GameConfig.MiddleMapLayer, config.T, doorInfo.Cross, new Vector2(GameConfig.CorridorWidth - 1, 1));
+ FillRect(GameConfig.TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 1),
new Vector2(1, GameConfig.CorridorWidth - 1));
}
else if ((doorDir1 == DoorDirection.E && doorDir2 == DoorDirection.S) || //→↓
(doorDir2 == DoorDirection.E && doorDir1 == DoorDirection.S))
{
- FillRect(MiddleMapLayer, config.OUT_RB, doorInfo.Cross, Vector2.One);
- FillRect(TopMapLayer, config.IN_RB,
+ FillRect(GameConfig.MiddleMapLayer, config.OUT_RB, doorInfo.Cross, Vector2.One);
+ FillRect(GameConfig.TopMapLayer, config.IN_RB,
doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1,
GameConfig.CorridorWidth - 1),
Vector2.One);
- FillRect(TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0),
+ FillRect(GameConfig.TopMapLayer, config.R, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0),
new Vector2(1, GameConfig.CorridorWidth - 1));
- FillRect(TopMapLayer, config.B, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1),
+ FillRect(GameConfig.TopMapLayer, config.B, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1),
new Vector2(GameConfig.CorridorWidth - 1, 1));
}
else if ((doorDir1 == DoorDirection.S && doorDir2 == DoorDirection.W) || //↓←
(doorDir2 == DoorDirection.S && doorDir1 == DoorDirection.W))
{
- FillRect(MiddleMapLayer, config.OUT_LB,
+ FillRect(GameConfig.MiddleMapLayer, config.OUT_LB,
doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One);
- FillRect(TopMapLayer, config.IN_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1),
+ FillRect(GameConfig.TopMapLayer, config.IN_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1),
Vector2.One);
- FillRect(TopMapLayer, config.L, doorInfo.Cross, new Vector2(1, GameConfig.CorridorWidth - 1));
- FillRect(TopMapLayer, config.B, doorInfo.Cross + new Vector2(1, GameConfig.CorridorWidth - 1),
+ FillRect(GameConfig.TopMapLayer, config.L, doorInfo.Cross, new Vector2(1, GameConfig.CorridorWidth - 1));
+ FillRect(GameConfig.TopMapLayer, config.B, doorInfo.Cross + new Vector2(1, GameConfig.CorridorWidth - 1),
new Vector2(GameConfig.CorridorWidth - 1, 1));
}
else if ((doorDir1 == DoorDirection.W && doorDir2 == DoorDirection.N) || //←↑
(doorDir2 == DoorDirection.W && doorDir1 == DoorDirection.N))
{
- FillRect(TopMapLayer, config.OUT_LT,
+ FillRect(GameConfig.TopMapLayer, config.OUT_LT,
doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1,
GameConfig.CorridorWidth - 1),
Vector2.One);
- FillRect(TopMapLayer, config.IN_LT, doorInfo.Cross, Vector2.One);
- FillRect(MiddleMapLayer, config.T, doorInfo.Cross + new Vector2(1, 0),
+ FillRect(GameConfig.TopMapLayer, config.IN_LT, doorInfo.Cross, Vector2.One);
+ FillRect(GameConfig.MiddleMapLayer, config.T, doorInfo.Cross + new Vector2(1, 0),
new Vector2(GameConfig.CorridorWidth - 1, 1));
- FillRect(TopMapLayer, config.L, doorInfo.Cross + new Vector2(0, 1),
+ FillRect(GameConfig.TopMapLayer, config.L, doorInfo.Cross + new Vector2(0, 1),
new Vector2(1, GameConfig.CorridorWidth - 1));
}
@@ -370,19 +348,19 @@
switch (doorDir1)
{
case DoorDirection.E: //→
- ClearRect(TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1),
+ ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1),
new Vector2(1, rect.Size.Y - 2));
break;
case DoorDirection.W: //←
- ClearRect(TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1),
+ ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1),
new Vector2(1, rect.Size.Y - 2));
break;
case DoorDirection.S: //↓
- ClearRect(TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1),
+ ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1),
new Vector2(rect.Size.X - 2, 1));
break;
case DoorDirection.N: //↑
- ClearRect(MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2),
+ ClearRect(GameConfig.MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2),
new Vector2(rect.Size.X - 2, 1));
break;
}
@@ -390,19 +368,19 @@
switch (doorDir2)
{
case DoorDirection.E: //→
- ClearRect(TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1),
+ ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1),
new Vector2(1, rect2.Size.Y - 2));
break;
case DoorDirection.W: //←
- ClearRect(TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1),
+ ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1),
new Vector2(1, rect2.Size.Y - 2));
break;
case DoorDirection.S: //↓
- ClearRect(TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1),
+ ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1),
new Vector2(rect2.Size.X - 2, 1));
break;
case DoorDirection.N: //↑
- ClearRect(MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0),
+ ClearRect(GameConfig.MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0),
new Vector2(rect2.Size.X - 2, 1));
break;
}
@@ -438,36 +416,36 @@
//横向过道
private void FullHorizontalAisle(AutoTileConfig config, Rect2 rect)
{
- FillRect(AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(0, 1), rect.Size - new Vector2(0, 2));
- FillRect(MiddleMapLayer, config.T, rect.Position, new Vector2(rect.Size.X, 1));
- FillRect(TopMapLayer, config.B, rect.Position + new Vector2(0, rect.Size.Y - 1), new Vector2(rect.Size.X, 1));
+ FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(0, 1), rect.Size - new Vector2(0, 2));
+ FillRect(GameConfig.MiddleMapLayer, config.T, rect.Position, new Vector2(rect.Size.X, 1));
+ FillRect(GameConfig.TopMapLayer, config.B, rect.Position + new Vector2(0, rect.Size.Y - 1), new Vector2(rect.Size.X, 1));
}
//纵向过道
private void FullVerticalAisle(AutoTileConfig config, Rect2 rect)
{
- FillRect(AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, 0), rect.Size - new Vector2(2, 0));
- FillRect(TopMapLayer, config.L, rect.Position, new Vector2(1, rect.Size.Y));
- FillRect(TopMapLayer, config.R, rect.Position + new Vector2(rect.Size.X - 1, 0), new Vector2(1, rect.Size.Y));
+ FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, 0), rect.Size - new Vector2(2, 0));
+ FillRect(GameConfig.TopMapLayer, config.L, rect.Position, new Vector2(1, rect.Size.Y));
+ FillRect(GameConfig.TopMapLayer, config.R, rect.Position + new Vector2(rect.Size.X - 1, 0), new Vector2(1, rect.Size.Y));
}
//横向过道, 门朝右, 连接方向向左
private void FullHorizontalAisleLeft(AutoTileConfig config, Rect2 rect, RoomDoorInfo doorInfo = null)
{
//左
- ClearRect(TopMapLayer, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2));
+ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2));
if (doorInfo == null)
{
- FillRect(AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(-1, 1),
+ FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(-1, 1),
new Vector2(1, rect.Size.Y - 2));
}
else
{
- ClearRect(TopMapLayer, rect.Position + new Vector2(-1, 0), Vector2.One);
- FillRect(MiddleMapLayer, config.OUT_LB, rect.Position + new Vector2(-1, 0), Vector2.One);
- FillRect(TopMapLayer, config.OUT_LT, rect.Position + new Vector2(-1, 3), Vector2.One);
+ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(-1, 0), Vector2.One);
+ FillRect(GameConfig.MiddleMapLayer, config.OUT_LB, rect.Position + new Vector2(-1, 0), Vector2.One);
+ FillRect(GameConfig.TopMapLayer, config.OUT_LT, rect.Position + new Vector2(-1, 3), Vector2.One);
- FillRect(FloorMapLayer, config.Floor, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2));
+ FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2));
//生成门的导航区域
var x = rect.Position.X * GameConfig.TileCellSize;
var y = rect.Position.Y * GameConfig.TileCellSize;
@@ -490,18 +468,18 @@
private void FullHorizontalAisleRight(AutoTileConfig config, Rect2 rect, RoomDoorInfo doorInfo = null)
{
//右
- ClearRect(TopMapLayer, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2));
+ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2));
if (doorInfo == null)
{
- FillRect(AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2));
+ FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2));
}
else
{
- ClearRect(TopMapLayer, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One);
- FillRect(MiddleMapLayer, config.OUT_RB, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One);
- FillRect(TopMapLayer, config.OUT_RT, rect.Position + new Vector2(rect.Size.X, 3), Vector2.One);
+ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One);
+ FillRect(GameConfig.MiddleMapLayer, config.OUT_RB, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One);
+ FillRect(GameConfig.TopMapLayer, config.OUT_RT, rect.Position + new Vector2(rect.Size.X, 3), Vector2.One);
- FillRect(FloorMapLayer, config.Floor, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2));
+ FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2));
//生成门的导航区域
var x = rect.Position.X * GameConfig.TileCellSize;
var y = rect.Position.Y * GameConfig.TileCellSize;
@@ -524,18 +502,18 @@
private void FullVerticalAisleUp(AutoTileConfig config, Rect2 rect, RoomDoorInfo doorInfo = null)
{
//上
- ClearRect(TopMapLayer, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1));
+ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1));
if (doorInfo == null)
{
- FillRect(AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1),
+ FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1),
new Vector2(rect.Size.X - 2, 1));
}
else
{
- FillRect(TopMapLayer, config.OUT_RT, rect.Position + new Vector2(0, -1), Vector2.One);
- FillRect(TopMapLayer, config.OUT_LT, rect.Position + new Vector2(3, -1), Vector2.One);
+ FillRect(GameConfig.TopMapLayer, config.OUT_RT, rect.Position + new Vector2(0, -1), Vector2.One);
+ FillRect(GameConfig.TopMapLayer, config.OUT_LT, rect.Position + new Vector2(3, -1), Vector2.One);
- FillRect(FloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1));
+ FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1));
//生成门的导航区域
var x = rect.Position.X * GameConfig.TileCellSize;
var y = rect.Position.Y * GameConfig.TileCellSize;
@@ -558,17 +536,17 @@
private void FullVerticalAisleDown(AutoTileConfig config, Rect2 rect, RoomDoorInfo doorInfo = null)
{
//下
- ClearRect(MiddleMapLayer, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1));
+ ClearRect(GameConfig.MiddleMapLayer, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1));
if (doorInfo == null)
{
- FillRect(AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1));
+ FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1));
}
else
{
- FillRect(MiddleMapLayer, config.OUT_RB, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One);
- FillRect(MiddleMapLayer, config.OUT_LB, rect.Position + new Vector2(3, rect.Size.Y), Vector2.One);
+ FillRect(GameConfig.MiddleMapLayer, config.OUT_RB, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One);
+ FillRect(GameConfig.MiddleMapLayer, config.OUT_LB, rect.Position + new Vector2(3, rect.Size.Y), Vector2.One);
- FillRect(FloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1));
+ FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1));
//生成门的导航区域
var x = rect.Position.X * GameConfig.TileCellSize;
var y = rect.Position.Y * GameConfig.TileCellSize;
diff --git a/DungeonShooting_Godot/src/game/GameConfig.cs b/DungeonShooting_Godot/src/game/GameConfig.cs
index 1afcb77..0591a7d 100644
--- a/DungeonShooting_Godot/src/game/GameConfig.cs
+++ b/DungeonShooting_Godot/src/game/GameConfig.cs
@@ -50,4 +50,26 @@
/// ui代码根路径
///
public const string UiCodeDir = "src/game/ui/";
+
+ ///
+ /// TileMap 底板的层级
+ ///
+ public const int FloorMapLayer = 0;
+ ///
+ /// TileMap 中层的层级
+ ///
+ public const int MiddleMapLayer = 1;
+ ///
+ /// TileMap 上层的层级
+ ///
+ public const int TopMapLayer = 2;
+ ///
+ /// 连接房间的过道的地板层级
+ ///
+ public const int AisleFloorMapLayer = 3;
+
+ ///
+ /// 配置层级的自定义数据名称
+ ///
+ public const string CustomTileLayerName = "TileLayer";
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/room/RoomDoor.cs b/DungeonShooting_Godot/src/game/room/RoomDoor.cs
index 369eedd..d703cfe 100644
--- a/DungeonShooting_Godot/src/game/room/RoomDoor.cs
+++ b/DungeonShooting_Godot/src/game/room/RoomDoor.cs
@@ -1,4 +1,6 @@
+using Godot;
+
///
/// 房间的门, 门有两种状态, 打开和关闭
///
@@ -28,16 +30,29 @@
switch (doorInfo.Direction)
{
case DoorDirection.E:
- RotationDegrees = 90;
+ //RotationDegrees = 90;
+ AnimatedSprite.Frame = 1;
+ AnimatedSprite.Position = Vector2.Zero;
+ Collision.Position = Vector2.Zero;
+ var collisionShape = (RectangleShape2D)Collision.Shape;
+ collisionShape.Size = new Vector2(14, 32);
break;
case DoorDirection.W:
- RotationDegrees = 270;
+ //RotationDegrees = 270;
+ AnimatedSprite.Frame = 1;
+ AnimatedSprite.Position = Vector2.Zero;
+ Collision.Position = Vector2.Zero;
+ var collisionShape2 = (RectangleShape2D)Collision.Shape;
+ collisionShape2.Size = new Vector2(14, 32);
break;
case DoorDirection.S:
- RotationDegrees = 180;
+ //RotationDegrees = 180;
+ AnimatedSprite.Position = new Vector2(0, -8);
break;
case DoorDirection.N:
- RotationDegrees = 0;
+ ZIndex = GameConfig.MiddleMapLayer;
+ AnimatedSprite.Position = new Vector2(0, -8);
+ //RotationDegrees = 0;
break;
}
}
diff --git a/DungeonShooting_Godot/src/game/room/RoomManager.cs b/DungeonShooting_Godot/src/game/room/RoomManager.cs
index 93a5d5a..cfa3ba7 100644
--- a/DungeonShooting_Godot/src/game/room/RoomManager.cs
+++ b/DungeonShooting_Godot/src/game/room/RoomManager.cs
@@ -77,7 +77,7 @@
_dungeonTile.AutoFillRoomTile(_autoTileConfig, _dungeonGenerator.StartRoom);
//生成寻路网格, 这一步操作只生成过道的导航
- _dungeonTile.GenerateNavigationPolygon(DungeonTile.AisleFloorMapLayer);
+ _dungeonTile.GenerateNavigationPolygon(GameConfig.AisleFloorMapLayer);
//挂载过道导航区域
_dungeonTile.MountNavigationPolygon(this);
//过道导航区域数据
@@ -230,16 +230,16 @@
switch (doorInfo.Direction)
{
case DoorDirection.E:
- offset = new Vector2(-0.5f, 2);
- break;
- case DoorDirection.W:
offset = new Vector2(0.5f, 2);
break;
+ case DoorDirection.W:
+ offset = new Vector2(-0.5f, 2);
+ break;
case DoorDirection.S:
- offset = new Vector2(2f, -0.5f);
+ offset = new Vector2(2f, 1.5f);
break;
case DoorDirection.N:
- offset = new Vector2(2f, 0.5f);
+ offset = new Vector2(2f, -0.5f);
break;
default: offset = new Vector2();
break;