diff --git a/DungeonShooting_Godot/prefab/role/Role0001.tscn b/DungeonShooting_Godot/prefab/role/Role0001.tscn index a088659..d877f44 100644 --- a/DungeonShooting_Godot/prefab/role/Role0001.tscn +++ b/DungeonShooting_Godot/prefab/role/Role0001.tscn @@ -45,7 +45,6 @@ texture = ExtResource("3_vx7tr") [node name="AnimatedSprite" parent="." index="2"] -visible = false material = SubResource("ShaderMaterial_8hgu2") sprite_frames = ExtResource("4_galcc") animation = &"roll" @@ -53,6 +52,9 @@ [node name="HurtCollision" parent="HurtArea" index="0"] shape = SubResource("RectangleShape2D_ve262") +[node name="InteractiveArea" parent="." index="5"] +visible = true + [node name="AnimationPlayer" parent="." index="8"] libraries = { "": SubResource("AnimationLibrary_ka171") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn index 9a68dc5..503b43d 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn @@ -32,11 +32,10 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_7i6da"] size = Vector2(22, 8.25) -[node name="Weapon0001" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_ykl0r")] +[node name="Weapon0001" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_ykl0r")] script = ExtResource("2_t56pk") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -47,6 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_bj7y3") +position = Vector2(5, 1) sprite_frames = ExtResource("4_d5c81") [node name="ShellPoint" parent="AnimatedSprite" index="0"] @@ -55,9 +55,7 @@ [node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(15, -2) -[node name="GripPoint" parent="." index="2"] -position = Vector2(-5, -1) - -[node name="Collision" parent="." index="3"] -position = Vector2(0, -0.875) +[node name="Collision" parent="." index="2"] +visible = true +position = Vector2(5, 1) shape = SubResource("RectangleShape2D_7i6da") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn index 650bb05..184f949 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn @@ -30,13 +30,12 @@ shader_parameter/grey = 0.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_aymlx"] -size = Vector2(18, 6) +size = Vector2(18, 7) -[node name="Weapon0002" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_r50xc")] +[node name="Weapon0002" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_r50xc")] script = ExtResource("1_hgtyo") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -47,6 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_llqbm") +position = Vector2(7, -1) sprite_frames = ExtResource("3_4h3je") [node name="ShellPoint" parent="AnimatedSprite" index="0"] @@ -55,9 +55,7 @@ [node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(11.5, -2) -[node name="GripPoint" parent="." index="2"] -position = Vector2(-10, 1) - -[node name="Collision" parent="." index="3"] -position = Vector2(0, 1) +[node name="Collision" parent="." index="2"] +visible = true +position = Vector2(7, 0) shape = SubResource("RectangleShape2D_aymlx") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn index 66c4866..dee91f4 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn @@ -32,11 +32,10 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_tlu5a"] size = Vector2(12, 7) -[node name="Weapon0003" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_c17wt")] +[node name="Weapon0003" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_c17wt")] script = ExtResource("1_aeolk") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -47,6 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_kp0pp") +position = Vector2(4, 0) sprite_frames = ExtResource("3_upkjt") [node name="ShellPoint" parent="AnimatedSprite" index="0"] @@ -55,9 +55,7 @@ [node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(8, -2) -[node name="GripPoint" parent="." index="2"] -position = Vector2(-4, 0) - -[node name="Collision" parent="." index="3"] -position = Vector2(-1, 0) +[node name="Collision" parent="." index="2"] +visible = true +position = Vector2(4, 0) shape = SubResource("RectangleShape2D_tlu5a") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn index cbedbe7..9450803 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn @@ -14,6 +14,8 @@ 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 +shader_parameter/grey = 0.0 [sub_resource type="ShaderMaterial" id="ShaderMaterial_rtliw"] resource_local_to_scene = true @@ -24,15 +26,16 @@ 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 +shader_parameter/grey = 0.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_yks6x"] size = Vector2(26, 2) -[node name="Weapon0004" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_kg172")] +[node name="Weapon0004" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_kg172")] script = ExtResource("2_v1wer") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -43,6 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_rtliw") +position = Vector2(10, 1) sprite_frames = ExtResource("4_uymcs") [node name="ShellPoint" parent="AnimatedSprite" index="0"] @@ -51,11 +55,9 @@ [node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(12, -1) -[node name="GripPoint" parent="." index="2"] -position = Vector2(-12, -1) - -[node name="Collision" parent="." index="3"] -position = Vector2(-1, -1) +[node name="Collision" parent="." index="2"] +visible = true +position = Vector2(9, 0) shape = SubResource("RectangleShape2D_yks6x") [node name="HitArea" type="Area2D" parent="." index="4"] diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn index 4fc6f22..aa2b854 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn @@ -32,11 +32,10 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_opiwr"] size = Vector2(28, 8) -[node name="Weapon0005" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_lyhyf")] +[node name="Weapon0005" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_lyhyf")] script = ExtResource("1_3lu3r") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -47,6 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_irvr4") +position = Vector2(9, 0) sprite_frames = ExtResource("2_m3plc") [node name="ShellPoint" parent="AnimatedSprite" index="0"] @@ -55,9 +55,7 @@ [node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(20, -3.5) -[node name="GripPoint" parent="." index="2"] -position = Vector2(-9, 0) - -[node name="Collision" parent="." index="3"] -position = Vector2(-1, 0) +[node name="Collision" parent="." index="2"] +visible = true +position = Vector2(8, 0) shape = SubResource("RectangleShape2D_opiwr") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn index bbe0def..979066a 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn @@ -32,11 +32,10 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_iq77m"] size = Vector2(12, 8) -[node name="Weapon0006" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_kx4jd")] +[node name="Weapon0006" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_kx4jd")] script = ExtResource("1_5nx8j") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -47,6 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_fqjj0") +position = Vector2(3, 1) sprite_frames = ExtResource("2_j3sji") [node name="ShellPoint" parent="AnimatedSprite" index="0"] @@ -55,9 +55,7 @@ [node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(8, -2.5) -[node name="GripPoint" parent="." index="2"] -position = Vector2(-4, 1) - -[node name="Collision" parent="." index="3"] -position = Vector2(-1, 0) +[node name="Collision" parent="." index="2"] +visible = true +position = Vector2(2, 1) shape = SubResource("RectangleShape2D_iq77m") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn index fddc0a1..ab2e6a3 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn @@ -32,11 +32,10 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_4pn1i"] size = Vector2(20, 6) -[node name="Weapon0007" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_5xnlm")] +[node name="Weapon0007" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_5xnlm")] script = ExtResource("1_exwbu") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -47,6 +46,7 @@ [node name="AnimatedSprite" parent="." index="1"] material = SubResource("ShaderMaterial_277ni") +position = Vector2(4, 0) sprite_frames = ExtResource("3_ms2gs") [node name="ShellPoint" parent="AnimatedSprite" index="0"] @@ -55,8 +55,7 @@ [node name="FirePoint" parent="AnimatedSprite" index="1"] position = Vector2(13, -3) -[node name="GripPoint" parent="." index="2"] -position = Vector2(-6, 0) - -[node name="Collision" parent="." index="3"] +[node name="Collision" parent="." index="2"] +visible = true +position = Vector2(4, 0) shape = SubResource("RectangleShape2D_4pn1i") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0008.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0008.tscn index f43ac80..faf871a 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0008.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0008.tscn @@ -130,12 +130,11 @@ "reloading": SubResource("Animation_8xqs8") } -[node name="Weapon0008" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] +[node name="Weapon0008" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] collision_layer = 4 script = ExtResource("1_l63x2") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -149,6 +148,7 @@ modulate = Color(1.9, 1.9, 1.9, 1) material = SubResource("ShaderMaterial_6odx4") sprite_frames = ExtResource("2_s0xbw") +offset = Vector2(4, 0) [node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] position = Vector2(-2, -3) @@ -156,11 +156,8 @@ [node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] position = Vector2(7, -1.5) -[node name="GripPoint" type="Marker2D" parent="."] -position = Vector2(-5, 0) - [node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(1, 0) +position = Vector2(3, 0) shape = SubResource("RectangleShape2D_evjpf") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn index d4495c1..b636c80 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn @@ -131,12 +131,11 @@ "reloading": SubResource("Animation_juv2q") } -[node name="Weapon0009" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] +[node name="Weapon0009" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] collision_layer = 4 script = ExtResource("1_eprgt") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") -GripPoint = NodePath("GripPoint") AnimationPlayer = NodePath("AnimationPlayer") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -149,6 +148,7 @@ [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_o36tv") sprite_frames = ExtResource("2_4kxpd") +offset = Vector2(6, -1) [node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] position = Vector2(-2, -2) @@ -156,12 +156,8 @@ [node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] position = Vector2(13, -0.5) -[node name="GripPoint" type="Marker2D" parent="."] -position = Vector2(-6, 1) - [node name="Collision" type="CollisionShape2D" parent="."] -visible = false -position = Vector2(0, 1) +position = Vector2(6, 0) shape = SubResource("RectangleShape2D_jbuu3") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] diff --git a/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn b/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn index 1de1148..b16a59c 100644 --- a/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn +++ b/DungeonShooting_Godot/prefab/weapon/WeaponTemplate.tscn @@ -37,8 +37,6 @@ [node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] position = Vector2(10, -2) -[node name="GripPoint" type="Marker2D" parent="."] - [node name="Collision" type="CollisionShape2D" parent="."] visible = false diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index 7e4b0e7..aafbd9d 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -35,6 +35,10 @@ { "ErrorType": 0, "Path": "resource/map/tileMaps/TestGroup1/inlet/Start3" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/inlet/Start4" } ], "OutletList": [ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preinstall.json new file mode 100644 index 0000000..a239003 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":43,"Y":26},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":43,"Y":49},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preview.png new file mode 100644 index 0000000..9d9c52d --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preview.png.import new file mode 100644 index 0000000..95f9d45 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdwxp0hlmhbg3" +path="res://.godot/imported/Preview.png-8e06125c0ecec4a197e22dd3de0e8fb1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/TestGroup1/inlet/Start4/Preview.png" +dest_files=["res://.godot/imported/Preview.png-8e06125c0ecec4a197e22dd3de0e8fb1.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/map/tileMaps/TestGroup1/inlet/Start4/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/RoomInfo.json new file mode 100644 index 0000000..0d902b3 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-3,"Y":-3},"Size":{"X":11,"Y":9},"DoorAreaInfos":[],"GroupName":"TestGroup1","RoomType":1,"RoomName":"Start4","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/TileInfo.json new file mode 100644 index 0000000..77531b5 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start4/TileInfo.json @@ -0,0 +1 @@ +{"NavigationList":[{"Type":0,"Points":[-24,-24,104,-24,104,80,-24,80]}],"Floor":[-2,-2,0,0,8,-2,-1,0,0,8,-2,0,0,0,8,-2,1,0,0,8,-2,2,0,0,8,-2,3,0,0,8,-2,4,0,0,8,-1,-2,0,0,8,-1,-1,0,0,8,-1,0,0,0,8,-1,1,0,0,8,-1,2,0,0,8,-1,3,0,0,8,-1,4,0,0,8,0,-2,0,0,8,0,-1,0,0,8,0,0,0,0,8,0,1,0,0,8,0,2,0,0,8,0,3,0,0,8,0,4,0,0,8,1,-2,0,0,8,1,-1,0,0,8,1,0,0,0,8,1,1,0,0,8,1,2,0,0,8,1,3,0,0,8,1,4,0,0,8,2,-2,0,0,8,2,-1,0,0,8,2,0,0,0,8,2,1,0,0,8,2,2,0,0,8,2,3,0,0,8,2,4,0,0,8,3,-2,0,0,8,3,-1,0,0,8,3,0,0,0,8,3,1,0,0,8,3,2,0,0,8,3,3,0,0,8,3,4,0,0,8,4,-2,0,0,8,4,-1,0,0,8,4,0,0,0,8,4,1,0,0,8,4,2,0,0,8,4,3,0,0,8,4,4,0,0,8,5,-2,0,0,8,5,-1,0,0,8,5,0,0,0,8,5,1,0,0,8,5,2,0,0,8,5,3,0,0,8,5,4,0,0,8,6,-2,0,0,8,6,-1,0,0,8,6,0,0,0,8,6,1,0,0,8,6,2,0,0,8,6,3,0,0,8,6,4,0,0,8],"Middle":[-2,-3,0,2,7,-1,-3,0,2,7,0,-3,0,2,7,1,-3,0,2,7,2,-3,0,2,7,3,-3,0,2,7,4,-3,0,2,7,5,-3,0,2,7,6,-3,0,2,7],"Top":[-3,-3,0,3,4,-3,-2,0,3,3,-3,-1,0,3,3,-3,0,0,3,3,-3,1,0,3,3,-3,2,0,3,3,-3,3,0,3,3,-3,4,0,3,3,-3,5,0,11,2,-2,5,0,2,2,-1,5,0,2,2,0,5,0,2,2,1,5,0,2,2,2,5,0,2,2,3,5,0,2,2,4,5,0,2,2,5,5,0,2,2,6,5,0,2,2,7,-3,0,1,4,7,-2,0,1,3,7,-1,0,1,3,7,0,0,1,3,7,1,0,1,3,7,2,0,1,3,7,3,0,1,3,7,4,0,1,3,7,5,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index c1daa8a..68c7a33 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -1247,7 +1247,7 @@ { MeleeAttackCollision.Polygon = Utils.CreateSectorPolygon( Utils.ConvertAngle(-MeleeAttackAngle / 2f), - (weapon.GetLocalFirePosition() - weapon.GripPoint.Position).Length() * 1.2f, + (weapon.GetLocalFirePosition() - weapon.GetGripPosition()).Length() * 1.2f, MeleeAttackAngle, 6 ); diff --git a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs b/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs index 1dfcc68..57f7b88 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs @@ -45,7 +45,7 @@ //播放特效 var effect = ObjectManager.GetPoolItem(ResourcePath.prefab_effect_weapon_MeleeAttack1_tscn); var sprite = (Node2D)effect; - var localFirePosition = activeItem.GetLocalFirePosition() - activeItem.GripPoint.Position; + var localFirePosition = activeItem.GetLocalFirePosition() - activeItem.Position; localFirePosition *= 0.9f; sprite.Position = p1 + localFirePosition.Rotated(Mathf.DegToRad(r)); sprite.RotationDegrees = r; diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index 9a0e3ac..eb92364 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -57,12 +57,6 @@ /// [Export, ExportFillNode] public Marker2D ShellPoint { get; set; } - - /// - /// 武器握把位置 - /// - [Export, ExportFillNode] - public Marker2D GripPoint { get; set; } /// /// 武器的当前散射半径 @@ -208,8 +202,14 @@ //当前后坐力导致的偏移长度 private float _currBacklashLength = 0; - //临时存放动画精灵位置 - private Vector2 _tempAnimatedSpritePosition; + //握把位置 + private Vector2 _gripPoint; + + //持握时 Sprite 偏移 + private Vector2 _gripOffset; + + //碰撞器位置 + private Vector2 _collPoint; //换弹计时器 private float _reloadTimer = 0; @@ -287,6 +287,12 @@ InitWeapon(GetWeaponAttribute(ActivityBase.Id).Clone()); AnimatedSprite.AnimationFinished += OnAnimatedSpriteFinished; AnimationPlayer.AnimationFinished += OnAnimationPlayerFinished; + _gripPoint = AnimatedSprite.Position; + _gripOffset = AnimatedSprite.Offset; + _collPoint = Collision.Position; + AnimatedSprite.Position = Vector2.Zero; + AnimatedSprite.Offset = Vector2.Zero; + Collision.Position = Vector2.Zero; } /// @@ -1784,7 +1790,15 @@ var rotation = master.MountPoint.GlobalRotation; GlobalRotation = rotation; - startPosition -= GripPoint.Position.Rotated(rotation); + if (master.Face == FaceDirection.Right) + { + startPosition += _gripPoint.Rotated(rotation); + } + else + { + startPosition += new Vector2(_gripPoint.X, -_gripPoint.Y).Rotated(rotation); + } + var startHeight = -master.MountPoint.Position.Y; var velocity = new Vector2(20, 0).Rotated(rotation); var yf = Utils.Random.RandomRangeInt(50, 70); @@ -1819,7 +1833,7 @@ { //调整阴影 //ShadowOffset = new Vector2(0, Master.GlobalPosition.Y - GlobalPosition.Y); - ShadowOffset = new Vector2(0, -Master.MountPoint.Position.Y); + ShadowOffset = new Vector2(0, -Master.MountPoint.Position.Y + 2); //枪口默认抬起角度 RotationDegrees = -Attribute.DefaultAngle; ShowShadowSprite(); @@ -1852,7 +1866,11 @@ _triggerRoleFlag = false; _weaponAttribute = _playerWeaponAttribute; CollisionLayer = _tempLayer; - AnimatedSprite.Position = _tempAnimatedSpritePosition; + + //精灵位置, 旋转中心点 + AnimatedSprite.Position = Vector2.Zero; + AnimatedSprite.Offset = Vector2.Zero; + Collision.Position = Vector2.Zero; //清除 Ai 拾起标记 RemoveSign(SignNames.AiFindWeaponSign); //停止换弹 @@ -1880,10 +1898,9 @@ ZIndex = 0; //禁用碰撞 //Collision.Disabled = true; - //精灵位置 - _tempAnimatedSpritePosition = AnimatedSprite.Position; - var position = GripPoint.Position; - AnimatedSprite.Position = new Vector2(-position.X, -position.Y); + AnimatedSprite.Position = _gripPoint; + AnimatedSprite.Offset = _gripOffset; + Collision.Position = _collPoint; //修改层级 _tempLayer = CollisionLayer; CollisionLayer = PhysicsLayer.OnHand; @@ -1946,6 +1963,14 @@ return AnimatedSprite.Position + ShellPoint.Position; } + /// + /// 获取握把位置, 相当于武器的原点坐标 + /// + public Vector2 GetGripPosition() + { + return _gripPoint + _gripOffset; + } + //-------------------------------- Ai相关 ----------------------------- ///