diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn index dae2606..324ceee 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn @@ -31,7 +31,7 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_opsb6"] resource_local_to_scene = true -size = Vector2(14, 40) +size = Vector2(20, 40) [node name="RoomDoor_N" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] script = ExtResource("1_4c6sw") @@ -42,22 +42,22 @@ [node name="ShadowSprite" type="Sprite2D" parent="."] z_index = -1 material = SubResource("ShaderMaterial_yvwpk") +position = Vector2(-8, 0) [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_t4ayq") -position = Vector2(20, 10) +position = Vector2(13, 10) sprite_frames = ExtResource("3_pjvd8") animation = &"closeDoor" autoplay = "default" [node name="AnimatedSpriteDown" type="AnimatedSprite2D" parent="."] -visible = false material = SubResource("ShaderMaterial_t4ayq") -position = Vector2(9, -10) +position = Vector2(-9, 2) sprite_frames = ExtResource("4_ln8k4") -animation = &"closeDoor" autoplay = "default" +offset = Vector2(0.5, 2.08165e-12) [node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(0, 13) +position = Vector2(-3, 13) shape = SubResource("RectangleShape2D_opsb6") diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn index 2ea8416..234b9f3 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn @@ -10,7 +10,7 @@ shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false +shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false shader_parameter/outline_use_blend = true @@ -30,7 +30,7 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_opsb6"] resource_local_to_scene = true -size = Vector2(32, 23) +size = Vector2(32, 20) [node name="RoomDoor_N" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] script = ExtResource("1_220be") @@ -48,5 +48,5 @@ autoplay = "default" [node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(0, -3.5) +position = Vector2(0, -1) shape = SubResource("RectangleShape2D_opsb6") diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn index 45cf14d..871fae5 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn @@ -30,7 +30,7 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_opsb6"] resource_local_to_scene = true -size = Vector2(32, 23) +size = Vector2(32, 20) [node name="RoomDoor_N" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] script = ExtResource("1_f3qbq") @@ -41,12 +41,14 @@ [node name="ShadowSprite" type="Sprite2D" parent="."] z_index = -1 material = SubResource("ShaderMaterial_yvwpk") +position = Vector2(0, -16) [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_t4ayq") +position = Vector2(0, -16) sprite_frames = ExtResource("3_vbbxp") autoplay = "default" [node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(0, -3.5) +position = Vector2(0, -2) shape = SubResource("RectangleShape2D_opsb6") diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn index 7bb1e78..cda2a8e 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://src/game/room/RoomDoor.cs" id="1_agux2"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_wx2w3"] [ext_resource type="SpriteFrames" uid="uid://3ps6h2f54qa5" path="res://resource/spriteFrames/other/RoomDoor_E_Up.tres" id="3_jquy0"] -[ext_resource type="SpriteFrames" uid="uid://qq3h0mh4r12i" path="res://resource/spriteFrames/other/RoomDoor_W_Down.tres" id="4_dnjb6"] +[ext_resource type="SpriteFrames" uid="uid://b34tddsmqnj8s" path="res://resource/spriteFrames/other/RoomDoor_E_Down.tres" id="4_6gcqk"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_yvwpk"] resource_local_to_scene = true @@ -31,7 +31,7 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_2ko2r"] resource_local_to_scene = true -size = Vector2(14, 40) +size = Vector2(20, 40) [node name="RoomDoor_N" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] script = ExtResource("1_agux2") @@ -42,25 +42,24 @@ [node name="ShadowSprite" type="Sprite2D" parent="."] z_index = -1 material = SubResource("ShaderMaterial_yvwpk") +position = Vector2(8, 0) [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_t4ayq") -position = Vector2(-21, 10) +position = Vector2(-13, 10) scale = Vector2(-1, 1) sprite_frames = ExtResource("3_jquy0") animation = &"closeDoor" autoplay = "default" [node name="AnimatedSpriteDown" type="AnimatedSprite2D" parent="."] -visible = false material = SubResource("ShaderMaterial_t4ayq") -position = Vector2(-9, -10) -sprite_frames = ExtResource("4_dnjb6") -animation = &"openDoor" +position = Vector2(8, 2) +scale = Vector2(-1, 1) +sprite_frames = ExtResource("4_6gcqk") autoplay = "default" -frame = 4 -frame_progress = 1.0 +offset = Vector2(-0.5, 2.08165e-12) [node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(2.08165e-12, 13) +position = Vector2(2, 13) shape = SubResource("RectangleShape2D_2ko2r") diff --git a/DungeonShooting_Godot/resource/sprite/map/door_close.png b/DungeonShooting_Godot/resource/sprite/map/door_close.png index 527260c..38897a7 100644 --- a/DungeonShooting_Godot/resource/sprite/map/door_close.png +++ b/DungeonShooting_Godot/resource/sprite/map/door_close.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/door_up.png b/DungeonShooting_Godot/resource/sprite/map/door_up.png new file mode 100644 index 0000000..9ff2ee4 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/door_up.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/door_up.png.import b/DungeonShooting_Godot/resource/sprite/map/door_up.png.import new file mode 100644 index 0000000..b018503 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/door_up.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://gf8wefrp284o" +path="res://.godot/imported/door_up.png-259e579b5cfa6c19dca2feec2294583b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/door_up.png" +dest_files=["res://.godot/imported/door_up.png-259e579b5cfa6c19dca2feec2294583b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_E_Down.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_E_Down.tres index 9669b44..fbcb708 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_E_Down.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_E_Down.tres @@ -1,98 +1,14 @@ -[gd_resource type="SpriteFrames" load_steps=13 format=3 uid="uid://b34tddsmqnj8s"] +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://b34tddsmqnj8s"] -[ext_resource type="Texture2D" uid="uid://f7d7qsdxqx28" path="res://resource/sprite/map/door.png" id="1_nc77d"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_4o2e1"] -atlas = ExtResource("1_nc77d") -region = Rect2(128, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_d1gjl"] -atlas = ExtResource("1_nc77d") -region = Rect2(96, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_g4rm7"] -atlas = ExtResource("1_nc77d") -region = Rect2(64, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_5d5bq"] -atlas = ExtResource("1_nc77d") -region = Rect2(32, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ekma7"] -atlas = ExtResource("1_nc77d") -region = Rect2(0, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7y01b"] -atlas = ExtResource("1_nc77d") -region = Rect2(128, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_jm1e2"] -atlas = ExtResource("1_nc77d") -region = Rect2(0, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_1bb60"] -atlas = ExtResource("1_nc77d") -region = Rect2(32, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_oylje"] -atlas = ExtResource("1_nc77d") -region = Rect2(64, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_truep"] -atlas = ExtResource("1_nc77d") -region = Rect2(96, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_lfr82"] -atlas = ExtResource("1_nc77d") -region = Rect2(128, 104, 32, 52) +[ext_resource type="Texture2D" uid="uid://gf8wefrp284o" path="res://resource/sprite/map/door_up.png" id="1_vlsx2"] [resource] animations = [{ "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_4o2e1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_d1gjl") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_g4rm7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_5d5bq") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ekma7") -}], -"loop": false, -"name": &"closeDoor", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_7y01b") +"texture": ExtResource("1_vlsx2") }], "loop": false, "name": &"default", "speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_jm1e2") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_1bb60") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_oylje") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_truep") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_lfr82") -}], -"loop": false, -"name": &"openDoor", -"speed": 10.0 }] diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_S.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_S.tres deleted file mode 100644 index 5988cc3..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_S.tres +++ /dev/null @@ -1,98 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=13 format=3 uid="uid://ciqijjxup5356"] - -[ext_resource type="Texture2D" uid="uid://f7d7qsdxqx28" path="res://resource/sprite/map/door.png" id="1_46oik"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_w2vr1"] -atlas = ExtResource("1_46oik") -region = Rect2(128, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_3akio"] -atlas = ExtResource("1_46oik") -region = Rect2(96, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_xxpwm"] -atlas = ExtResource("1_46oik") -region = Rect2(64, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vjx8u"] -atlas = ExtResource("1_46oik") -region = Rect2(32, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_clyvp"] -atlas = ExtResource("1_46oik") -region = Rect2(0, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_1vfst"] -atlas = ExtResource("1_46oik") -region = Rect2(128, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8wrb5"] -atlas = ExtResource("1_46oik") -region = Rect2(0, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_nwt0b"] -atlas = ExtResource("1_46oik") -region = Rect2(32, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ohokj"] -atlas = ExtResource("1_46oik") -region = Rect2(64, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_wqsd1"] -atlas = ExtResource("1_46oik") -region = Rect2(96, 0, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_i6sro"] -atlas = ExtResource("1_46oik") -region = Rect2(128, 0, 32, 52) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_w2vr1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_3akio") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_xxpwm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vjx8u") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_clyvp") -}], -"loop": false, -"name": &"closeDoor", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_1vfst") -}], -"loop": false, -"name": &"default", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_8wrb5") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_nwt0b") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ohokj") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_wqsd1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_i6sro") -}], -"loop": false, -"name": &"openDoor", -"speed": 10.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_W_Down.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_W_Down.tres deleted file mode 100644 index 86fc6ad..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_W_Down.tres +++ /dev/null @@ -1,98 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=13 format=3 uid="uid://qq3h0mh4r12i"] - -[ext_resource type="Texture2D" uid="uid://f7d7qsdxqx28" path="res://resource/sprite/map/door.png" id="1_b4js3"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_526no"] -atlas = ExtResource("1_b4js3") -region = Rect2(288, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_84kmd"] -atlas = ExtResource("1_b4js3") -region = Rect2(256, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_km4i6"] -atlas = ExtResource("1_b4js3") -region = Rect2(224, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_wtul1"] -atlas = ExtResource("1_b4js3") -region = Rect2(192, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vbu5n"] -atlas = ExtResource("1_b4js3") -region = Rect2(160, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_yxx5v"] -atlas = ExtResource("1_b4js3") -region = Rect2(288, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_4ncdo"] -atlas = ExtResource("1_b4js3") -region = Rect2(160, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_bxfu1"] -atlas = ExtResource("1_b4js3") -region = Rect2(192, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8082a"] -atlas = ExtResource("1_b4js3") -region = Rect2(224, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mjuqg"] -atlas = ExtResource("1_b4js3") -region = Rect2(256, 104, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rc634"] -atlas = ExtResource("1_b4js3") -region = Rect2(288, 104, 32, 52) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_526no") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_84kmd") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_km4i6") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_wtul1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vbu5n") -}], -"loop": false, -"name": &"closeDoor", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_yxx5v") -}], -"loop": false, -"name": &"default", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_4ncdo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_bxfu1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8082a") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mjuqg") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rc634") -}], -"loop": false, -"name": &"openDoor", -"speed": 10.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_W_Up.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_W_Up.tres deleted file mode 100644 index 6c18e9e..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_W_Up.tres +++ /dev/null @@ -1,98 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=13 format=3 uid="uid://cpdt5ywrsruu3"] - -[ext_resource type="Texture2D" uid="uid://f7d7qsdxqx28" path="res://resource/sprite/map/door.png" id="2_klr41"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_skb20"] -atlas = ExtResource("2_klr41") -region = Rect2(288, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dk55p"] -atlas = ExtResource("2_klr41") -region = Rect2(256, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_78qdb"] -atlas = ExtResource("2_klr41") -region = Rect2(224, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_sqirq"] -atlas = ExtResource("2_klr41") -region = Rect2(192, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_c65nc"] -atlas = ExtResource("2_klr41") -region = Rect2(160, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6tswf"] -atlas = ExtResource("2_klr41") -region = Rect2(288, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_hg8wo"] -atlas = ExtResource("2_klr41") -region = Rect2(160, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_qkhur"] -atlas = ExtResource("2_klr41") -region = Rect2(192, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6rqcm"] -atlas = ExtResource("2_klr41") -region = Rect2(224, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_y0tub"] -atlas = ExtResource("2_klr41") -region = Rect2(256, 52, 32, 52) - -[sub_resource type="AtlasTexture" id="AtlasTexture_w8xe5"] -atlas = ExtResource("2_klr41") -region = Rect2(288, 52, 32, 52) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_skb20") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_dk55p") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_78qdb") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_sqirq") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_c65nc") -}], -"loop": false, -"name": &"closeDoor", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_6tswf") -}], -"loop": false, -"name": &"default", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_hg8wo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_qkhur") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6rqcm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_y0tub") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_w8xe5") -}], -"loop": false, -"name": &"openDoor", -"speed": 10.0 -}] diff --git a/DungeonShooting_Godot/src/game/room/RoomDoor.cs b/DungeonShooting_Godot/src/game/room/RoomDoor.cs index 2ad08f7..c8b8674 100644 --- a/DungeonShooting_Godot/src/game/room/RoomDoor.cs +++ b/DungeonShooting_Godot/src/game/room/RoomDoor.cs @@ -37,6 +37,7 @@ { _animatedDown = GetNode("AnimatedSpriteDown"); } + OpenDoorHandler(); } @@ -52,7 +53,7 @@ { AnimatedSprite.Play(AnimatorNames.OpenDoor); } - + if (_animatedDown != null && _animatedDown.SpriteFrames.HasAnimation(AnimatorNames.OpenDoor)) { _animatedDown.Play(AnimatorNames.OpenDoor); @@ -73,32 +74,14 @@ AnimatedSprite.Play(AnimatorNames.CloseDoor); } - if (_animatedDown != null && _animatedDown.SpriteFrames.HasAnimation(AnimatorNames.CloseDoor)) + if (_animatedDown != null) { - _animatedDown.Play(AnimatorNames.CloseDoor); + _animatedDown.Visible = false; } - //调整门的层级 - switch (Direction) + if (Direction == DoorDirection.E || Direction == DoorDirection.W) { - case DoorDirection.E: - if (_animatedDown != null) - { - _animatedDown.ZIndex = MapLayer.AutoTopLayer; - } - - break; - case DoorDirection.W: - if (_animatedDown != null) - { - _animatedDown.ZIndex = MapLayer.AutoTopLayer; - } - - break; - case DoorDirection.S: - break; - case DoorDirection.N: - break; + ZIndex = MapLayer.CustomMiddleLayer2; } } @@ -107,6 +90,15 @@ if (!IsClose && waitDisabledCollision) //开门动画播放完成 { waitDisabledCollision = false; + if (_animatedDown != null) + { + _animatedDown.Visible = true; + } + + if (Direction == DoorDirection.E || Direction == DoorDirection.W) + { + ZIndex = 0; + } OpenDoorHandler(); } } @@ -116,28 +108,5 @@ Collision.Disabled = true; //调整门的层级 //ZIndex = MapLayer.AutoFloorLayer; - - //调整门的层级 - switch (Direction) - { - case DoorDirection.E: - if (_animatedDown != null) - { - _animatedDown.ZIndex = MapLayer.AutoTopLayer; - } - - break; - case DoorDirection.W: - if (_animatedDown != null) - { - _animatedDown.ZIndex = MapLayer.AutoTopLayer; - } - - break; - case DoorDirection.S: - break; - case DoorDirection.N: - break; - } } } \ No newline at end of file