diff --git a/DungeonShooting_Godot/DungeonShooting.csproj b/DungeonShooting_Godot/DungeonShooting.csproj index f88bca0..ef9302f 100644 --- a/DungeonShooting_Godot/DungeonShooting.csproj +++ b/DungeonShooting_Godot/DungeonShooting.csproj @@ -1,4 +1,4 @@ - + net6.0 true diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old.2 b/DungeonShooting_Godot/DungeonShooting.csproj.old.2 new file mode 100644 index 0000000..f88bca0 --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.2 @@ -0,0 +1,11 @@ + + + net6.0 + true + + + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old.3 b/DungeonShooting_Godot/DungeonShooting.csproj.old.3 new file mode 100644 index 0000000..1c6b311 --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.3 @@ -0,0 +1,11 @@ + + + net6.0 + true + + + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx index 8c505f0..ac61ddd 100644 --- a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx index 11ed22b..0b704d3 100644 --- a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx index b7e8df3..1a85c8a 100644 --- a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn index e2bbb87..d2e2035 100644 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn +++ b/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/activity/bullet/Bullet.cs" id="1_hga3h"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_n44pd"] -[ext_resource type="SpriteFrames" uid="uid://bpeodjqiy3mil" path="res://resource/spriteFrames/Bullet0002.tres" id="3_uvuj8"] +[ext_resource type="SpriteFrames" uid="uid://bpeodjqiy3mil" path="res://resource/spriteFrames/bullet/Bullet0002.tres" id="3_uvuj8"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/effect/activityObject/Effect0001.tscn b/DungeonShooting_Godot/prefab/effect/activityObject/Effect0001.tscn index e530d24..913f5af 100644 --- a/DungeonShooting_Godot/prefab/effect/activityObject/Effect0001.tscn +++ b/DungeonShooting_Godot/prefab/effect/activityObject/Effect0001.tscn @@ -10,12 +10,14 @@ shader = ExtResource("2_b3d83") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 [sub_resource type="ShaderMaterial" id="ShaderMaterial_08fn3"] resource_local_to_scene = true shader = ExtResource("2_b3d83") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 [sub_resource type="AtlasTexture" id="AtlasTexture_cldwb"] atlas = ExtResource("3_ntutm") diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn index 1c4997b..70d7f16 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/room/RoomDoor.cs" id="1_4c6sw"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_lwx51"] -[ext_resource type="SpriteFrames" uid="uid://3ps6h2f54qa5" path="res://resource/spriteFrames/RoomDoor_EW.tres" id="3_pjvd8"] +[ext_resource type="SpriteFrames" uid="uid://3ps6h2f54qa5" path="res://resource/spriteFrames/other/RoomDoor_EW.tres" id="3_pjvd8"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_yvwpk"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn index 77fcfce..fe84b67 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/room/RoomDoor.cs" id="1_220be"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_h5ru6"] -[ext_resource type="SpriteFrames" uid="uid://xs72aopsgpg6" path="res://resource/spriteFrames/RoomDoor_NS.tres" id="3_apluc"] +[ext_resource type="SpriteFrames" uid="uid://xs72aopsgpg6" path="res://resource/spriteFrames/other/RoomDoor_NS.tres" id="3_apluc"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_yvwpk"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn index f7a1217..5d3dc92 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/room/RoomDoor.cs" id="1_f3qbq"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_6vvcd"] -[ext_resource type="SpriteFrames" uid="uid://xs72aopsgpg6" path="res://resource/spriteFrames/RoomDoor_NS.tres" id="3_at5v2"] +[ext_resource type="SpriteFrames" uid="uid://xs72aopsgpg6" path="res://resource/spriteFrames/other/RoomDoor_NS.tres" id="3_at5v2"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_yvwpk"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn index 0e5a557..0dbf427 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn @@ -2,7 +2,8 @@ [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/RoomDoor_EW.tres" id="3_a2hvw"] +[ext_resource type="SpriteFrames" uid="uid://3ps6h2f54qa5" path="res://resource/spriteFrames/other/RoomDoor_EW.tres" id="3_a2hvw"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_yvwpk"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0001.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0001.tscn new file mode 100644 index 0000000..6e3dfe5 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0001.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://cb4k0wmt3rhjc"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0001.cs" id="1_sfoyx"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_5y838"] +[ext_resource type="SpriteFrames" uid="uid://wtvfyprel72y" path="res://resource/spriteFrames/prop/buff/Buff0001.tres" id="3_ae54v"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_5y838") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_5y838") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0001" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_sfoyx") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_ae54v") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0002.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0002.tscn new file mode 100644 index 0000000..a7e48c2 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0002.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://cnh7h0ti23dwm"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0002.cs" id="1_5m6aa"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_ca7fx"] +[ext_resource type="SpriteFrames" uid="uid://7t57gsyff470" path="res://resource/spriteFrames/prop/buff/Buff0002.tres" id="3_meeoj"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_ca7fx") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_ca7fx") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0002" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_5m6aa") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_meeoj") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0003.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0003.tscn new file mode 100644 index 0000000..a1c30e6 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0003.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://im64ft74hmmg"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0003.cs" id="1_put1t"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_r3cwy"] +[ext_resource type="SpriteFrames" uid="uid://nqoieett75t3" path="res://resource/spriteFrames/prop/buff/Buff0003.tres" id="3_cdr8i"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_r3cwy") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_r3cwy") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0003" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_put1t") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_cdr8i") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0004.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0004.tscn new file mode 100644 index 0000000..d9555fb --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0004.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://dw3fey3hybie4"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0004.cs" id="1_77wev"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_j5d6t"] +[ext_resource type="SpriteFrames" uid="uid://bj0k3pipwp46x" path="res://resource/spriteFrames/prop/buff/Buff0004.tres" id="3_amsdk"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_j5d6t") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_j5d6t") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0004" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_77wev") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_amsdk") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0005.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0005.tscn new file mode 100644 index 0000000..6d2f135 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0005.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://b4u8ichb44htn"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0005.cs" id="1_kxndg"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_85pkn"] +[ext_resource type="SpriteFrames" uid="uid://bvqp46degt1rg" path="res://resource/spriteFrames/prop/buff/Buff0005.tres" id="3_1p404"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_85pkn") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_85pkn") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0005" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_kxndg") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_1p404") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0006.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0006.tscn new file mode 100644 index 0000000..9f51b00 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0006.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://co5v2gncs0i6g"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0006.cs" id="1_lf3k7"] +[ext_resource type="SpriteFrames" uid="uid://bxn65oovekw6k" path="res://resource/spriteFrames/prop/buff/Buff0006.tres" id="2_clye6"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_pir38"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_pir38") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_pir38") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0006" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_lf3k7") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("2_clye6") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0007.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0007.tscn new file mode 100644 index 0000000..62a560a --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0007.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://bv85r8mqja8fy"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0007.cs" id="1_4ga2a"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_dfarf"] +[ext_resource type="SpriteFrames" uid="uid://et840sb4d1g3" path="res://resource/spriteFrames/prop/buff/Buff0007.tres" id="3_y3ako"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_dfarf") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_dfarf") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0007" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_4ga2a") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_y3ako") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0008.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0008.tscn new file mode 100644 index 0000000..f27da49 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0008.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://3cwfaycb436j"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0008.cs" id="1_apsyo"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_g22ai"] +[ext_resource type="SpriteFrames" uid="uid://bs41p1hpkpucb" path="res://resource/spriteFrames/prop/buff/Buff0008.tres" id="3_bko6m"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_g22ai") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_g22ai") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0008" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_apsyo") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_bko6m") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0009.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0009.tscn new file mode 100644 index 0000000..1696e25 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0009.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://cuqwvioe545bl"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0009.cs" id="1_fu5ca"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_680mi"] +[ext_resource type="SpriteFrames" uid="uid://sqcibio78nwc" path="res://resource/spriteFrames/prop/buff/Buff0009.tres" id="3_mtbwe"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_680mi") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_680mi") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0009" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_fu5ca") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_mtbwe") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/Buff0010.tscn b/DungeonShooting_Godot/prefab/prop/buff/Buff0010.tscn new file mode 100644 index 0000000..d0f45d5 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/Buff0010.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=7 format=3 uid="uid://ddv5nfndgp2lr"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/Buff0010.cs" id="1_fti4v"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_bmg36"] +[ext_resource type="SpriteFrames" uid="uid://dxqtm7xgn2wms" path="res://resource/spriteFrames/prop/buff/Buff0010.tres" id="3_oi74m"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_bmg36") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_bmg36") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/alpha = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="Buff0010" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_fti4v") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_mrkt4") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_b6ii6") +sprite_frames = ExtResource("3_oi74m") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/role/Enemy0001.tscn b/DungeonShooting_Godot/prefab/role/Enemy0001.tscn index 8673633..fabf09d 100644 --- a/DungeonShooting_Godot/prefab/role/Enemy0001.tscn +++ b/DungeonShooting_Godot/prefab/role/Enemy0001.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=7 format=3 uid="uid://dbrig6dq441wo"] [ext_resource type="PackedScene" uid="uid://cyrcv2jdgr8cf" path="res://prefab/role/RoleTemplate.tscn" id="1_5po38"] -[ext_resource type="Script" path="res://src/game/role/enemy/Enemy.cs" id="2_1plrq"] +[ext_resource type="Script" path="res://src/game/activity/role/enemy/Enemy.cs" id="2_1plrq"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_x8agd"] -[ext_resource type="SpriteFrames" uid="uid://cnctpyrn02rhd" path="res://resource/spriteFrames/Role1001.tres" id="4_qv8w5"] +[ext_resource type="SpriteFrames" uid="uid://cnctpyrn02rhd" path="res://resource/spriteFrames/role/Role1001.tres" id="4_qv8w5"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_8vxx6"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/role/Role0001.tscn b/DungeonShooting_Godot/prefab/role/Role0001.tscn index 4717b1d..e9539ad 100644 --- a/DungeonShooting_Godot/prefab/role/Role0001.tscn +++ b/DungeonShooting_Godot/prefab/role/Role0001.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=7 format=3 uid="uid://cxhrcytrx0kcf"] [ext_resource type="PackedScene" uid="uid://cyrcv2jdgr8cf" path="res://prefab/role/RoleTemplate.tscn" id="1_10c2n"] -[ext_resource type="Script" path="res://src/game/role/Player.cs" id="2_7dmp4"] +[ext_resource type="Script" path="res://src/game/activity/role/Player.cs" id="2_i08u4"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_rk4gg"] -[ext_resource type="SpriteFrames" uid="uid://n11thtali6es" path="res://resource/spriteFrames/Role0001.tres" id="4_galcc"] +[ext_resource type="SpriteFrames" uid="uid://n11thtali6es" path="res://resource/spriteFrames/role/Role0001.tres" id="4_galcc"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_lvutq"] resource_local_to_scene = true @@ -21,7 +21,7 @@ [node name="Role0001" node_paths=PackedStringArray("HurtArea", "MountPoint", "BackMountPoint", "InteractiveArea", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_10c2n")] collision_layer = 8 -script = ExtResource("2_7dmp4") +script = ExtResource("2_i08u4") HurtArea = NodePath("HurtArea") MountPoint = NodePath("MountPoint") BackMountPoint = NodePath("BackMountPoint") @@ -37,3 +37,5 @@ material = SubResource("ShaderMaterial_8hgu2") sprite_frames = ExtResource("4_galcc") frame_progress = 0.0995217 + +[node name="MountPoint2" type="Marker2D" parent="." index="7"] diff --git a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn b/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn index 31c3ab7..e665ff2 100644 --- a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn +++ b/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn @@ -1,7 +1,8 @@ [gd_scene load_steps=8 format=3 uid="uid://cyrcv2jdgr8cf"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_xk5yk"] -[ext_resource type="Script" path="res://src/game/role/MountRotation.cs" id="2_5ddpw"] +[ext_resource type="Script" path="res://src/game/activity/role/MountRotation.cs" id="2_5ddpw"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_v2kfw"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/shell/Shell0001.tscn b/DungeonShooting_Godot/prefab/shell/Shell0001.tscn index b7f2eb4..b921399 100644 --- a/DungeonShooting_Godot/prefab/shell/Shell0001.tscn +++ b/DungeonShooting_Godot/prefab/shell/Shell0001.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/activity/shell/Shell.cs" id="1_2g70c"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_tdny6"] -[ext_resource type="SpriteFrames" uid="uid://b8gksxl7auquc" path="res://resource/spriteFrames/Shell0001.tres" id="3_ujn5y"] +[ext_resource type="SpriteFrames" uid="uid://b8gksxl7auquc" path="res://resource/spriteFrames/shell/Shell0001.tres" id="3_ujn5y"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_px12l"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/shell/Shell0002.tscn b/DungeonShooting_Godot/prefab/shell/Shell0002.tscn index edc3418..8b9ce01 100644 --- a/DungeonShooting_Godot/prefab/shell/Shell0002.tscn +++ b/DungeonShooting_Godot/prefab/shell/Shell0002.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://src/game/activity/shell/Shell.cs" id="1_qi64y"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_s28nu"] -[ext_resource type="SpriteFrames" uid="uid://cj8psdl2pova6" path="res://resource/spriteFrames/Shell0002.tres" id="3_r560h"] +[ext_resource type="SpriteFrames" uid="uid://cj8psdl2pova6" path="res://resource/spriteFrames/shell/Shell0002.tres" id="3_r560h"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_px12l"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/shell/Shell0003.tscn b/DungeonShooting_Godot/prefab/shell/Shell0003.tscn index 42221a6..3c884b1 100644 --- a/DungeonShooting_Godot/prefab/shell/Shell0003.tscn +++ b/DungeonShooting_Godot/prefab/shell/Shell0003.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://src/game/activity/shell/Shell.cs" id="1_5hfb2"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_586dn"] -[ext_resource type="SpriteFrames" uid="uid://kc1jwvwdg660" path="res://resource/spriteFrames/Shell0003.tres" id="3_j2kre"] +[ext_resource type="SpriteFrames" uid="uid://kc1jwvwdg660" path="res://resource/spriteFrames/shell/Shell0003.tres" id="3_j2kre"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_px12l"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/ui/BottomTips.tscn b/DungeonShooting_Godot/prefab/ui/BottomTips.tscn new file mode 100644 index 0000000..e859f6a --- /dev/null +++ b/DungeonShooting_Godot/prefab/ui/BottomTips.tscn @@ -0,0 +1,72 @@ +[gd_scene load_steps=4 format=3 uid="uid://dxmjm1pgctyid"] + +[ext_resource type="Script" path="res://src/game/ui/bottomTips/BottomTipsPanel.cs" id="1_c63vs"] +[ext_resource type="Texture2D" uid="uid://bls55gj8h3mgv" path="res://resource/sprite/prop/buff/Buff0001.png" id="2_gaykt"] + +[sub_resource type="LabelSettings" id="LabelSettings_xtn1u"] +line_spacing = 8.0 +font_size = 32 + +[node name="BottomTips" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +script = ExtResource("1_c63vs") +Layer = 3 +Mode = 1 +metadata/_edit_vertical_guides_ = [960.0] + +[node name="Panel" type="PanelContainer" parent="."] +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -134.5 +offset_top = 38.0 +offset_right = 141.5 +offset_bottom = 122.0 +grow_horizontal = 2 +grow_vertical = 0 +mouse_filter = 2 + +[node name="MarginContainer" type="MarginContainer" parent="Panel"] +layout_mode = 2 +size_flags_vertical = 8 +mouse_filter = 2 +theme_override_constants/margin_left = 30 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 30 +theme_override_constants/margin_bottom = 10 + +[node name="CenterContainer" type="CenterContainer" parent="Panel/MarginContainer"] +layout_mode = 2 +mouse_filter = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="Panel/MarginContainer/CenterContainer"] +layout_mode = 2 +size_flags_vertical = 4 +mouse_filter = 2 +theme_override_constants/separation = 16 + +[node name="AspectRatioContainer" type="AspectRatioContainer" parent="Panel/MarginContainer/CenterContainer/HBoxContainer"] +custom_minimum_size = Vector2(64, 64) +layout_mode = 2 + +[node name="TextureRect" type="TextureRect" parent="Panel/MarginContainer/CenterContainer/HBoxContainer/AspectRatioContainer"] +custom_minimum_size = Vector2(16, 16) +layout_mode = 2 +mouse_filter = 2 +texture = ExtResource("2_gaykt") + +[node name="Label" type="Label" parent="Panel/MarginContainer/CenterContainer/HBoxContainer"] +layout_mode = 2 +text = "提示内容" +label_settings = SubResource("LabelSettings_xtn1u") +horizontal_alignment = 1 +vertical_alignment = 1 diff --git a/DungeonShooting_Godot/prefab/ui/RoomUI.tscn b/DungeonShooting_Godot/prefab/ui/RoomUI.tscn index f7fe65a..a2cfd75 100644 --- a/DungeonShooting_Godot/prefab/ui/RoomUI.tscn +++ b/DungeonShooting_Godot/prefab/ui/RoomUI.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=3 uid="uid://bvpmtfupny8iu"] +[gd_scene load_steps=11 format=3 uid="uid://bvpmtfupny8iu"] [ext_resource type="Script" path="res://src/game/ui/roomUI/RoomUIPanel.cs" id="1_tfcrp"] [ext_resource type="Texture2D" uid="uid://b67i86mtqrn32" path="res://resource/sprite/ui/icon/icon_bullet.png" id="2_a2ohq"] @@ -12,6 +12,11 @@ [sub_resource type="Gradient" id="1"] colors = PackedColorArray(0.4, 0.498039, 1, 1, 0.4, 0.498039, 1, 0.313726) +[sub_resource type="LabelSettings" id="LabelSettings_toas6"] +font_size = 32 +outline_size = 8 +outline_color = Color(0, 0, 0, 1) + [node name="RoomUI" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -22,46 +27,104 @@ mouse_filter = 2 script = ExtResource("1_tfcrp") -[node name="InteractiveTipBar" type="Node2D" parent="."] -z_index = 10 -position = Vector2(961, 553) +[node name="InteractiveTipBar" type="Control" parent="."] +anchors_preset = 0 +offset_left = 960.0 +offset_top = 552.0 +offset_right = 960.0 +offset_bottom = 552.0 scale = Vector2(4, 4) -[node name="Icon" type="Sprite2D" parent="InteractiveTipBar"] -position = Vector2(0, -25) +[node name="Icon" type="TextureRect" parent="InteractiveTipBar"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -8.0 +offset_top = -34.0 +offset_right = 8.0 +offset_bottom = -18.0 +grow_horizontal = 2 +grow_vertical = 2 texture = ExtResource("2_a2ohq") -[node name="InteractiveIcon" type="Sprite2D" parent="InteractiveTipBar"] +[node name="InteractiveIcon" type="TextureRect" parent="InteractiveTipBar"] visible = false -position = Vector2(0, -30) +layout_mode = 0 +offset_top = -30.0 +offset_bottom = -30.0 texture = ExtResource("3_h7n2a") [node name="Line2D" type="Line2D" parent="InteractiveTipBar"] -points = PackedVector2Array(0, -17, 0, -15.0938, 0, 0) +points = PackedVector2Array(0, -18, 0, 0) width = 2.0 gradient = SubResource("1") -[node name="ReloadBar" type="Node2D" parent="."] -z_index = 15 -position = Vector2(961, 553) +[node name="NameLabel" type="Label" parent="InteractiveTipBar"] +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -32.0 +offset_top = -58.0 +offset_right = 224.0 +offset_bottom = 55.0 +grow_horizontal = 2 +grow_vertical = 0 +scale = Vector2(0.25, 0.25) +text = "物体名称" +label_settings = SubResource("LabelSettings_toas6") +horizontal_alignment = 1 +vertical_alignment = 2 +autowrap_mode = 2 +clip_text = true +text_overrun_behavior = 2 + +[node name="ReloadBar" type="Control" parent="."] +anchors_preset = 0 +offset_left = 960.0 +offset_top = 552.0 +offset_right = 960.0 +offset_bottom = 552.0 scale = Vector2(4, 4) -[node name="Slot" type="Sprite2D" parent="ReloadBar"] -position = Vector2(0, -24) +[node name="Slot" type="TextureRect" parent="ReloadBar"] +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -16.0 +offset_top = -26.0 +offset_right = 14.0 +offset_bottom = -21.0 +grow_horizontal = 2 +grow_vertical = 0 texture = ExtResource("4_nt6mj") [node name="Block" type="Sprite2D" parent="ReloadBar/Slot"] +position = Vector2(1, 0) texture = ExtResource("5_wob8d") +centered = false [node name="Control" type="Control" parent="."] -anchors_preset = 0 +layout_mode = 1 +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 offset_left = 20.0 offset_top = 20.0 offset_right = -20.0 offset_bottom = -20.0 +grow_horizontal = 2 +grow_vertical = 2 mouse_filter = 2 +metadata/_edit_lock_ = true [node name="LifeBar" type="Control" parent="Control"] anchors_preset = 0 diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn index ae6e01b..46ffb26 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0001.tscn @@ -3,7 +3,7 @@ [ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_ykl0r"] [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="2_t56pk"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_x1q03"] -[ext_resource type="SpriteFrames" uid="uid://5m0qs7m4er5u" path="res://resource/spriteFrames/Weapon0001.tres" id="4_d5c81"] +[ext_resource type="SpriteFrames" uid="uid://5m0qs7m4er5u" path="res://resource/spriteFrames/weapon/Weapon0001.tres" id="4_d5c81"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_5bfqf"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn index 6bfbeb4..0942b19 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0002.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_hgtyo"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_8nvny"] -[ext_resource type="SpriteFrames" uid="uid://domhmo4flmlt0" path="res://resource/spriteFrames/Weapon0002.tres" id="3_4h3je"] +[ext_resource type="SpriteFrames" uid="uid://domhmo4flmlt0" path="res://resource/spriteFrames/weapon/Weapon0002.tres" id="3_4h3je"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn index 6a19802..18e0dd4 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0003.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_aeolk"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_4yjnk"] -[ext_resource type="SpriteFrames" uid="uid://c7dt1uwdybn5" path="res://resource/spriteFrames/Weapon0003.tres" id="3_upkjt"] +[ext_resource type="SpriteFrames" uid="uid://c7dt1uwdybn5" path="res://resource/spriteFrames/weapon/Weapon0003.tres" id="3_upkjt"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn index 7843a77..dde6dec 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0004.tscn @@ -3,9 +3,10 @@ [ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_kg172"] [ext_resource type="Script" path="res://src/game/activity/weapon/knife/Knife.cs" id="2_v1wer"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_63s5g"] -[ext_resource type="SpriteFrames" uid="uid://k2tktysa7j86" path="res://resource/spriteFrames/Weapon0004.tres" id="4_uymcs"] +[ext_resource type="SpriteFrames" uid="uid://k2tktysa7j86" path="res://resource/spriteFrames/weapon/Weapon0004.tres" id="4_uymcs"] [ext_resource type="PackedScene" path="res://prefab/FanCollisionShape.tscn" id="5_nr15b"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_o5ytq"] resource_local_to_scene = true shader = ExtResource("3_63s5g") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn index 342ee85..f9f1911 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0005.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_3lu3r"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_466gw"] -[ext_resource type="SpriteFrames" uid="uid://djdvlmqsn8bie" path="res://resource/spriteFrames/Weapon0005.tres" id="2_m3plc"] +[ext_resource type="SpriteFrames" uid="uid://djdvlmqsn8bie" path="res://resource/spriteFrames/weapon/Weapon0005.tres" id="2_m3plc"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn index c6c2e9b..63caa2e 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0006.tscn @@ -2,7 +2,8 @@ [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_5nx8j"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_rp1bw"] -[ext_resource type="SpriteFrames" uid="uid://dx1mjbx4acs3q" path="res://resource/spriteFrames/Weapon0006.tres" id="2_j3sji"] +[ext_resource type="SpriteFrames" uid="uid://dx1mjbx4acs3q" path="res://resource/spriteFrames/weapon/Weapon0006.tres" id="2_j3sji"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index 3e12ec5..20e8ef6 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -177,7 +177,7 @@ 2d_physics/layer_1="wall" 2d_physics/layer_2="bullet" -2d_physics/layer_3="props" +2d_physics/layer_3="prop" 2d_physics/layer_4="player" 2d_physics/layer_5="enemy" 2d_physics/layer_6="affiliation" diff --git a/DungeonShooting_Godot/resource/config/ActivityObject.json b/DungeonShooting_Godot/resource/config/ActivityObject.json index 8551ca6..a7587d5 100644 --- a/DungeonShooting_Godot/resource/config/ActivityObject.json +++ b/DungeonShooting_Godot/resource/config/ActivityObject.json @@ -2,109 +2,197 @@ { "Id": "role0001", "Type": 3, - "Prefab": "res://prefab/role/Role0001.tscn", - "Remark": "\u73A9\u5BB6" + "Name": "", + "Remark": "\u73A9\u5BB6", + "Prefab": "res://prefab/role/Role0001.tscn" }, { "Id": "enemy0001", "Type": 4, - "Prefab": "res://prefab/role/Enemy0001.tscn", - "Remark": "\u654C\u4EBA" + "Name": "", + "Remark": "\u654C\u4EBA", + "Prefab": "res://prefab/role/Enemy0001.tscn" }, { "Id": "weapon0001", "Type": 5, - "Prefab": "res://prefab/weapon/Weapon0001.tscn", - "Remark": "" + "Name": "\u6B65\u67AA", + "Remark": "", + "Prefab": "res://prefab/weapon/Weapon0001.tscn" }, { "Id": "weapon0002", "Type": 5, - "Prefab": "res://prefab/weapon/Weapon0002.tscn", - "Remark": "" + "Name": "\u9730\u5F39\u67AA", + "Remark": "", + "Prefab": "res://prefab/weapon/Weapon0002.tscn" }, { "Id": "weapon0003", "Type": 5, - "Prefab": "res://prefab/weapon/Weapon0003.tscn", - "Remark": "" + "Name": "\u624B\u67AA", + "Remark": "", + "Prefab": "res://prefab/weapon/Weapon0003.tscn" }, { "Id": "weapon0004", "Type": 5, - "Prefab": "res://prefab/weapon/Weapon0004.tscn", - "Remark": "" + "Name": "\u5200", + "Remark": "", + "Prefab": "res://prefab/weapon/Weapon0004.tscn" }, { "Id": "weapon0005", "Type": 5, - "Prefab": "res://prefab/weapon/Weapon0005.tscn", - "Remark": "" + "Name": "\u72D9\u51FB\u67AA", + "Remark": "", + "Prefab": "res://prefab/weapon/Weapon0005.tscn" }, { "Id": "weapon0006", "Type": 5, - "Prefab": "res://prefab/weapon/Weapon0006.tscn", - "Remark": "" + "Name": "\u51B2\u950B\u67AA", + "Remark": "", + "Prefab": "res://prefab/weapon/Weapon0006.tscn" }, { "Id": "bullet0001", "Type": 6, - "Prefab": "res://prefab/bullet/Bullet0001.tscn", - "Remark": "" + "Name": "", + "Remark": "", + "Prefab": "res://prefab/bullet/Bullet0001.tscn" }, { "Id": "bullet0002", "Type": 6, - "Prefab": "res://prefab/bullet/Bullet0002.tscn", - "Remark": "" + "Name": "", + "Remark": "", + "Prefab": "res://prefab/bullet/Bullet0002.tscn" }, { "Id": "shell0001", "Type": 7, - "Prefab": "res://prefab/shell/Shell0001.tscn", - "Remark": "" + "Name": "", + "Remark": "", + "Prefab": "res://prefab/shell/Shell0001.tscn" }, { "Id": "shell0002", "Type": 7, - "Prefab": "res://prefab/shell/Shell0002.tscn", - "Remark": "" + "Name": "", + "Remark": "", + "Prefab": "res://prefab/shell/Shell0002.tscn" }, { "Id": "shell0003", "Type": 7, - "Prefab": "res://prefab/shell/Shell0003.tscn", - "Remark": "" + "Name": "", + "Remark": "", + "Prefab": "res://prefab/shell/Shell0003.tscn" }, { "Id": "effect0001", "Type": 8, - "Prefab": "res://prefab/effect/activityObject/Effect0001.tscn", - "Remark": "\u654C\u4EBA\u6B7B\u4EA1\u788E\u7247" + "Name": "", + "Remark": "\u654C\u4EBA\u6B7B\u4EA1\u788E\u7247", + "Prefab": "res://prefab/effect/activityObject/Effect0001.tscn" + }, + { + "Id": "prop0001", + "Type": 9, + "Name": "\u978B\u5B50", + "Remark": "\u63D0\u9AD8\u79FB\u52A8\u901F\u5EA6", + "Prefab": "res://prefab/prop/buff/Buff0001.tscn" + }, + { + "Id": "prop0002", + "Type": 9, + "Name": "\u5FC3\u4E4B\u5BB9\u5668", + "Remark": "\u63D0\u9AD8\u8840\u91CF\u4E0A\u9650", + "Prefab": "res://prefab/prop/buff/Buff0002.tscn" + }, + { + "Id": "prop0003", + "Type": 9, + "Name": "\u62A4\u76FE", + "Remark": "\u53EF\u4EE5\u62B5\u6321\u5B50\u5F39\uFF0C\u968F\u65F6\u95F4\u63A8\u79FB\u81EA\u52A8\u6062\u590D", + "Prefab": "res://prefab/prop/buff/Buff0003.tscn" + }, + { + "Id": "prop0004", + "Type": 9, + "Name": "\u62A4\u76FE\u8BA1\u65F6\u5668", + "Remark": "\u63D0\u9AD8\u62A4\u76FE\u6062\u590D\u901F\u5EA6", + "Prefab": "res://prefab/prop/buff/Buff0004.tscn" + }, + { + "Id": "prop0005", + "Type": 9, + "Name": "\u6740\u4F24\u5F39", + "Remark": "\u63D0\u9AD8\u5B50\u5F39\u4F24\u5BB3", + "Prefab": "res://prefab/prop/buff/Buff0005.tscn" + }, + { + "Id": "prop0006", + "Type": 9, + "Name": "\u7EA2\u5B9D\u77F3\u6212\u6307", + "Remark": "\u53D7\u4F24\u540E\u5EF6\u957F\u65E0\u654C\u65F6\u95F4", + "Prefab": "res://prefab/prop/buff/Buff0006.tscn" + }, + { + "Id": "prop0007", + "Type": 9, + "Name": "\u5907\u7528\u62A4\u76FE", + "Remark": "\u53D7\u4F24\u65F6\u6709\u4E00\u5B9A\u6982\u7387\u62B5\u6D88\u4F24\u5BB3", + "Prefab": "res://prefab/prop/buff/Buff0007.tscn" + }, + { + "Id": "prop0008", + "Type": 9, + "Name": "\u773C\u955C", + "Remark": "\u63D0\u9AD8\u6B66\u5668\u7CBE\u51C6\u5EA6", + "Prefab": "res://prefab/prop/buff/Buff0008.tscn" + }, + { + "Id": "prop0009", + "Type": 9, + "Name": "\u9AD8\u901F\u5B50\u5F39", + "Remark": "\u63D0\u9AD8\u5B50\u5F39\u901F\u5EA6\u548C\u5C04\u7A0B", + "Prefab": "res://prefab/prop/buff/Buff0009.tscn" + }, + { + "Id": "prop0010", + "Type": 9, + "Name": "\u5206\u88C2\u5B50\u5F39", + "Remark": "\u5B50\u5F39\u6570\u91CF\u7FFB\u500D, \u4F46\u662F\u7CBE\u51C6\u5EA6\u548C\u4F24\u5BB3\u964D\u4F4E", + "Prefab": "res://prefab/prop/buff/Buff0010.tscn" }, { "Id": "other_door_e", - "Type": 9, - "Prefab": "res://prefab/map/RoomDoor_E.tscn", - "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u4E1C\u4FA7)" + "Type": 99, + "Name": "", + "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u4E1C\u4FA7)", + "Prefab": "res://prefab/map/RoomDoor_E.tscn" }, { "Id": "other_door_w", - "Type": 9, - "Prefab": "res://prefab/map/RoomDoor_W.tscn", - "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u897F\u4FA7)" + "Type": 99, + "Name": "", + "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u897F\u4FA7)", + "Prefab": "res://prefab/map/RoomDoor_W.tscn" }, { "Id": "other_door_s", - "Type": 9, - "Prefab": "res://prefab/map/RoomDoor_S.tscn", - "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5357\u4FA7)" + "Type": 99, + "Name": "", + "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5357\u4FA7)", + "Prefab": "res://prefab/map/RoomDoor_S.tscn" }, { "Id": "other_door_n", - "Type": 9, - "Prefab": "res://prefab/map/RoomDoor_N.tscn", - "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5317\u4FA7)" + "Type": 99, + "Name": "", + "Remark": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5317\u4FA7)", + "Prefab": "res://prefab/map/RoomDoor_N.tscn" } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/Weapon.json b/DungeonShooting_Godot/resource/config/Weapon.json index 1c00f54..6d690fc 100644 --- a/DungeonShooting_Godot/resource/config/Weapon.json +++ b/DungeonShooting_Godot/resource/config/Weapon.json @@ -2,7 +2,7 @@ { "Id": "0001", "WeaponId": "weapon0001", - "Name": "\u6B65\u67AA", + "Remark": "\u6B65\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 40, "WeightType": 2, @@ -18,7 +18,8 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, "BeLoadedTime": 0, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -74,7 +75,7 @@ { "Id": "0002", "WeaponId": "", - "Name": "\u6B65\u67AA", + "Remark": "\u6B65\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 40, "WeightType": 2, @@ -90,7 +91,8 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, "BeLoadedTime": 0, "MinContinuousCount": 3, "MaxContinuousCount": 3, @@ -146,7 +148,7 @@ { "Id": "0003", "WeaponId": "weapon0002", - "Name": "\u9730\u5F39\u67AA", + "Remark": "\u9730\u5F39\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 40, "WeightType": 2, @@ -162,7 +164,8 @@ "AloneReloadCanShoot": true, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": true, + "AutoManualBeLoaded": true, "BeLoadedTime": 0.6, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -218,7 +221,7 @@ { "Id": "0004", "WeaponId": "", - "Name": "\u9730\u5F39\u67AA", + "Remark": "\u9730\u5F39\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 40, "WeightType": 2, @@ -234,7 +237,8 @@ "AloneReloadCanShoot": true, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": true, + "AutoManualBeLoaded": true, "BeLoadedTime": 0.6, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -290,7 +294,7 @@ { "Id": "0005", "WeaponId": "weapon0003", - "Name": "\u624B\u67AA", + "Remark": "\u624B\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 20, "WeightType": 1, @@ -306,7 +310,8 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, "BeLoadedTime": 0.05, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -362,7 +367,7 @@ { "Id": "0006", "WeaponId": "", - "Name": "\u624B\u67AA", + "Remark": "\u624B\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 20, "WeightType": 1, @@ -378,7 +383,8 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, "BeLoadedTime": 0.05, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -434,7 +440,7 @@ { "Id": "0007", "WeaponId": "weapon0004", - "Name": "\u5200", + "Remark": "\u5200", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 40, "WeightType": 2, @@ -450,7 +456,8 @@ "AloneReloadCanShoot": false, "LooseShoot": true, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, "BeLoadedTime": 0, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -506,7 +513,7 @@ { "Id": "0008", "WeaponId": "", - "Name": "\u5200", + "Remark": "\u5200", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 40, "WeightType": 2, @@ -522,7 +529,8 @@ "AloneReloadCanShoot": false, "LooseShoot": true, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, "BeLoadedTime": 0, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -578,7 +586,7 @@ { "Id": "0009", "WeaponId": "weapon0005", - "Name": "\u72D9\u51FB\u67AA", + "Remark": "\u72D9\u51FB\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 50, "WeightType": 2, @@ -594,7 +602,8 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": false, + "ManualBeLoaded": true, + "AutoManualBeLoaded": false, "BeLoadedTime": 0.9, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -650,7 +659,7 @@ { "Id": "0010", "WeaponId": "", - "Name": "\u72D9\u51FB\u67AA", + "Remark": "\u72D9\u51FB\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 50, "WeightType": 2, @@ -666,7 +675,8 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": false, + "ManualBeLoaded": true, + "AutoManualBeLoaded": false, "BeLoadedTime": 0.9, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -722,7 +732,7 @@ { "Id": "0011", "WeaponId": "weapon0006", - "Name": "\u51B2\u950B\u67AA", + "Remark": "\u51B2\u950B\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 30, "WeightType": 2, @@ -738,7 +748,8 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, "BeLoadedTime": 0, "MinContinuousCount": 1, "MaxContinuousCount": 1, @@ -794,7 +805,7 @@ { "Id": "0012", "WeaponId": "", - "Name": "\u51B2\u950B\u67AA", + "Remark": "\u51B2\u950B\u67AA", "Icon": "res://resource/sprite/gun/gun4.png", "Weight": 30, "WeightType": 2, @@ -810,8 +821,9 @@ "AloneReloadCanShoot": false, "LooseShoot": false, "MinChargeTime": 0, - "AutoBeLoaded": true, - "BeLoadedTime": 0.05, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, "MinContinuousCount": 5, "MaxContinuousCount": 5, "TriggerInterval": 3.5, diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room4.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room4.tscn index fdf3fff..875a067 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room4.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room4.tscn @@ -7,7 +7,7 @@ [node name="Room4" type="TileMap"] tile_set = ExtResource("1_k1pu4") format = 2 -layer_0/tile_data = PackedInt32Array(1179669, 0, 8, 1114133, 0, 8, 1048597, 0, 8, 983061, 0, 8, 917525, 0, 8, 851989, 0, 8, 786453, 0, 8, 720917, 0, 8, 655381, 0, 8, 589845, 0, 8, 524309, 0, 8, 458773, 0, 8, 393237, 0, 8, 327701, 0, 8, 262165, 0, 8, 196629, 0, 8, 131093, 0, 8, 65557, 0, 8, 21, 0, 8, 1179668, 0, 8, 1114132, 0, 8, 1048596, 0, 8, 983060, 0, 8, 917524, 0, 8, 851988, 0, 8, 786452, 0, 8, 720916, 0, 8, 655380, 0, 8, 589844, 0, 8, 524308, 0, 8, 458772, 0, 8, 393236, 0, 8, 327700, 0, 8, 262164, 0, 8, 196628, 0, 8, 131092, 0, 8, 65556, 0, 8, 20, 0, 8, 1179667, 0, 8, 1114131, 0, 8, 65555, 0, 8, 19, 0, 8, 1179666, 0, 8, 1114130, 0, 8, 65554, 0, 8, 18, 0, 8, 1179665, 0, 8, 1114129, 0, 8, 65553, 0, 8, 17, 0, 8, 1179664, 0, 8, 1114128, 0, 8, 65552, 0, 8, 16, 0, 8, 1179663, 0, 8, 1114127, 0, 8, 65551, 0, 8, 15, 0, 8, 1179662, 0, 8, 1114126, 0, 8, 65550, 0, 8, 14, 0, 8, 1179661, 0, 8, 1114125, 0, 8, 65549, 0, 8, 13, 0, 8, 1179660, 0, 8, 1114124, 0, 8, 65548, 0, 8, 12, 0, 8, 1179659, 0, 8, 1114123, 0, 8, 65547, 0, 8, 11, 0, 8, 1179658, 0, 8, 1114122, 0, 8, 65546, 0, 8, 10, 0, 8, 1179657, 0, 8, 1114121, 0, 8, 65545, 0, 8, 9, 0, 8, 1179656, 0, 8, 1114120, 0, 8, 65544, 0, 8, 8, 0, 8, 1179655, 0, 8, 1114119, 0, 8, 65543, 0, 8, 7, 0, 8, 1179654, 0, 8, 1114118, 0, 8, 65542, 0, 8, 6, 0, 8, 1179653, 0, 8, 1114117, 0, 8, 65541, 0, 8, 5, 0, 8, 1179652, 0, 8, 1114116, 0, 8, 65540, 0, 8, 4, 0, 8, 1179651, 0, 8, 1114115, 0, 8, 65539, 0, 8, 3, 0, 8, 1179650, 0, 8, 1114114, 0, 8, 65538, 0, 8, 2, 0, 8, 1179649, 0, 8, 1114113, 0, 8, 1048577, 0, 8, 983041, 0, 8, 917505, 0, 8, 851969, 0, 8, 786433, 0, 8, 720897, 0, 8, 655361, 0, 8, 589825, 0, 8, 524289, 0, 8, 458753, 0, 8, 393217, 0, 8, 327681, 0, 8, 262145, 0, 8, 196609, 0, 8, 131073, 0, 8, 65537, 0, 8, 1, 0, 8, 1179648, 0, 8, 1114112, 0, 8, 1048576, 0, 8, 983040, 0, 8, 917504, 0, 8, 851968, 0, 8, 786432, 0, 8, 720896, 0, 8, 655360, 0, 8, 589824, 0, 8, 524288, 0, 8, 458752, 0, 8, 393216, 0, 8, 327680, 0, 8, 262144, 0, 8, 196608, 0, 8, 131072, 0, 8, 65536, 0, 8, 0, 0, 8, 131071, 0, 8, 65535, 0, 8, -1, 0, 8, -65536, 0, 8, -65535, 0, 8, 196607, 0, 8, 262143, 0, 8, 327679, 0, 8, 393215, 0, 8, 458751, 196608, 2, 524287, 196608, 3, 589823, 196608, 3, 655359, 196608, 3, 720895, 196608, 3, 786431, 196608, 3, 851967, 196608, 3, 917503, 196608, 7, 983039, 0, 8, 1048575, 0, 8, 1114111, 0, 8, 1179647, 0, 8, 1245183, 0, 8, 1245185, 0, 8, 1245184, 0, 8, 1310719, 0, 8, -65534, 0, 8, 1245186, 0, 8, -65533, 0, 8, 1245187, 0, 8, -65532, 0, 8, 1245188, 0, 8, -65531, 0, 8, 1245189, 65536, 2, -65530, 65536, 7, 1245190, 131072, 2, -65529, 131072, 7, 1245191, 131072, 2, -65528, 131072, 7, 1245192, 131072, 2, -65527, 131072, 7, 1245193, 131072, 2, -65526, 131072, 7, 1245194, 131072, 2, -65525, 131072, 7, 1245195, 131072, 2, -65524, 131072, 7, 1245196, 131072, 2, -65523, 131072, 7, 1245197, 131072, 2, -65522, 131072, 7, 1245198, 131072, 2, -65521, 196608, 7, 1245199, 131072, 2, -65520, 0, 8, 1245200, 196608, 2, -65519, 0, 8, 1245201, 0, 8, -65518, 0, 8, 1245202, 0, 8, -65517, 0, 8, 1245203, 0, 8, -65516, 0, 8, 1245204, 0, 8, -65515, 0, 8, 1245205, 0, 8, 22, 0, 8, 65558, 0, 8, -65514, 0, 8, 131094, 0, 8, 196630, 0, 8, 262166, 0, 8, 327702, 0, 8, 393238, 65536, 2, 458774, 65536, 3, 524310, 65536, 3, 589846, 65536, 3, 655382, 65536, 3, 720918, 65536, 3, 786454, 65536, 3, 851990, 65536, 7, 917526, 0, 8, 983062, 0, 8, 1048598, 0, 8, 1114134, 0, 8, 1179670, 0, 8, 1245206, 0, 8, -131067, 0, 8, -196603, 0, 8, -262139, 0, 8, -131068, 0, 8, -196604, 0, 8, -262140, 0, 8, -131069, 0, 8, -196605, 0, 8, -262141, 0, 8, -131070, 0, 8, -196606, 0, 8, -262142, 0, 8, -131071, 0, 8, -196607, 0, 8, -262143, 0, 8, -131072, 0, 8, -196608, 0, 8, -262144, 0, 8, -65537, 0, 8, -131073, 0, 8, -196609, 0, 8, 393214, 0, 8, 327678, 0, 8, 262142, 0, 8, 196606, 0, 8, 131070, 0, 8, 65534, 0, 8, -2, 0, 8, -65538, 0, 8, -131074, 0, 8, -196610, 0, 8, 393213, 0, 8, 327677, 0, 8, 262141, 0, 8, 196605, 0, 8, 131069, 0, 8, 65533, 0, 8, -3, 0, 8, -65539, 0, 8, -131075, 0, 8, -196611, 0, 8, 393212, 0, 8, 327676, 0, 8, 262140, 0, 8, 196604, 0, 8, 131068, 0, 8, 65532, 0, 8, -4, 0, 8, -65540, 0, 8, -131076, 0, 8, -196612, 0, 8, -131077, 196608, 3, -196613, 196608, 3, -262149, 196608, 4, -262148, 131072, 7, -262147, 131072, 7, -65541, 196608, 3, -5, 196608, 3, 65531, 196608, 3, 131067, 196608, 3, 196603, 196608, 3, 262139, 196608, 3, 327675, 196608, 3, 393211, 196608, 3, 458749, 131072, 2, 458748, 131072, 2, 458747, 720896, 2, -262146, 131072, 7, 458750, 131072, 2, -262145, 131072, 7, -327680, 131072, 7, -327679, 131072, 7, -327678, 131072, 7, -327677, 131072, 7, -327676, 131072, 7, -327675, 131072, 7, -262138, 65536, 3, -196602, 65536, 3, -327674, 65536, 4, -131066, 65536, 3, 262169, 0, 8, 196633, 0, 8, 131097, 0, 8, 65561, 0, 8, 25, 0, 8, -65511, 0, 8, -131047, 0, 8, -196583, 0, 8, -262119, 0, 8, 262168, 0, 8, 196632, 0, 8, 131096, 0, 8, 65560, 0, 8, 24, 0, 8, -65512, 0, 8, -131048, 0, 8, -196584, 0, 8, -262120, 0, 8, 262167, 0, 8, 196631, 0, 8, 131095, 0, 8, 65559, 0, 8, 23, 0, 8, -65513, 0, 8, -131049, 0, 8, -196585, 0, 8, -262121, 0, 8, -131050, 0, 8, -196586, 0, 8, -262122, 0, 8, -131051, 0, 8, -196587, 0, 8, -262123, 0, 8, -131052, 0, 8, -196588, 0, 8, -262124, 0, 8, -131053, 0, 8, -196589, 0, 8, -262125, 0, 8, -131054, 0, 8, -196590, 0, 8, -262126, 0, 8, -131055, 0, 8, -196591, 0, 8, -262127, 0, 8, -196592, 0, 8, -262128, 0, 8, -327664, 131072, 7, -327663, 131072, 7, -327662, 131072, 7, -131056, 0, 8, -327661, 131072, 7, -327660, 131072, 7, -327659, 131072, 7, -327658, 131072, 7, -327657, 131072, 7, 327703, 0, 8, -327656, 131072, 7, 327704, 0, 8, -327655, 131072, 7, 327705, 0, 8, -262118, 65536, 3, -196582, 65536, 3, -327654, 65536, 4, -131046, 65536, 3, -65510, 65536, 3, 26, 65536, 3, 65562, 65536, 3, 131098, 65536, 3, 196634, 65536, 3, 262170, 65536, 3, 327706, 65536, 3, 393239, 131072, 2, 393240, 131072, 2, 393241, 131072, 2, 393242, 851968, 2, -196593, 196608, 3, -262129, 196608, 3, -327665, 196608, 4, -131057, 196608, 3, 1441796, 0, 8, 1376260, 0, 8, 1310724, 0, 8, 1441795, 0, 8, 1376259, 0, 8, 1310723, 0, 8, 1441794, 0, 8, 1376258, 0, 8, 1310722, 0, 8, 1441793, 0, 8, 1376257, 0, 8, 1310721, 0, 8, 1441792, 0, 8, 1376256, 0, 8, 1310720, 0, 8, 1507327, 0, 8, 1441791, 0, 8, 1376255, 0, 8, 1507326, 0, 8, 1441790, 0, 8, 1376254, 0, 8, 1310718, 0, 8, 1245182, 0, 8, 1179646, 0, 8, 1114110, 0, 8, 1048574, 0, 8, 983038, 0, 8, 1507325, 0, 8, 1441789, 0, 8, 1376253, 0, 8, 1310717, 0, 8, 1245181, 0, 8, 1179645, 0, 8, 1114109, 0, 8, 1048573, 0, 8, 983037, 0, 8, 1507324, 0, 8, 1441788, 0, 8, 1376252, 0, 8, 1310716, 0, 8, 1245180, 0, 8, 1179644, 0, 8, 1114108, 0, 8, 1048572, 0, 8, 983036, 0, 8, 1048571, 196608, 3, 983035, 196608, 3, 917499, 196608, 4, 917500, 131072, 7, 917501, 131072, 7, 1114107, 196608, 3, 1179643, 196608, 3, 1245179, 196608, 3, 1310715, 196608, 3, 1376251, 196608, 3, 1441787, 196608, 3, 1507323, 196608, 3, 1572861, 131072, 2, 1572860, 131072, 2, 1572859, 720896, 2, 917502, 131072, 7, 1572862, 131072, 2, 1572863, 131072, 2, 1507328, 131072, 2, 1507329, 131072, 2, 1507330, 131072, 2, 1507331, 131072, 2, 1507332, 131072, 2, 1310725, 65536, 3, 1376261, 65536, 3, 1441797, 65536, 3, 1507333, 851968, 2, 1441817, 0, 8, 1376281, 0, 8, 1310745, 0, 8, 1245209, 0, 8, 1179673, 0, 8, 1114137, 0, 8, 1048601, 0, 8, 983065, 0, 8, 917529, 0, 8, 1441816, 0, 8, 1376280, 0, 8, 1310744, 0, 8, 1245208, 0, 8, 1179672, 0, 8, 1114136, 0, 8, 1048600, 0, 8, 983064, 0, 8, 917528, 0, 8, 1441815, 0, 8, 1376279, 0, 8, 1310743, 0, 8, 1245207, 0, 8, 1179671, 0, 8, 1114135, 0, 8, 1048599, 0, 8, 983063, 0, 8, 917527, 0, 8, 1441814, 0, 8, 1376278, 0, 8, 1310742, 0, 8, 1441813, 0, 8, 1376277, 0, 8, 1310741, 0, 8, 1441812, 0, 8, 1376276, 0, 8, 1310740, 0, 8, 1441811, 0, 8, 1376275, 0, 8, 1310739, 0, 8, 1441810, 0, 8, 1376274, 0, 8, 1310738, 0, 8, 1441809, 0, 8, 1376273, 0, 8, 1310737, 0, 8, 1310736, 196608, 3, 1376272, 196608, 3, 1441808, 196608, 3, 1507346, 131072, 2, 1507345, 131072, 2, 1507344, 720896, 2, 1507347, 131072, 2, 1507348, 131072, 2, 1507349, 131072, 2, 1507350, 131072, 2, 851991, 131072, 7, 1507351, 131072, 2, 851992, 131072, 7, 1507352, 131072, 2, 851993, 131072, 7, 1507353, 131072, 2, 917530, 65536, 3, 983066, 65536, 3, 851994, 65536, 4, 1048602, 65536, 3, 1114138, 65536, 3, 1179674, 65536, 3, 1245210, 65536, 3, 1310746, 65536, 3, 1376282, 65536, 3, 1441818, 65536, 3, 1507354, 851968, 2, 458754, 65536, 3, 131088, 131072, 2, 851970, 65536, 3, 131075, 131072, 2, 131074, 65536, 2, 131076, 131072, 2, 131077, 131072, 2, 131078, 131072, 2, 131079, 131072, 2, 131080, 131072, 2, 131081, 131072, 2, 131082, 131072, 2, 131083, 131072, 2, 131084, 131072, 2, 131085, 131072, 2, 131086, 131072, 2, 131087, 131072, 2, 131089, 131072, 2, 131090, 131072, 2, 131091, 196608, 2, 196627, 196608, 3, 262163, 196608, 3, 327699, 196608, 3, 393235, 196608, 3, 458771, 196608, 3, 524307, 196608, 3, 589843, 196608, 3, 655379, 196608, 3, 720915, 196608, 3, 786451, 196608, 3, 851987, 196608, 3, 917523, 196608, 3, 983059, 196608, 3, 1048595, 196608, 7, 1048578, 65536, 7, 1048579, 131072, 7, 1048580, 131072, 7, 1048581, 131072, 7, 1048582, 131072, 7, 1048583, 131072, 7, 1048584, 131072, 7, 1048585, 131072, 7, 1048586, 131072, 7, 1048587, 131072, 7, 1048588, 131072, 7, 1048589, 131072, 7, 1048590, 131072, 7, 1048591, 131072, 7, 1048592, 131072, 7, 1048593, 131072, 7, 1048594, 131072, 7, 196610, 65536, 3, 262146, 65536, 3, 327682, 65536, 3, 393218, 65536, 3, 524290, 65536, 3, 589826, 65536, 3, 655362, 65536, 3, 720898, 65536, 3, 786434, 65536, 3, 917506, 65536, 3, 983042, 65536, 3) +layer_0/tile_data = PackedInt32Array(1179669, 0, 8, 1114133, 0, 8, 1048597, 0, 8, 983061, 0, 8, 917525, 0, 8, 851989, 0, 8, 786453, 0, 8, 720917, 0, 8, 655381, 0, 8, 589845, 0, 8, 524309, 0, 8, 458773, 0, 8, 393237, 0, 8, 327701, 0, 8, 262165, 0, 8, 196629, 0, 8, 131093, 0, 8, 65557, 0, 8, 21, 0, 8, 1179668, 0, 8, 1114132, 0, 8, 1048596, 0, 8, 983060, 0, 8, 917524, 0, 8, 851988, 0, 8, 786452, 0, 8, 720916, 0, 8, 655380, 0, 8, 589844, 0, 8, 524308, 0, 8, 458772, 0, 8, 393236, 0, 8, 327700, 0, 8, 262164, 0, 8, 196628, 0, 8, 131092, 0, 8, 65556, 0, 8, 20, 0, 8, 1179667, 0, 8, 1114131, 0, 8, 65555, 0, 8, 19, 0, 8, 1179666, 0, 8, 1114130, 0, 8, 65554, 0, 8, 18, 0, 8, 1179665, 0, 8, 1114129, 0, 8, 65553, 0, 8, 17, 0, 8, 1179664, 0, 8, 1114128, 0, 8, 65552, 0, 8, 16, 0, 8, 1179663, 0, 8, 1114127, 0, 8, 65551, 0, 8, 15, 0, 8, 1179662, 0, 8, 1114126, 0, 8, 65550, 0, 8, 14, 0, 8, 1179661, 0, 8, 1114125, 0, 8, 65549, 0, 8, 13, 0, 8, 1179660, 0, 8, 1114124, 0, 8, 65548, 0, 8, 12, 0, 8, 1179659, 0, 8, 1114123, 0, 8, 65547, 0, 8, 11, 0, 8, 1179658, 0, 8, 1114122, 0, 8, 65546, 0, 8, 10, 0, 8, 1179657, 0, 8, 1114121, 0, 8, 65545, 0, 8, 9, 0, 8, 1179656, 0, 8, 1114120, 0, 8, 65544, 0, 8, 8, 0, 8, 1179655, 0, 8, 1114119, 0, 8, 65543, 0, 8, 7, 0, 8, 1179654, 0, 8, 1114118, 0, 8, 65542, 0, 8, 6, 0, 8, 1179653, 0, 8, 1114117, 0, 8, 65541, 0, 8, 5, 0, 8, 1179652, 0, 8, 1114116, 0, 8, 65540, 0, 8, 4, 0, 8, 1179651, 0, 8, 1114115, 0, 8, 65539, 0, 8, 3, 0, 8, 1179650, 0, 8, 1114114, 0, 8, 65538, 0, 8, 2, 0, 8, 1179649, 0, 8, 1114113, 0, 8, 1048577, 0, 8, 983041, 0, 8, 917505, 0, 8, 851969, 0, 8, 786433, 0, 8, 720897, 0, 8, 655361, 0, 8, 589825, 0, 8, 524289, 0, 8, 458753, 0, 8, 393217, 0, 8, 327681, 0, 8, 262145, 0, 8, 196609, 0, 8, 131073, 0, 8, 65537, 0, 8, 1, 0, 8, 1179648, 0, 8, 1114112, 0, 8, 1048576, 0, 8, 983040, 0, 8, 917504, 0, 8, 851968, 0, 8, 786432, 0, 8, 720896, 0, 8, 655360, 0, 8, 589824, 0, 8, 524288, 0, 8, 458752, 0, 8, 393216, 0, 8, 327680, 0, 8, 262144, 0, 8, 196608, 0, 8, 131072, 0, 8, 65536, 0, 8, 0, 0, 8, 131071, 0, 8, 65535, 0, 8, -1, 0, 8, -65536, 0, 8, -65535, 0, 8, 196607, 0, 8, 262143, 0, 8, 327679, 0, 8, 393215, 0, 8, 458751, 196608, 2, 524287, 196608, 3, 589823, 196608, 3, 655359, 196608, 3, 720895, 196608, 3, 786431, 196608, 3, 851967, 196608, 3, 917503, 196608, 7, 983039, 0, 8, 1048575, 0, 8, 1114111, 0, 8, 1179647, 0, 8, 1245183, 0, 8, 1245185, 0, 8, 1245184, 0, 8, 1310719, 0, 8, -65534, 0, 8, 1245186, 0, 8, -65533, 0, 8, 1245187, 0, 8, -65532, 0, 8, 1245188, 0, 8, -65531, 0, 8, 1245189, 0, 8, -65530, 65536, 7, 1245190, 65536, 2, -65529, 131072, 7, 1245191, 131072, 2, -65528, 131072, 7, 1245192, 131072, 2, -65527, 131072, 7, 1245193, 131072, 2, -65526, 131072, 7, 1245194, 131072, 2, -65525, 131072, 7, 1245195, 131072, 2, -65524, 131072, 7, 1245196, 131072, 2, -65523, 131072, 7, 1245197, 131072, 2, -65522, 131072, 7, 1245198, 131072, 2, -65521, 196608, 7, 1245199, 196608, 2, -65520, 0, 8, 1245200, 0, 8, -65519, 0, 8, 1245201, 0, 8, -65518, 0, 8, 1245202, 0, 8, -65517, 0, 8, 1245203, 0, 8, -65516, 0, 8, 1245204, 0, 8, -65515, 0, 8, 1245205, 0, 8, 22, 0, 8, 65558, 0, 8, -65514, 0, 8, 131094, 0, 8, 196630, 0, 8, 262166, 0, 8, 327702, 0, 8, 393238, 65536, 2, 458774, 65536, 3, 524310, 65536, 3, 589846, 65536, 3, 655382, 65536, 3, 720918, 65536, 3, 786454, 65536, 3, 851990, 65536, 7, 917526, 0, 8, 983062, 0, 8, 1048598, 0, 8, 1114134, 0, 8, 1179670, 0, 8, 1245206, 0, 8, -131067, 0, 8, -196603, 0, 8, -262139, 0, 8, -131068, 0, 8, -196604, 0, 8, -262140, 0, 8, -131069, 0, 8, -196605, 0, 8, -262141, 0, 8, -131070, 0, 8, -196606, 0, 8, -262142, 0, 8, -131071, 0, 8, -196607, 0, 8, -262143, 0, 8, -131072, 0, 8, -196608, 0, 8, -262144, 0, 8, -65537, 0, 8, -131073, 0, 8, -196609, 0, 8, 393214, 0, 8, 327678, 0, 8, 262142, 0, 8, 196606, 0, 8, 131070, 0, 8, 65534, 0, 8, -2, 0, 8, -65538, 0, 8, -131074, 0, 8, -196610, 0, 8, 393213, 0, 8, 327677, 0, 8, 262141, 0, 8, 196605, 0, 8, 131069, 0, 8, 65533, 0, 8, -3, 0, 8, -65539, 0, 8, -131075, 0, 8, -196611, 0, 8, 393212, 0, 8, 327676, 0, 8, 262140, 0, 8, 196604, 0, 8, 131068, 0, 8, 65532, 0, 8, -4, 0, 8, -65540, 0, 8, -131076, 0, 8, -196612, 0, 8, -131077, 196608, 3, -196613, 196608, 3, -262149, 196608, 4, -262148, 131072, 7, -262147, 131072, 7, -65541, 196608, 3, -5, 196608, 3, 65531, 196608, 3, 131067, 196608, 3, 196603, 196608, 3, 262139, 196608, 3, 327675, 196608, 3, 393211, 196608, 3, 458749, 131072, 2, 458748, 131072, 2, 458747, 720896, 2, -262146, 131072, 7, 458750, 131072, 2, -262145, 131072, 7, -327680, 131072, 7, -327679, 131072, 7, -327678, 131072, 7, -327677, 131072, 7, -327676, 131072, 7, -327675, 131072, 7, -262138, 65536, 3, -196602, 65536, 3, -327674, 65536, 4, -131066, 65536, 3, 262169, 0, 8, 196633, 0, 8, 131097, 0, 8, 65561, 0, 8, 25, 0, 8, -65511, 0, 8, -131047, 0, 8, -196583, 0, 8, -262119, 0, 8, 262168, 0, 8, 196632, 0, 8, 131096, 0, 8, 65560, 0, 8, 24, 0, 8, -65512, 0, 8, -131048, 0, 8, -196584, 0, 8, -262120, 0, 8, 262167, 0, 8, 196631, 0, 8, 131095, 0, 8, 65559, 0, 8, 23, 0, 8, -65513, 0, 8, -131049, 0, 8, -196585, 0, 8, -262121, 0, 8, -131050, 0, 8, -196586, 0, 8, -262122, 0, 8, -131051, 0, 8, -196587, 0, 8, -262123, 0, 8, -131052, 0, 8, -196588, 0, 8, -262124, 0, 8, -131053, 0, 8, -196589, 0, 8, -262125, 0, 8, -131054, 0, 8, -196590, 0, 8, -262126, 0, 8, -131055, 0, 8, -196591, 0, 8, -262127, 0, 8, -196592, 0, 8, -262128, 0, 8, -327664, 131072, 7, -327663, 131072, 7, -327662, 131072, 7, -131056, 0, 8, -327661, 131072, 7, -327660, 131072, 7, -327659, 131072, 7, -327658, 131072, 7, -327657, 131072, 7, 327703, 0, 8, -327656, 131072, 7, 327704, 0, 8, -327655, 131072, 7, 327705, 0, 8, -262118, 65536, 3, -196582, 65536, 3, -327654, 65536, 4, -131046, 65536, 3, -65510, 65536, 3, 26, 65536, 3, 65562, 65536, 3, 131098, 65536, 3, 196634, 65536, 3, 262170, 65536, 3, 327706, 65536, 3, 393239, 131072, 2, 393240, 131072, 2, 393241, 131072, 2, 393242, 851968, 2, -196593, 196608, 3, -262129, 196608, 3, -327665, 196608, 4, -131057, 196608, 3, 1441796, 0, 8, 1376260, 0, 8, 1310724, 0, 8, 1441795, 0, 8, 1376259, 0, 8, 1310723, 0, 8, 1441794, 0, 8, 1376258, 0, 8, 1310722, 0, 8, 1441793, 0, 8, 1376257, 0, 8, 1310721, 0, 8, 1441792, 0, 8, 1376256, 0, 8, 1310720, 0, 8, 1507327, 0, 8, 1441791, 0, 8, 1376255, 0, 8, 1507326, 0, 8, 1441790, 0, 8, 1376254, 0, 8, 1310718, 0, 8, 1245182, 0, 8, 1179646, 0, 8, 1114110, 0, 8, 1048574, 0, 8, 983038, 0, 8, 1507325, 0, 8, 1441789, 0, 8, 1376253, 0, 8, 1310717, 0, 8, 1245181, 0, 8, 1179645, 0, 8, 1114109, 0, 8, 1048573, 0, 8, 983037, 0, 8, 1507324, 0, 8, 1441788, 0, 8, 1376252, 0, 8, 1310716, 0, 8, 1245180, 0, 8, 1179644, 0, 8, 1114108, 0, 8, 1048572, 0, 8, 983036, 0, 8, 1048571, 196608, 3, 983035, 196608, 3, 917499, 196608, 4, 917500, 131072, 7, 917501, 131072, 7, 1114107, 196608, 3, 1179643, 196608, 3, 1245179, 196608, 3, 1310715, 196608, 3, 1376251, 196608, 3, 1441787, 196608, 3, 1507323, 196608, 3, 1572861, 131072, 2, 1572860, 131072, 2, 1572859, 720896, 2, 917502, 131072, 7, 1572862, 131072, 2, 1572863, 131072, 2, 1507328, 131072, 2, 1507329, 131072, 2, 1507330, 131072, 2, 1507331, 131072, 2, 1507332, 131072, 2, 1310725, 0, 8, 1376261, 0, 8, 1441797, 0, 8, 1507333, 131072, 2, 1441817, 0, 8, 1376281, 0, 8, 1310745, 0, 8, 1245209, 0, 8, 1179673, 0, 8, 1114137, 0, 8, 1048601, 0, 8, 983065, 0, 8, 917529, 0, 8, 1441816, 0, 8, 1376280, 0, 8, 1310744, 0, 8, 1245208, 0, 8, 1179672, 0, 8, 1114136, 0, 8, 1048600, 0, 8, 983064, 0, 8, 917528, 0, 8, 1441815, 0, 8, 1376279, 0, 8, 1310743, 0, 8, 1245207, 0, 8, 1179671, 0, 8, 1114135, 0, 8, 1048599, 0, 8, 983063, 0, 8, 917527, 0, 8, 1441814, 0, 8, 1376278, 0, 8, 1310742, 0, 8, 1441813, 0, 8, 1376277, 0, 8, 1310741, 0, 8, 1441812, 0, 8, 1376276, 0, 8, 1310740, 0, 8, 1441811, 0, 8, 1376275, 0, 8, 1310739, 0, 8, 1441810, 0, 8, 1376274, 0, 8, 1310738, 0, 8, 1441809, 0, 8, 1376273, 0, 8, 1310737, 0, 8, 1310736, 0, 8, 1376272, 0, 8, 1441808, 0, 8, 1507346, 131072, 2, 1507345, 131072, 2, 1507344, 131072, 2, 1507347, 131072, 2, 1507348, 131072, 2, 1507349, 131072, 2, 1507350, 131072, 2, 851991, 131072, 7, 1507351, 131072, 2, 851992, 131072, 7, 1507352, 131072, 2, 851993, 131072, 7, 1507353, 131072, 2, 917530, 65536, 3, 983066, 65536, 3, 851994, 65536, 4, 1048602, 65536, 3, 1114138, 65536, 3, 1179674, 65536, 3, 1245210, 65536, 3, 1310746, 65536, 3, 1376282, 65536, 3, 1441818, 65536, 3, 1507354, 851968, 2, 458754, 65536, 7, 131088, 0, 8, 851970, 65536, 7, 131075, 0, 8, 131074, 0, 8, 131076, 0, 8, 131077, 0, 8, 131078, 65536, 2, 131079, 196608, 2, 131080, 0, 8, 131081, 0, 8, 131082, 0, 8, 131083, 0, 8, 131084, 0, 8, 131085, 0, 8, 131086, 65536, 2, 131087, 196608, 2, 131089, 0, 8, 131090, 0, 8, 131091, 0, 8, 196627, 0, 8, 262163, 0, 8, 327699, 0, 8, 393235, 196608, 2, 458771, 196608, 7, 524307, 0, 8, 589843, 0, 8, 655379, 0, 8, 720915, 0, 8, 786451, 196608, 2, 851987, 196608, 7, 917523, 0, 8, 983059, 0, 8, 1048595, 0, 8, 1048578, 0, 8, 1048579, 0, 8, 1048580, 0, 8, 1048581, 0, 8, 1048582, 65536, 7, 1048583, 196608, 7, 1048584, 0, 8, 1048585, 0, 8, 1048586, 0, 8, 1048587, 0, 8, 1048588, 0, 8, 1048589, 0, 8, 1048590, 65536, 7, 1048591, 196608, 7, 1048592, 0, 8, 1048593, 0, 8, 1048594, 0, 8, 196610, 0, 8, 262146, 0, 8, 327682, 0, 8, 393218, 65536, 2, 524290, 0, 8, 589826, 0, 8, 655362, 0, 8, 720898, 0, 8, 786434, 65536, 2, 917506, 0, 8, 983042, 0, 8, 983045, 0, 8, 917509, 0, 8, 983044, 0, 8, 917508, 0, 8, 983043, 0, 8, 917507, 0, 8, 851971, 131072, 7, 851972, 131072, 7, 851973, 131072, 7, 917510, 65536, 3, 983046, 65536, 3, 851974, 65536, 4, 1310726, 65536, 3, 1376262, 65536, 3, 1441798, 65536, 3, 1507334, 851968, 2, 327685, 0, 8, 262149, 0, 8, 196613, 0, 8, 327684, 0, 8, 262148, 0, 8, 196612, 0, 8, 327683, 0, 8, 262147, 0, 8, 196611, 0, 8, 393219, 131072, 2, 393220, 131072, 2, 393221, 131072, 2, 196614, 65536, 3, 262150, 65536, 3, 327686, 65536, 3, 393222, 851968, 2, 327698, 0, 8, 262162, 0, 8, 196626, 0, 8, 327697, 0, 8, 262161, 0, 8, 196625, 0, 8, 327696, 0, 8, 262160, 0, 8, 196624, 0, 8, 196623, 196608, 3, 262159, 196608, 3, 327695, 196608, 3, 393233, 131072, 2, 393232, 131072, 2, 393231, 720896, 2, 393234, 131072, 2, 983058, 0, 8, 917522, 0, 8, 983057, 0, 8, 917521, 0, 8, 983056, 0, 8, 917520, 0, 8, 983055, 196608, 3, 917519, 196608, 3, 851983, 196608, 4, 851984, 131072, 7, 851985, 131072, 7, 1310735, 196608, 3, 851986, 131072, 7, 1376271, 196608, 3, 1441807, 196608, 3, 1507343, 720896, 2, 983053, 0, 8, 917517, 0, 8, 851981, 0, 8, 786445, 0, 8, 720909, 0, 8, 655373, 0, 8, 589837, 0, 8, 524301, 0, 8, 458765, 0, 8, 393229, 0, 8, 327693, 0, 8, 262157, 0, 8, 196621, 0, 8, 983052, 0, 8, 917516, 0, 8, 851980, 0, 8, 786444, 0, 8, 720908, 0, 8, 655372, 0, 8, 589836, 0, 8, 524300, 0, 8, 458764, 0, 8, 393228, 0, 8, 327692, 0, 8, 262156, 0, 8, 196620, 0, 8, 983051, 0, 8, 917515, 0, 8, 851979, 0, 8, 786443, 0, 8, 720907, 0, 8, 655371, 0, 8, 589835, 0, 8, 524299, 0, 8, 458763, 0, 8, 393227, 0, 8, 327691, 0, 8, 262155, 0, 8, 196619, 0, 8, 983050, 0, 8, 917514, 0, 8, 851978, 0, 8, 786442, 0, 8, 720906, 0, 8, 655370, 0, 8, 589834, 0, 8, 524298, 0, 8, 458762, 0, 8, 393226, 0, 8, 327690, 0, 8, 262154, 0, 8, 196618, 0, 8, 983049, 0, 8, 917513, 0, 8, 851977, 0, 8, 786441, 0, 8, 720905, 0, 8, 655369, 0, 8, 589833, 0, 8, 524297, 0, 8, 458761, 0, 8, 393225, 0, 8, 327689, 0, 8, 262153, 0, 8, 196617, 0, 8, 983048, 0, 8, 917512, 0, 8, 851976, 0, 8, 786440, 0, 8, 720904, 0, 8, 655368, 0, 8, 589832, 0, 8, 524296, 0, 8, 458760, 0, 8, 393224, 0, 8, 327688, 0, 8, 262152, 0, 8, 196616, 0, 8, 196615, 196608, 3, 262151, 196608, 3, 327687, 196608, 3, 393223, 196608, 3, 458759, 196608, 7, 524295, 0, 8, 589831, 0, 8, 655367, 0, 8, 720903, 0, 8, 786439, 196608, 2, 851975, 196608, 3, 917511, 196608, 3, 983047, 196608, 3, 196622, 65536, 3, 262158, 65536, 3, 327694, 65536, 3, 393230, 65536, 3, 458766, 65536, 7, 524302, 0, 8, 589838, 0, 8, 655374, 0, 8, 720910, 0, 8, 786446, 65536, 2, 851982, 65536, 3, 917518, 65536, 3, 983054, 65536, 3, 720914, 0, 8, 655378, 0, 8, 589842, 0, 8, 524306, 0, 8, 720913, 0, 8, 655377, 0, 8, 589841, 0, 8, 524305, 0, 8, 720912, 0, 8, 655376, 0, 8, 589840, 0, 8, 524304, 0, 8, 720911, 0, 8, 655375, 0, 8, 589839, 0, 8, 524303, 0, 8, 720902, 0, 8, 655366, 0, 8, 589830, 0, 8, 524294, 0, 8, 720901, 0, 8, 655365, 0, 8, 589829, 0, 8, 524293, 0, 8, 720900, 0, 8, 655364, 0, 8, 589828, 0, 8, 524292, 0, 8, 720899, 0, 8, 655363, 0, 8, 589827, 0, 8, 524291, 0, 8, 458755, 131072, 7, 786435, 131072, 2, 458756, 131072, 7, 786436, 131072, 2, 458757, 131072, 7, 786437, 131072, 2, 458758, 131072, 7, 786438, 131072, 2, 458767, 131072, 7, 786447, 131072, 2, 458768, 131072, 7, 786448, 131072, 2, 458769, 131072, 7, 786449, 131072, 2, 458770, 131072, 7, 786450, 131072, 2) script = ExtResource("dungeonRoomTemplate") [node name="EnemyMark" type="Node2D" parent="."] diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn index b971027..02b1565 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn @@ -22,3 +22,73 @@ Type = 5 ItemExpression = "0003" WaveNumber = 2 + +[node name="ActivityMark8" type="Node2D" parent="."] +position = Vector2(126, 41) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0001" +WaveNumber = 2 + +[node name="ActivityMark9" type="Node2D" parent="."] +position = Vector2(125, 68) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0002" +WaveNumber = 2 + +[node name="ActivityMark10" type="Node2D" parent="."] +position = Vector2(124, 18) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0003" +WaveNumber = 2 + +[node name="ActivityMark11" type="Node2D" parent="."] +position = Vector2(34, 19) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0004" +WaveNumber = 2 + +[node name="ActivityMark12" type="Node2D" parent="."] +position = Vector2(64, 21) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0005" +WaveNumber = 2 + +[node name="ActivityMark13" type="Node2D" parent="."] +position = Vector2(93, 22) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0006" +WaveNumber = 2 + +[node name="ActivityMark14" type="Node2D" parent="."] +position = Vector2(32, 46) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0007" +WaveNumber = 2 + +[node name="ActivityMark15" type="Node2D" parent="."] +position = Vector2(56, 55) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0008" +WaveNumber = 2 + +[node name="ActivityMark16" type="Node2D" parent="."] +position = Vector2(27, 76) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0009" +WaveNumber = 2 + +[node name="ActivityMark17" type="Node2D" parent="."] +position = Vector2(49, 79) +script = ExtResource("3_m4jrh") +Type = 9 +ItemExpression = "0010" +WaveNumber = 2 diff --git a/DungeonShooting_Godot/resource/map/tiledata/testGroup/inlet/Room1.json b/DungeonShooting_Godot/resource/map/tiledata/testGroup/inlet/Room1.json index 952528a..6c3fba1 100644 --- a/DungeonShooting_Godot/resource/map/tiledata/testGroup/inlet/Room1.json +++ b/DungeonShooting_Godot/resource/map/tiledata/testGroup/inlet/Room1.json @@ -1,38 +1,38 @@ { "Position": { - "X": -1, - "Y": -1 + "X": -1, + "Y": -1 }, "Size": { - "X": 12, - "Y": 8 + "X": 12, + "Y": 8 }, "DoorAreaInfos": [], "NavigationList": [ - { - "Type": 0, - "Points": [ - { - "X": 8, - "Y": 8 - }, - { - "X": 152, - "Y": 8 - }, - { - "X": 152, - "Y": 96 - }, - { - "X": 8, - "Y": 96 - } - ] - } + { + "Type": 0, + "Points": [ + { + "X": 8, + "Y": 8 + }, + { + "X": 152, + "Y": 8 + }, + { + "X": 152, + "Y": 96 + }, + { + "X": 8, + "Y": 96 + } + ] + } ], "GroupName": "testGroup", "RoomType": 1, "FileName": "Room1", "Weight": 100 -} +} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0001.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0001.png new file mode 100644 index 0000000..6fe4302 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0001.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0001.png.import new file mode 100644 index 0000000..93bddc7 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bls55gj8h3mgv" +path="res://.godot/imported/Buff0001.png-2d51f6e8c41b1c1eaee342d36314d326.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0001.png" +dest_files=["res://.godot/imported/Buff0001.png-2d51f6e8c41b1c1eaee342d36314d326.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/sprite/prop/buff/Buff0002.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0002.png new file mode 100644 index 0000000..3dbfda5 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0002.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0002.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0002.png.import new file mode 100644 index 0000000..52de2ce --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0002.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cv2joc07ymofw" +path="res://.godot/imported/Buff0002.png-d91464bb53e0e88b01f5baa35217c454.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0002.png" +dest_files=["res://.godot/imported/Buff0002.png-d91464bb53e0e88b01f5baa35217c454.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/sprite/prop/buff/Buff0003.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0003.png new file mode 100644 index 0000000..b5ea631 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0003.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0003.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0003.png.import new file mode 100644 index 0000000..7f73e44 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0003.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://osr0v1c6l8ly" +path="res://.godot/imported/Buff0003.png-584cb6fcf8fce750a2603c98c852dabb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0003.png" +dest_files=["res://.godot/imported/Buff0003.png-584cb6fcf8fce750a2603c98c852dabb.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/sprite/prop/buff/Buff0004.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0004.png new file mode 100644 index 0000000..d46fe72 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0004.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0004.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0004.png.import new file mode 100644 index 0000000..72ea312 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0004.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0c25nihdcgt1" +path="res://.godot/imported/Buff0004.png-29449655cacc702b1b5df1587e70bcd4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0004.png" +dest_files=["res://.godot/imported/Buff0004.png-29449655cacc702b1b5df1587e70bcd4.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/sprite/prop/buff/Buff0005.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0005.png new file mode 100644 index 0000000..b47eda1 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0005.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0005.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0005.png.import new file mode 100644 index 0000000..085be93 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0005.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dse0mbg06ngya" +path="res://.godot/imported/Buff0005.png-f0e3c022ce4baafb91a48332b46fb6dc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0005.png" +dest_files=["res://.godot/imported/Buff0005.png-f0e3c022ce4baafb91a48332b46fb6dc.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/sprite/prop/buff/Buff0006.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0006.png new file mode 100644 index 0000000..18ce355 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0006.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0006.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0006.png.import new file mode 100644 index 0000000..4bdda12 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0006.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://do8blk3xm5uy1" +path="res://.godot/imported/Buff0006.png-ad8ef1b00368b9ade7dad2594a085571.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0006.png" +dest_files=["res://.godot/imported/Buff0006.png-ad8ef1b00368b9ade7dad2594a085571.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/sprite/prop/buff/Buff0007.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0007.png new file mode 100644 index 0000000..f33940f --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0007.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0007.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0007.png.import new file mode 100644 index 0000000..7230b9e --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0007.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://fql5q452jqo0" +path="res://.godot/imported/Buff0007.png-37ef8d668ae6ca956b70dc6c26afcbc0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0007.png" +dest_files=["res://.godot/imported/Buff0007.png-37ef8d668ae6ca956b70dc6c26afcbc0.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/sprite/prop/buff/Buff0008.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0008.png new file mode 100644 index 0000000..a4bcdd9 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0008.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0008.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0008.png.import new file mode 100644 index 0000000..25fcbee --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0008.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cn8f56vjb02u2" +path="res://.godot/imported/Buff0008.png-ecd91d54a17d95369afbfc71a13b1169.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0008.png" +dest_files=["res://.godot/imported/Buff0008.png-ecd91d54a17d95369afbfc71a13b1169.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/sprite/prop/buff/Buff0009.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0009.png new file mode 100644 index 0000000..924de09 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0009.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0009.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0009.png.import new file mode 100644 index 0000000..e234265 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0009.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csak48bvrnws" +path="res://.godot/imported/Buff0009.png-979bb78617d9bc313dff43a0eaf20cfe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0009.png" +dest_files=["res://.godot/imported/Buff0009.png-979bb78617d9bc313dff43a0eaf20cfe.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/sprite/prop/buff/Buff0010.png b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0010.png new file mode 100644 index 0000000..93884d3 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0010.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0010.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0010.png.import new file mode 100644 index 0000000..f37f1fa --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/Buff0010.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dlsfun6svqfmm" +path="res://.godot/imported/Buff0010.png-a06964d9e3d5d952bb98001bfcb26102.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/Buff0010.png" +dest_files=["res://.godot/imported/Buff0010.png-a06964d9e3d5d952bb98001bfcb26102.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/Bullet0001.tres b/DungeonShooting_Godot/resource/spriteFrames/Bullet0001.tres deleted file mode 100644 index 6af29a8..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Bullet0001.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://baoxep7vami72"] - -[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/bullet.png" id="1_ktu7r"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_ktu7r") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Bullet0002.tres b/DungeonShooting_Godot/resource/spriteFrames/Bullet0002.tres deleted file mode 100644 index cb31134..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Bullet0002.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bpeodjqiy3mil"] - -[ext_resource type="Texture2D" uid="uid://ctsvj4y1t538u" path="res://resource/sprite/bullet/bullet3.png" id="1_53f3g"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_53f3g") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/KnifeHit1.tres b/DungeonShooting_Godot/resource/spriteFrames/KnifeHit1.tres deleted file mode 100644 index a491979..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/KnifeHit1.tres +++ /dev/null @@ -1,53 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=8 format=3 uid="uid://dj8o7ws03bik4"] - -[ext_resource type="Texture2D" uid="uid://dx07ta0asnmuw" path="res://resource/sprite/effects/KnifeHit1.png" id="1_0yl3h"] - -[sub_resource type="AtlasTexture" id="1"] -atlas = ExtResource("1_0yl3h") -region = Rect2(0, 0, 64, 68) - -[sub_resource type="AtlasTexture" id="2"] -atlas = ExtResource("1_0yl3h") -region = Rect2(64, 0, 64, 68) - -[sub_resource type="AtlasTexture" id="3"] -atlas = ExtResource("1_0yl3h") -region = Rect2(128, 0, 64, 68) - -[sub_resource type="AtlasTexture" id="4"] -atlas = ExtResource("1_0yl3h") -region = Rect2(192, 0, 64, 68) - -[sub_resource type="AtlasTexture" id="5"] -atlas = ExtResource("1_0yl3h") -region = Rect2(256, 0, 64, 68) - -[sub_resource type="AtlasTexture" id="6"] -atlas = ExtResource("1_0yl3h") -region = Rect2(320, 0, 64, 68) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("1") -}, { -"duration": 1.0, -"texture": SubResource("2") -}, { -"duration": 1.0, -"texture": SubResource("3") -}, { -"duration": 1.0, -"texture": SubResource("4") -}, { -"duration": 1.0, -"texture": SubResource("5") -}, { -"duration": 1.0, -"texture": SubResource("6") -}], -"loop": true, -"name": &"default", -"speed": 30.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Role0001.tres b/DungeonShooting_Godot/resource/spriteFrames/Role0001.tres deleted file mode 100644 index c813ce3..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Role0001.tres +++ /dev/null @@ -1,117 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=15 format=3 uid="uid://n11thtali6es"] - -[ext_resource type="Texture2D" uid="uid://bhwhhg2dfsr26" path="res://resource/sprite/role/role2.png" id="1_n8j7s"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_tmewn"] -atlas = ExtResource("1_n8j7s") -region = Rect2(0, 0, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dvg4a"] -atlas = ExtResource("1_n8j7s") -region = Rect2(0, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kvuct"] -atlas = ExtResource("1_n8j7s") -region = Rect2(16, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_5op76"] -atlas = ExtResource("1_n8j7s") -region = Rect2(32, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_helyc"] -atlas = ExtResource("1_n8j7s") -region = Rect2(48, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_67mn8"] -atlas = ExtResource("1_n8j7s") -region = Rect2(48, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_jeywq"] -atlas = ExtResource("1_n8j7s") -region = Rect2(32, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_oycx8"] -atlas = ExtResource("1_n8j7s") -region = Rect2(16, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_tjg1t"] -atlas = ExtResource("1_n8j7s") -region = Rect2(0, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_2ltxw"] -atlas = ExtResource("1_n8j7s") -region = Rect2(0, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_x1va1"] -atlas = ExtResource("1_n8j7s") -region = Rect2(16, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ic2p5"] -atlas = ExtResource("1_n8j7s") -region = Rect2(32, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_j3hdu"] -atlas = ExtResource("1_n8j7s") -region = Rect2(48, 48, 16, 24) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_tmewn") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_dvg4a") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kvuct") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_5op76") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_helyc") -}], -"loop": true, -"name": &"idle", -"speed": 7.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_67mn8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_jeywq") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_oycx8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_tjg1t") -}], -"loop": true, -"name": &"reverseRun", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_2ltxw") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_x1va1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ic2p5") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_j3hdu") -}], -"loop": true, -"name": &"run", -"speed": 10.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Role1001.tres b/DungeonShooting_Godot/resource/spriteFrames/Role1001.tres deleted file mode 100644 index 1a49770..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Role1001.tres +++ /dev/null @@ -1,117 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=15 format=3 uid="uid://cnctpyrn02rhd"] - -[ext_resource type="Texture2D" uid="uid://chd2vtesap5cf" path="res://resource/sprite/role/enemy0001/Enemy0001.png" id="1_5jhli"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_0rmv6"] -atlas = ExtResource("1_5jhli") -region = Rect2(0, 0, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_3ira8"] -atlas = ExtResource("1_5jhli") -region = Rect2(0, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7fx5y"] -atlas = ExtResource("1_5jhli") -region = Rect2(16, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_5wd43"] -atlas = ExtResource("1_5jhli") -region = Rect2(32, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kbrex"] -atlas = ExtResource("1_5jhli") -region = Rect2(48, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_bhiip"] -atlas = ExtResource("1_5jhli") -region = Rect2(0, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_41c1u"] -atlas = ExtResource("1_5jhli") -region = Rect2(16, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_1o2v8"] -atlas = ExtResource("1_5jhli") -region = Rect2(32, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_niadr"] -atlas = ExtResource("1_5jhli") -region = Rect2(48, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_j73hc"] -atlas = ExtResource("1_5jhli") -region = Rect2(48, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_3bgji"] -atlas = ExtResource("1_5jhli") -region = Rect2(32, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_besw3"] -atlas = ExtResource("1_5jhli") -region = Rect2(16, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_350uy"] -atlas = ExtResource("1_5jhli") -region = Rect2(0, 48, 16, 24) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_0rmv6") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_3ira8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_7fx5y") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_5wd43") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kbrex") -}], -"loop": true, -"name": &"idle", -"speed": 7.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_bhiip") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_41c1u") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_1o2v8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_niadr") -}], -"loop": true, -"name": &"reverseRun", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_j73hc") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_3bgji") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_besw3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_350uy") -}], -"loop": true, -"name": &"run", -"speed": 10.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/RoomDoor_EW.tres b/DungeonShooting_Godot/resource/spriteFrames/RoomDoor_EW.tres deleted file mode 100644 index 8fa6c2a..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/RoomDoor_EW.tres +++ /dev/null @@ -1,161 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=22 format=3 uid="uid://3ps6h2f54qa5"] - -[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/map1/door1_down.png" id="1_7f8h7"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_5m6ya"] -atlas = ExtResource("1_7f8h7") -region = Rect2(144, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kmhtl"] -atlas = ExtResource("1_7f8h7") -region = Rect2(128, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_umaop"] -atlas = ExtResource("1_7f8h7") -region = Rect2(112, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_aqex7"] -atlas = ExtResource("1_7f8h7") -region = Rect2(96, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_hdocg"] -atlas = ExtResource("1_7f8h7") -region = Rect2(80, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_aiymw"] -atlas = ExtResource("1_7f8h7") -region = Rect2(64, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8f7dv"] -atlas = ExtResource("1_7f8h7") -region = Rect2(32, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_iv82l"] -atlas = ExtResource("1_7f8h7") -region = Rect2(16, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ycmnv"] -atlas = ExtResource("1_7f8h7") -region = Rect2(0, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_o7xw0"] -atlas = ExtResource("1_7f8h7") -region = Rect2(144, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_j8iw2"] -atlas = ExtResource("1_7f8h7") -region = Rect2(0, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_823if"] -atlas = ExtResource("1_7f8h7") -region = Rect2(16, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_7hyae"] -atlas = ExtResource("1_7f8h7") -region = Rect2(32, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6lhu3"] -atlas = ExtResource("1_7f8h7") -region = Rect2(48, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_a026j"] -atlas = ExtResource("1_7f8h7") -region = Rect2(64, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_wfjf7"] -atlas = ExtResource("1_7f8h7") -region = Rect2(80, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rhj60"] -atlas = ExtResource("1_7f8h7") -region = Rect2(96, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_06y08"] -atlas = ExtResource("1_7f8h7") -region = Rect2(112, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_1200j"] -atlas = ExtResource("1_7f8h7") -region = Rect2(128, 48, 16, 48) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mbnbx"] -atlas = ExtResource("1_7f8h7") -region = Rect2(144, 48, 16, 48) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_5m6ya") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kmhtl") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_umaop") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_aqex7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_hdocg") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_aiymw") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8f7dv") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_iv82l") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ycmnv") -}], -"loop": false, -"name": &"closeDoor", -"speed": 20.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_o7xw0") -}], -"loop": false, -"name": &"default", -"speed": 20.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_j8iw2") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_823if") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_7hyae") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6lhu3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_a026j") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_wfjf7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rhj60") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_06y08") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_1200j") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mbnbx") -}], -"loop": false, -"name": &"openDoor", -"speed": 20.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/RoomDoor_NS.tres b/DungeonShooting_Godot/resource/spriteFrames/RoomDoor_NS.tres deleted file mode 100644 index 48f90e2..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/RoomDoor_NS.tres +++ /dev/null @@ -1,154 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=21 format=3 uid="uid://xs72aopsgpg6"] - -[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/map1/door1_down.png" id="1_ugffo"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_77i3w"] -atlas = ExtResource("1_ugffo") -region = Rect2(256, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_112lq"] -atlas = ExtResource("1_ugffo") -region = Rect2(224, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_2ojr8"] -atlas = ExtResource("1_ugffo") -region = Rect2(192, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_q58ag"] -atlas = ExtResource("1_ugffo") -region = Rect2(160, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ghweb"] -atlas = ExtResource("1_ugffo") -region = Rect2(128, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_28y4l"] -atlas = ExtResource("1_ugffo") -region = Rect2(96, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0fk5y"] -atlas = ExtResource("1_ugffo") -region = Rect2(64, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_eu8jg"] -atlas = ExtResource("1_ugffo") -region = Rect2(32, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rw4x5"] -atlas = ExtResource("1_ugffo") -region = Rect2(0, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_5dlkq"] -atlas = ExtResource("1_ugffo") -region = Rect2(256, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dnc85"] -atlas = ExtResource("1_ugffo") -region = Rect2(0, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8wepo"] -atlas = ExtResource("1_ugffo") -region = Rect2(32, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_s2c1g"] -atlas = ExtResource("1_ugffo") -region = Rect2(64, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_umj5m"] -atlas = ExtResource("1_ugffo") -region = Rect2(96, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_sceep"] -atlas = ExtResource("1_ugffo") -region = Rect2(128, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0vntu"] -atlas = ExtResource("1_ugffo") -region = Rect2(160, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_66ox7"] -atlas = ExtResource("1_ugffo") -region = Rect2(192, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_o2uxo"] -atlas = ExtResource("1_ugffo") -region = Rect2(224, 0, 32, 32) - -[sub_resource type="AtlasTexture" id="AtlasTexture_m6v3e"] -atlas = ExtResource("1_ugffo") -region = Rect2(256, 0, 32, 32) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_77i3w") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_112lq") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_2ojr8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_q58ag") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ghweb") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_28y4l") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0fk5y") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_eu8jg") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rw4x5") -}], -"loop": false, -"name": &"closeDoor", -"speed": 20.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_5dlkq") -}], -"loop": false, -"name": &"default", -"speed": 20.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_dnc85") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8wepo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_s2c1g") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_umj5m") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_sceep") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0vntu") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_66ox7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_o2uxo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_m6v3e") -}], -"loop": false, -"name": &"openDoor", -"speed": 20.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Shell0001.tres b/DungeonShooting_Godot/resource/spriteFrames/Shell0001.tres deleted file mode 100644 index 6ab6b47..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Shell0001.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://b8gksxl7auquc"] - -[ext_resource type="Texture2D" uid="uid://dto03bc2qbhnj" path="res://resource/sprite/shell/Shell0001.png" id="1_4nusd"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_4nusd") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Shell0002.tres b/DungeonShooting_Godot/resource/spriteFrames/Shell0002.tres deleted file mode 100644 index cda2547..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Shell0002.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://cj8psdl2pova6"] - -[ext_resource type="Texture2D" uid="uid://biiplgrnviefe" path="res://resource/sprite/shell/Shell0002.png" id="1_gpa8q"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_gpa8q") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Shell0003.tres b/DungeonShooting_Godot/resource/spriteFrames/Shell0003.tres deleted file mode 100644 index 99ecb0e..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Shell0003.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://kc1jwvwdg660"] - -[ext_resource type="Texture2D" uid="uid://tq8vhc2kycax" path="res://resource/sprite/shell/Shell0003.png" id="1_qhaf7"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_qhaf7") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0001.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0001.tres deleted file mode 100644 index da7b2a8..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0001.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://5m0qs7m4er5u"] - -[ext_resource type="Texture2D" uid="uid://civvcowt2wklr" path="res://resource/sprite/weapon/weapon0001/Weapon0001.png" id="1_derf1"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_derf1") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0002.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0002.tres deleted file mode 100644 index 4186037..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0002.tres +++ /dev/null @@ -1,62 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=9 format=3 uid="uid://domhmo4flmlt0"] - -[ext_resource type="Texture2D" uid="uid://b53kofmyan42g" path="res://resource/sprite/weapon/weapon0002/Weapon0002.png" id="1_2tglc"] -[ext_resource type="Texture2D" uid="uid://cog4u2dr46anc" path="res://resource/sprite/weapon/weapon0002/Weapon0002_reloading.png" id="2_kr54x"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_b4jme"] -atlas = ExtResource("2_kr54x") -region = Rect2(0, 0, 36, 15) - -[sub_resource type="AtlasTexture" id="AtlasTexture_hhpo6"] -atlas = ExtResource("2_kr54x") -region = Rect2(36, 0, 36, 15) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vicgs"] -atlas = ExtResource("2_kr54x") -region = Rect2(72, 0, 36, 15) - -[sub_resource type="AtlasTexture" id="AtlasTexture_addwe"] -atlas = ExtResource("2_kr54x") -region = Rect2(108, 0, 36, 15) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6nxvp"] -atlas = ExtResource("2_kr54x") -region = Rect2(144, 0, 36, 15) - -[sub_resource type="AtlasTexture" id="AtlasTexture_p0dy6"] -atlas = ExtResource("2_kr54x") -region = Rect2(180, 0, 36, 15) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_b4jme") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_hhpo6") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vicgs") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_addwe") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6nxvp") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_p0dy6") -}], -"loop": false, -"name": &"beLoaded", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_2tglc") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0003.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0003.tres deleted file mode 100644 index 0b2c99f..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0003.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://c7dt1uwdybn5"] - -[ext_resource type="Texture2D" uid="uid://clgf63extg800" path="res://resource/sprite/weapon/weapon0003/Weapon0003.png" id="1_ioiy8"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_ioiy8") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0004.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0004.tres deleted file mode 100644 index 57dbe94..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0004.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://k2tktysa7j86"] - -[ext_resource type="Texture2D" uid="uid://bxhbsq0wb2yo1" path="res://resource/sprite/weapon/knife1.png" id="1_jb24v"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_jb24v") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0005.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0005.tres deleted file mode 100644 index 42bfa7e..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0005.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://djdvlmqsn8bie"] - -[ext_resource type="Texture2D" uid="uid://504f1r0mi33n" path="res://resource/sprite/weapon/weapon0005/Weapon0005.png" id="1_85vfm"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_85vfm") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/Weapon0006.tres b/DungeonShooting_Godot/resource/spriteFrames/Weapon0006.tres deleted file mode 100644 index bfeb80a..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/Weapon0006.tres +++ /dev/null @@ -1,14 +0,0 @@ -[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://dx1mjbx4acs3q"] - -[ext_resource type="Texture2D" uid="uid://dn0un05nr8xun" path="res://resource/sprite/weapon/weapon0006/Weapon0006.png" id="1_di3kf"] - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("1_di3kf") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres new file mode 100644 index 0000000..6af29a8 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://baoxep7vami72"] + +[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/bullet.png" id="1_ktu7r"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_ktu7r") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres new file mode 100644 index 0000000..cb31134 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bpeodjqiy3mil"] + +[ext_resource type="Texture2D" uid="uid://ctsvj4y1t538u" path="res://resource/sprite/bullet/bullet3.png" id="1_53f3g"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_53f3g") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/effect/KnifeHit1.tres b/DungeonShooting_Godot/resource/spriteFrames/effect/KnifeHit1.tres new file mode 100644 index 0000000..a491979 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/effect/KnifeHit1.tres @@ -0,0 +1,53 @@ +[gd_resource type="SpriteFrames" load_steps=8 format=3 uid="uid://dj8o7ws03bik4"] + +[ext_resource type="Texture2D" uid="uid://dx07ta0asnmuw" path="res://resource/sprite/effects/KnifeHit1.png" id="1_0yl3h"] + +[sub_resource type="AtlasTexture" id="1"] +atlas = ExtResource("1_0yl3h") +region = Rect2(0, 0, 64, 68) + +[sub_resource type="AtlasTexture" id="2"] +atlas = ExtResource("1_0yl3h") +region = Rect2(64, 0, 64, 68) + +[sub_resource type="AtlasTexture" id="3"] +atlas = ExtResource("1_0yl3h") +region = Rect2(128, 0, 64, 68) + +[sub_resource type="AtlasTexture" id="4"] +atlas = ExtResource("1_0yl3h") +region = Rect2(192, 0, 64, 68) + +[sub_resource type="AtlasTexture" id="5"] +atlas = ExtResource("1_0yl3h") +region = Rect2(256, 0, 64, 68) + +[sub_resource type="AtlasTexture" id="6"] +atlas = ExtResource("1_0yl3h") +region = Rect2(320, 0, 64, 68) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("1") +}, { +"duration": 1.0, +"texture": SubResource("2") +}, { +"duration": 1.0, +"texture": SubResource("3") +}, { +"duration": 1.0, +"texture": SubResource("4") +}, { +"duration": 1.0, +"texture": SubResource("5") +}, { +"duration": 1.0, +"texture": SubResource("6") +}], +"loop": true, +"name": &"default", +"speed": 30.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_EW.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_EW.tres new file mode 100644 index 0000000..8fa6c2a --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_EW.tres @@ -0,0 +1,161 @@ +[gd_resource type="SpriteFrames" load_steps=22 format=3 uid="uid://3ps6h2f54qa5"] + +[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/map1/door1_down.png" id="1_7f8h7"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_5m6ya"] +atlas = ExtResource("1_7f8h7") +region = Rect2(144, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kmhtl"] +atlas = ExtResource("1_7f8h7") +region = Rect2(128, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_umaop"] +atlas = ExtResource("1_7f8h7") +region = Rect2(112, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_aqex7"] +atlas = ExtResource("1_7f8h7") +region = Rect2(96, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hdocg"] +atlas = ExtResource("1_7f8h7") +region = Rect2(80, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_aiymw"] +atlas = ExtResource("1_7f8h7") +region = Rect2(64, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8f7dv"] +atlas = ExtResource("1_7f8h7") +region = Rect2(32, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_iv82l"] +atlas = ExtResource("1_7f8h7") +region = Rect2(16, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ycmnv"] +atlas = ExtResource("1_7f8h7") +region = Rect2(0, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_o7xw0"] +atlas = ExtResource("1_7f8h7") +region = Rect2(144, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j8iw2"] +atlas = ExtResource("1_7f8h7") +region = Rect2(0, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_823if"] +atlas = ExtResource("1_7f8h7") +region = Rect2(16, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7hyae"] +atlas = ExtResource("1_7f8h7") +region = Rect2(32, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6lhu3"] +atlas = ExtResource("1_7f8h7") +region = Rect2(48, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a026j"] +atlas = ExtResource("1_7f8h7") +region = Rect2(64, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wfjf7"] +atlas = ExtResource("1_7f8h7") +region = Rect2(80, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rhj60"] +atlas = ExtResource("1_7f8h7") +region = Rect2(96, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_06y08"] +atlas = ExtResource("1_7f8h7") +region = Rect2(112, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1200j"] +atlas = ExtResource("1_7f8h7") +region = Rect2(128, 48, 16, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mbnbx"] +atlas = ExtResource("1_7f8h7") +region = Rect2(144, 48, 16, 48) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_5m6ya") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kmhtl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_umaop") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_aqex7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hdocg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_aiymw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8f7dv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_iv82l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ycmnv") +}], +"loop": false, +"name": &"closeDoor", +"speed": 20.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_o7xw0") +}], +"loop": false, +"name": &"default", +"speed": 20.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_j8iw2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_823if") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7hyae") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6lhu3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a026j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wfjf7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rhj60") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_06y08") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1200j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mbnbx") +}], +"loop": false, +"name": &"openDoor", +"speed": 20.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_NS.tres b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_NS.tres new file mode 100644 index 0000000..48f90e2 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/other/RoomDoor_NS.tres @@ -0,0 +1,154 @@ +[gd_resource type="SpriteFrames" load_steps=21 format=3 uid="uid://xs72aopsgpg6"] + +[ext_resource type="Texture2D" uid="uid://dviv44fhwvkb1" path="res://resource/sprite/map/map1/door1_down.png" id="1_ugffo"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_77i3w"] +atlas = ExtResource("1_ugffo") +region = Rect2(256, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_112lq"] +atlas = ExtResource("1_ugffo") +region = Rect2(224, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2ojr8"] +atlas = ExtResource("1_ugffo") +region = Rect2(192, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q58ag"] +atlas = ExtResource("1_ugffo") +region = Rect2(160, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ghweb"] +atlas = ExtResource("1_ugffo") +region = Rect2(128, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_28y4l"] +atlas = ExtResource("1_ugffo") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0fk5y"] +atlas = ExtResource("1_ugffo") +region = Rect2(64, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_eu8jg"] +atlas = ExtResource("1_ugffo") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rw4x5"] +atlas = ExtResource("1_ugffo") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5dlkq"] +atlas = ExtResource("1_ugffo") +region = Rect2(256, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dnc85"] +atlas = ExtResource("1_ugffo") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8wepo"] +atlas = ExtResource("1_ugffo") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s2c1g"] +atlas = ExtResource("1_ugffo") +region = Rect2(64, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_umj5m"] +atlas = ExtResource("1_ugffo") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sceep"] +atlas = ExtResource("1_ugffo") +region = Rect2(128, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0vntu"] +atlas = ExtResource("1_ugffo") +region = Rect2(160, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_66ox7"] +atlas = ExtResource("1_ugffo") +region = Rect2(192, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_o2uxo"] +atlas = ExtResource("1_ugffo") +region = Rect2(224, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_m6v3e"] +atlas = ExtResource("1_ugffo") +region = Rect2(256, 0, 32, 32) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_77i3w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_112lq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2ojr8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q58ag") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ghweb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_28y4l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0fk5y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_eu8jg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rw4x5") +}], +"loop": false, +"name": &"closeDoor", +"speed": 20.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_5dlkq") +}], +"loop": false, +"name": &"default", +"speed": 20.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_dnc85") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8wepo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s2c1g") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_umj5m") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sceep") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0vntu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_66ox7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_o2uxo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_m6v3e") +}], +"loop": false, +"name": &"openDoor", +"speed": 20.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0001.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0001.tres new file mode 100644 index 0000000..6a0ec5f --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0001.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://wtvfyprel72y"] + +[ext_resource type="Texture2D" uid="uid://bls55gj8h3mgv" path="res://resource/sprite/prop/buff/Buff0001.png" id="1_scm06"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_scm06") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0002.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0002.tres new file mode 100644 index 0000000..10e71f0 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0002.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://7t57gsyff470"] + +[ext_resource type="Texture2D" uid="uid://cv2joc07ymofw" path="res://resource/sprite/prop/buff/Buff0002.png" id="1_8nnhb"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_8nnhb") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0003.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0003.tres new file mode 100644 index 0000000..ee3770b --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0003.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://nqoieett75t3"] + +[ext_resource type="Texture2D" uid="uid://osr0v1c6l8ly" path="res://resource/sprite/prop/buff/Buff0003.png" id="1_p16yr"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_p16yr") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0004.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0004.tres new file mode 100644 index 0000000..05d16c9 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0004.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bj0k3pipwp46x"] + +[ext_resource type="Texture2D" uid="uid://c0c25nihdcgt1" path="res://resource/sprite/prop/buff/Buff0004.png" id="1_a2o8b"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_a2o8b") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0005.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0005.tres new file mode 100644 index 0000000..541aa71 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0005.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bvqp46degt1rg"] + +[ext_resource type="Texture2D" uid="uid://dse0mbg06ngya" path="res://resource/sprite/prop/buff/Buff0005.png" id="1_en8jo"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_en8jo") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0006.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0006.tres new file mode 100644 index 0000000..5939146 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0006.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bxn65oovekw6k"] + +[ext_resource type="Texture2D" uid="uid://do8blk3xm5uy1" path="res://resource/sprite/prop/buff/Buff0006.png" id="1_ugsdc"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_ugsdc") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0007.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0007.tres new file mode 100644 index 0000000..49ef0b6 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0007.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://et840sb4d1g3"] + +[ext_resource type="Texture2D" uid="uid://fql5q452jqo0" path="res://resource/sprite/prop/buff/Buff0007.png" id="1_p5fwh"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_p5fwh") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0008.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0008.tres new file mode 100644 index 0000000..d41f23c --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0008.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bs41p1hpkpucb"] + +[ext_resource type="Texture2D" uid="uid://cn8f56vjb02u2" path="res://resource/sprite/prop/buff/Buff0008.png" id="1_7efyb"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_7efyb") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0009.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0009.tres new file mode 100644 index 0000000..be6489f --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0009.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://sqcibio78nwc"] + +[ext_resource type="Texture2D" uid="uid://csak48bvrnws" path="res://resource/sprite/prop/buff/Buff0009.png" id="1_78egk"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_78egk") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0010.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0010.tres new file mode 100644 index 0000000..c5a3629 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/Buff0010.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://dxqtm7xgn2wms"] + +[ext_resource type="Texture2D" uid="uid://dlsfun6svqfmm" path="res://resource/sprite/prop/buff/Buff0010.png" id="1_w8rnu"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_w8rnu") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/role/Role0001.tres b/DungeonShooting_Godot/resource/spriteFrames/role/Role0001.tres new file mode 100644 index 0000000..c813ce3 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/role/Role0001.tres @@ -0,0 +1,117 @@ +[gd_resource type="SpriteFrames" load_steps=15 format=3 uid="uid://n11thtali6es"] + +[ext_resource type="Texture2D" uid="uid://bhwhhg2dfsr26" path="res://resource/sprite/role/role2.png" id="1_n8j7s"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_tmewn"] +atlas = ExtResource("1_n8j7s") +region = Rect2(0, 0, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dvg4a"] +atlas = ExtResource("1_n8j7s") +region = Rect2(0, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kvuct"] +atlas = ExtResource("1_n8j7s") +region = Rect2(16, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5op76"] +atlas = ExtResource("1_n8j7s") +region = Rect2(32, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_helyc"] +atlas = ExtResource("1_n8j7s") +region = Rect2(48, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_67mn8"] +atlas = ExtResource("1_n8j7s") +region = Rect2(48, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jeywq"] +atlas = ExtResource("1_n8j7s") +region = Rect2(32, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_oycx8"] +atlas = ExtResource("1_n8j7s") +region = Rect2(16, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tjg1t"] +atlas = ExtResource("1_n8j7s") +region = Rect2(0, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2ltxw"] +atlas = ExtResource("1_n8j7s") +region = Rect2(0, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x1va1"] +atlas = ExtResource("1_n8j7s") +region = Rect2(16, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ic2p5"] +atlas = ExtResource("1_n8j7s") +region = Rect2(32, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j3hdu"] +atlas = ExtResource("1_n8j7s") +region = Rect2(48, 48, 16, 24) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_tmewn") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_dvg4a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kvuct") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5op76") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_helyc") +}], +"loop": true, +"name": &"idle", +"speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_67mn8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jeywq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_oycx8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tjg1t") +}], +"loop": true, +"name": &"reverseRun", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_2ltxw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x1va1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ic2p5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_j3hdu") +}], +"loop": true, +"name": &"run", +"speed": 10.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/role/Role1001.tres b/DungeonShooting_Godot/resource/spriteFrames/role/Role1001.tres new file mode 100644 index 0000000..1a49770 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/role/Role1001.tres @@ -0,0 +1,117 @@ +[gd_resource type="SpriteFrames" load_steps=15 format=3 uid="uid://cnctpyrn02rhd"] + +[ext_resource type="Texture2D" uid="uid://chd2vtesap5cf" path="res://resource/sprite/role/enemy0001/Enemy0001.png" id="1_5jhli"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_0rmv6"] +atlas = ExtResource("1_5jhli") +region = Rect2(0, 0, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3ira8"] +atlas = ExtResource("1_5jhli") +region = Rect2(0, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7fx5y"] +atlas = ExtResource("1_5jhli") +region = Rect2(16, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5wd43"] +atlas = ExtResource("1_5jhli") +region = Rect2(32, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kbrex"] +atlas = ExtResource("1_5jhli") +region = Rect2(48, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bhiip"] +atlas = ExtResource("1_5jhli") +region = Rect2(0, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_41c1u"] +atlas = ExtResource("1_5jhli") +region = Rect2(16, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1o2v8"] +atlas = ExtResource("1_5jhli") +region = Rect2(32, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_niadr"] +atlas = ExtResource("1_5jhli") +region = Rect2(48, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j73hc"] +atlas = ExtResource("1_5jhli") +region = Rect2(48, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3bgji"] +atlas = ExtResource("1_5jhli") +region = Rect2(32, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_besw3"] +atlas = ExtResource("1_5jhli") +region = Rect2(16, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_350uy"] +atlas = ExtResource("1_5jhli") +region = Rect2(0, 48, 16, 24) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_0rmv6") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_3ira8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7fx5y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5wd43") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kbrex") +}], +"loop": true, +"name": &"idle", +"speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_bhiip") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_41c1u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1o2v8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_niadr") +}], +"loop": true, +"name": &"reverseRun", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_j73hc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3bgji") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_besw3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_350uy") +}], +"loop": true, +"name": &"run", +"speed": 10.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0001.tres b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0001.tres new file mode 100644 index 0000000..6ab6b47 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0001.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://b8gksxl7auquc"] + +[ext_resource type="Texture2D" uid="uid://dto03bc2qbhnj" path="res://resource/sprite/shell/Shell0001.png" id="1_4nusd"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_4nusd") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0002.tres b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0002.tres new file mode 100644 index 0000000..cda2547 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0002.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://cj8psdl2pova6"] + +[ext_resource type="Texture2D" uid="uid://biiplgrnviefe" path="res://resource/sprite/shell/Shell0002.png" id="1_gpa8q"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_gpa8q") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0003.tres b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0003.tres new file mode 100644 index 0000000..99ecb0e --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0003.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://kc1jwvwdg660"] + +[ext_resource type="Texture2D" uid="uid://tq8vhc2kycax" path="res://resource/sprite/shell/Shell0003.png" id="1_qhaf7"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_qhaf7") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0001.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0001.tres new file mode 100644 index 0000000..da7b2a8 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0001.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://5m0qs7m4er5u"] + +[ext_resource type="Texture2D" uid="uid://civvcowt2wklr" path="res://resource/sprite/weapon/weapon0001/Weapon0001.png" id="1_derf1"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_derf1") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0002.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0002.tres new file mode 100644 index 0000000..4186037 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0002.tres @@ -0,0 +1,62 @@ +[gd_resource type="SpriteFrames" load_steps=9 format=3 uid="uid://domhmo4flmlt0"] + +[ext_resource type="Texture2D" uid="uid://b53kofmyan42g" path="res://resource/sprite/weapon/weapon0002/Weapon0002.png" id="1_2tglc"] +[ext_resource type="Texture2D" uid="uid://cog4u2dr46anc" path="res://resource/sprite/weapon/weapon0002/Weapon0002_reloading.png" id="2_kr54x"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_b4jme"] +atlas = ExtResource("2_kr54x") +region = Rect2(0, 0, 36, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hhpo6"] +atlas = ExtResource("2_kr54x") +region = Rect2(36, 0, 36, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vicgs"] +atlas = ExtResource("2_kr54x") +region = Rect2(72, 0, 36, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_addwe"] +atlas = ExtResource("2_kr54x") +region = Rect2(108, 0, 36, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6nxvp"] +atlas = ExtResource("2_kr54x") +region = Rect2(144, 0, 36, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p0dy6"] +atlas = ExtResource("2_kr54x") +region = Rect2(180, 0, 36, 15) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_b4jme") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hhpo6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vicgs") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_addwe") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6nxvp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p0dy6") +}], +"loop": false, +"name": &"beLoaded", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_2tglc") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0003.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0003.tres new file mode 100644 index 0000000..0b2c99f --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0003.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://c7dt1uwdybn5"] + +[ext_resource type="Texture2D" uid="uid://clgf63extg800" path="res://resource/sprite/weapon/weapon0003/Weapon0003.png" id="1_ioiy8"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_ioiy8") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0004.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0004.tres new file mode 100644 index 0000000..57dbe94 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0004.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://k2tktysa7j86"] + +[ext_resource type="Texture2D" uid="uid://bxhbsq0wb2yo1" path="res://resource/sprite/weapon/knife1.png" id="1_jb24v"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_jb24v") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0005.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0005.tres new file mode 100644 index 0000000..42bfa7e --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0005.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://djdvlmqsn8bie"] + +[ext_resource type="Texture2D" uid="uid://504f1r0mi33n" path="res://resource/sprite/weapon/weapon0005/Weapon0005.png" id="1_85vfm"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_85vfm") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0006.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0006.tres new file mode 100644 index 0000000..bfeb80a --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0006.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://dx1mjbx4acs3q"] + +[ext_resource type="Texture2D" uid="uid://dn0un05nr8xun" path="res://resource/sprite/weapon/weapon0006/Weapon0006.png" id="1_di3kf"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_di3kf") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index ec222d8..964879f 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_wvsbp"] +[sub_resource type="Image" id="Image_3bquq"] 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_wvsbp") +image = SubResource("Image_3bquq") [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_fcbqq"] +[sub_resource type="Image" id="Image_k64s6"] 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_fcbqq") +image = SubResource("Image_k64s6") [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_w7mfv"] +[sub_resource type="Image" id="Image_yqyxc"] 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_w7mfv") +image = SubResource("Image_yqyxc") [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_5e8pa"] +[sub_resource type="Image" id="Image_8yymi"] 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_5e8pa") +image = SubResource("Image_8yymi") [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_af734"] +[sub_resource type="Image" id="Image_0f2x1"] 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_af734") +image = SubResource("Image_0f2x1") [sub_resource type="StyleBoxFlat" id="57"] content_margin_left = 6.0 diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs index 12e9730..9234b19 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs @@ -22,16 +22,17 @@ /// Bullet(子弹): 6
/// Shell(弹壳): 7
/// Effect(特效): 8
- /// Other(其它类型): 9 + /// Prop(道具): 9
+ /// Other(其它类型): 99 /// [JsonInclude] public int Type; /// - /// 物体预制场景路径, 场景根节点必须是ActivityObject子类 + /// 物体名称 /// [JsonInclude] - public string Prefab; + public string Name; /// /// 物体备注 @@ -40,6 +41,12 @@ public string Remark; /// + /// 物体预制场景路径, 场景根节点必须是ActivityObject子类 + /// + [JsonInclude] + public string Prefab; + + /// /// 返回浅拷贝出的新对象 /// public ActivityObject Clone() @@ -47,8 +54,9 @@ var inst = new ActivityObject(); inst.Id = Id; inst.Type = Type; - inst.Prefab = Prefab; + inst.Name = Name; inst.Remark = Remark; + inst.Prefab = Prefab; return inst; } } diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs b/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs index 4b20145..22bf390 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs @@ -20,10 +20,10 @@ public string WeaponId; /// - /// 武器显示的名称 + /// 备注 /// [JsonInclude] - public string Name; + public string Remark; /// /// 武器的图标 @@ -119,13 +119,19 @@ public float MinChargeTime; /// - /// 单次射击后是否自动执行上膛操作, 必须将 'ContinuousShoot' 设置为 false + /// 单次射击后是否需要手动上膛动作, 必须将 'ContinuousShoot' 设置为 false /// [JsonInclude] - public bool AutoBeLoaded; + public bool ManualBeLoaded; /// - /// 上膛时间, 如果时间为0, 则不会播放上膛动画和音效, 可以视为没有上膛动作, 必须将 'ContinuousShoot' 设置为 false + /// 手动上膛模式下, 单次射击后是否自动执行上膛操作, 必须将 'ManualBeLoaded' 设置为 true + /// + [JsonInclude] + public bool AutoManualBeLoaded; + + /// + /// 上膛时间, 如果时间为0, 则不会播放上膛动画和音效, 可以视为没有上膛动作, 必须将 'ManualBeLoaded' 设置为 true /// [JsonInclude] public float BeLoadedTime; @@ -421,7 +427,7 @@ var inst = new Weapon(); inst.Id = Id; inst.WeaponId = WeaponId; - inst.Name = Name; + inst.Remark = Remark; inst.Icon = Icon; inst.Weight = Weight; inst.WeightType = WeightType; @@ -437,7 +443,8 @@ inst.AloneReloadCanShoot = AloneReloadCanShoot; inst.LooseShoot = LooseShoot; inst.MinChargeTime = MinChargeTime; - inst.AutoBeLoaded = AutoBeLoaded; + inst.ManualBeLoaded = ManualBeLoaded; + inst.AutoManualBeLoaded = AutoManualBeLoaded; inst.BeLoadedTime = BeLoadedTime; inst.MinContinuousCount = MinContinuousCount; inst.MaxContinuousCount = MaxContinuousCount; diff --git a/DungeonShooting_Godot/src/framework/RefValue.cs b/DungeonShooting_Godot/src/framework/RefValue.cs new file mode 100644 index 0000000..3f2e861 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/RefValue.cs @@ -0,0 +1,13 @@ + +/// +/// 引用值数据类 +/// +public class RefValue +{ + public T Value; + + public RefValue(T value) + { + Value = value; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs index 920f5b4..6d84ded 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs @@ -2,6 +2,7 @@ using System; using System.Collections; using System.Collections.Generic; +using Config; using Godot; /// @@ -17,9 +18,9 @@ public static bool IsDebug { get; set; } /// - /// 当前物体类型id, 用于区分是否是同一种物体, 如果不是通过 ActivityObject.Create() 函数创建出来的对象那么 ItemId 为 null + /// 当前物体对应的配置数据, 如果不是通过 ActivityObject.Create() 函数创建出来的对象那么 ItemConfig 为 null /// - public string ItemId { get; private set; } + public ExcelConfig.ActivityObject ItemConfig { get; private set; } /// /// 是否是静态物体, 如果为true, 则会禁用移动处理 @@ -264,7 +265,7 @@ private static long _instanceIndex = 0; //初始化节点 - private void _InitNode(string itemId, World world) + private void _InitNode(RegisterActivityData activityData, World world) { #if TOOLS if (!Engine.IsEditorHint()) @@ -276,7 +277,7 @@ } #endif World = world; - ItemId = itemId; + ItemConfig = activityData.Config; Name = GetType().Name + (_instanceIndex++); _blendShaderMaterial = AnimatedSprite.Material as ShaderMaterial; _shadowBlendShaderMaterial = ShadowSprite.Material as ShaderMaterial; @@ -630,7 +631,7 @@ _throwForce = new ExternalForce("throw"); _throwForce.Velocity = velocity; - MoveController.AddConstantForce(_throwForce); + MoveController.AddForce(_throwForce); InitThrowData(); } @@ -1121,16 +1122,11 @@ } /// - /// 继承指定物体的运动速率, 该速率可能会有衰减 + /// 继承指定物体的运动速率 /// - public void InheritVelocity(ActivityObject other) + public void InheritVelocity(ActivityObject other, float scale = 0.5f) { - var velocity = other.Velocity; - if (velocity != Vector2.Zero) - { - var force = MoveController.AddConstantForce(velocity * 0.5f, 15); - force.EnableResistanceInTheAir = false; - } + MoveController.AddVelocity(other.Velocity * scale); } /// @@ -1426,7 +1422,8 @@ { if (AffiliationArea == null) { - GD.PrintErr($"调用函数: BecomesStaticImage() 失败, 物体{Name}没有归属区域, 无法确定绘制到哪个ImageCanvas上"); + GD.PrintErr($"调用函数: BecomesStaticImage() 失败, 物体{Name}没有归属区域, 无法确定绘制到哪个ImageCanvas上, 直接执行销毁"); + Destroy(); return; } diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs index af7f5d6..cbc700a 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs @@ -31,6 +31,7 @@ ResourceManager.Load(ResourcePath.resource_material_Blend_tres, false); material.SetShaderParameter("blend", new Color(0, 0, 0, 0.47058824F)); material.SetShaderParameter("schedule", 1); + material.SetShaderParameter("alpha", 1); sprite.Material = material; } } @@ -44,6 +45,7 @@ ResourceManager.Load(ResourcePath.resource_material_Blend_tres, false); material.SetShaderParameter("blend", new Color(1, 1, 1, 1)); material.SetShaderParameter("schedule", 0); + material.SetShaderParameter("alpha", 1); animatedSprite.Material = material; } } diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs index 5e7e2a9..22e31f1 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -1,3 +1,5 @@ +using Config; + /// /// 根据配置表注册物体, 该类是自动生成的, 请不要手动编辑! /// @@ -9,64 +11,175 @@ public static class Ids { /// - /// 玩家 + /// 名称:
+ /// 备注: 玩家 ///
public const string Id_role0001 = "role0001"; /// - /// 敌人 + /// 名称:
+ /// 备注: 敌人 ///
public const string Id_enemy0001 = "enemy0001"; + /// + /// 名称: 步枪
+ /// 备注: + ///
public const string Id_weapon0001 = "weapon0001"; + /// + /// 名称: 霰弹枪
+ /// 备注: + ///
public const string Id_weapon0002 = "weapon0002"; + /// + /// 名称: 手枪
+ /// 备注: + ///
public const string Id_weapon0003 = "weapon0003"; + /// + /// 名称: 刀
+ /// 备注: + ///
public const string Id_weapon0004 = "weapon0004"; + /// + /// 名称: 狙击枪
+ /// 备注: + ///
public const string Id_weapon0005 = "weapon0005"; + /// + /// 名称: 冲锋枪
+ /// 备注: + ///
public const string Id_weapon0006 = "weapon0006"; + /// + /// 名称:
+ /// 备注: + ///
public const string Id_bullet0001 = "bullet0001"; + /// + /// 名称:
+ /// 备注: + ///
public const string Id_bullet0002 = "bullet0002"; + /// + /// 名称:
+ /// 备注: + ///
public const string Id_shell0001 = "shell0001"; + /// + /// 名称:
+ /// 备注: + ///
public const string Id_shell0002 = "shell0002"; + /// + /// 名称:
+ /// 备注: + ///
public const string Id_shell0003 = "shell0003"; /// - /// 敌人死亡碎片 + /// 名称:
+ /// 备注: 敌人死亡碎片 ///
public const string Id_effect0001 = "effect0001"; /// - /// 地牢房间的门(东侧) + /// 名称: 鞋子
+ /// 备注: 提高移动速度 + ///
+ public const string Id_prop0001 = "prop0001"; + /// + /// 名称: 心之容器
+ /// 备注: 提高血量上限 + ///
+ public const string Id_prop0002 = "prop0002"; + /// + /// 名称: 护盾
+ /// 备注: 可以抵挡子弹,随时间推移自动恢复 + ///
+ public const string Id_prop0003 = "prop0003"; + /// + /// 名称: 护盾计时器
+ /// 备注: 提高护盾恢复速度 + ///
+ public const string Id_prop0004 = "prop0004"; + /// + /// 名称: 杀伤弹
+ /// 备注: 提高子弹伤害 + ///
+ public const string Id_prop0005 = "prop0005"; + /// + /// 名称: 红宝石戒指
+ /// 备注: 受伤后延长无敌时间 + ///
+ public const string Id_prop0006 = "prop0006"; + /// + /// 名称: 备用护盾
+ /// 备注: 受伤时有一定概率抵消伤害 + ///
+ public const string Id_prop0007 = "prop0007"; + /// + /// 名称: 眼镜
+ /// 备注: 提高武器精准度 + ///
+ public const string Id_prop0008 = "prop0008"; + /// + /// 名称: 高速子弹
+ /// 备注: 提高子弹速度和射程 + ///
+ public const string Id_prop0009 = "prop0009"; + /// + /// 名称: 分裂子弹
+ /// 备注: 子弹数量翻倍, 但是精准度和伤害降低 + ///
+ public const string Id_prop0010 = "prop0010"; + /// + /// 名称:
+ /// 备注: 地牢房间的门(东侧) ///
public const string Id_other_door_e = "other_door_e"; /// - /// 地牢房间的门(西侧) + /// 名称:
+ /// 备注: 地牢房间的门(西侧) ///
public const string Id_other_door_w = "other_door_w"; /// - /// 地牢房间的门(南侧) + /// 名称:
+ /// 备注: 地牢房间的门(南侧) ///
public const string Id_other_door_s = "other_door_s"; /// - /// 地牢房间的门(北侧) + /// 名称:
+ /// 备注: 地牢房间的门(北侧) ///
public const string Id_other_door_n = "other_door_n"; } private static void _InitRegister() { - _activityRegisterMap.Add("role0001", "res://prefab/role/Role0001.tscn"); - _activityRegisterMap.Add("enemy0001", "res://prefab/role/Enemy0001.tscn"); - _activityRegisterMap.Add("weapon0001", "res://prefab/weapon/Weapon0001.tscn"); - _activityRegisterMap.Add("weapon0002", "res://prefab/weapon/Weapon0002.tscn"); - _activityRegisterMap.Add("weapon0003", "res://prefab/weapon/Weapon0003.tscn"); - _activityRegisterMap.Add("weapon0004", "res://prefab/weapon/Weapon0004.tscn"); - _activityRegisterMap.Add("weapon0005", "res://prefab/weapon/Weapon0005.tscn"); - _activityRegisterMap.Add("weapon0006", "res://prefab/weapon/Weapon0006.tscn"); - _activityRegisterMap.Add("bullet0001", "res://prefab/bullet/Bullet0001.tscn"); - _activityRegisterMap.Add("bullet0002", "res://prefab/bullet/Bullet0002.tscn"); - _activityRegisterMap.Add("shell0001", "res://prefab/shell/Shell0001.tscn"); - _activityRegisterMap.Add("shell0002", "res://prefab/shell/Shell0002.tscn"); - _activityRegisterMap.Add("shell0003", "res://prefab/shell/Shell0003.tscn"); - _activityRegisterMap.Add("effect0001", "res://prefab/effect/activityObject/Effect0001.tscn"); - _activityRegisterMap.Add("other_door_e", "res://prefab/map/RoomDoor_E.tscn"); - _activityRegisterMap.Add("other_door_w", "res://prefab/map/RoomDoor_W.tscn"); - _activityRegisterMap.Add("other_door_s", "res://prefab/map/RoomDoor_S.tscn"); - _activityRegisterMap.Add("other_door_n", "res://prefab/map/RoomDoor_N.tscn"); + _activityRegisterMap.Add("role0001", new RegisterActivityData("res://prefab/role/Role0001.tscn", ExcelConfig.ActivityObject_Map["role0001"])); + _activityRegisterMap.Add("enemy0001", new RegisterActivityData("res://prefab/role/Enemy0001.tscn", ExcelConfig.ActivityObject_Map["enemy0001"])); + _activityRegisterMap.Add("weapon0001", new RegisterActivityData("res://prefab/weapon/Weapon0001.tscn", ExcelConfig.ActivityObject_Map["weapon0001"])); + _activityRegisterMap.Add("weapon0002", new RegisterActivityData("res://prefab/weapon/Weapon0002.tscn", ExcelConfig.ActivityObject_Map["weapon0002"])); + _activityRegisterMap.Add("weapon0003", new RegisterActivityData("res://prefab/weapon/Weapon0003.tscn", ExcelConfig.ActivityObject_Map["weapon0003"])); + _activityRegisterMap.Add("weapon0004", new RegisterActivityData("res://prefab/weapon/Weapon0004.tscn", ExcelConfig.ActivityObject_Map["weapon0004"])); + _activityRegisterMap.Add("weapon0005", new RegisterActivityData("res://prefab/weapon/Weapon0005.tscn", ExcelConfig.ActivityObject_Map["weapon0005"])); + _activityRegisterMap.Add("weapon0006", new RegisterActivityData("res://prefab/weapon/Weapon0006.tscn", ExcelConfig.ActivityObject_Map["weapon0006"])); + _activityRegisterMap.Add("bullet0001", new RegisterActivityData("res://prefab/bullet/Bullet0001.tscn", ExcelConfig.ActivityObject_Map["bullet0001"])); + _activityRegisterMap.Add("bullet0002", new RegisterActivityData("res://prefab/bullet/Bullet0002.tscn", ExcelConfig.ActivityObject_Map["bullet0002"])); + _activityRegisterMap.Add("shell0001", new RegisterActivityData("res://prefab/shell/Shell0001.tscn", ExcelConfig.ActivityObject_Map["shell0001"])); + _activityRegisterMap.Add("shell0002", new RegisterActivityData("res://prefab/shell/Shell0002.tscn", ExcelConfig.ActivityObject_Map["shell0002"])); + _activityRegisterMap.Add("shell0003", new RegisterActivityData("res://prefab/shell/Shell0003.tscn", ExcelConfig.ActivityObject_Map["shell0003"])); + _activityRegisterMap.Add("effect0001", new RegisterActivityData("res://prefab/effect/activityObject/Effect0001.tscn", ExcelConfig.ActivityObject_Map["effect0001"])); + _activityRegisterMap.Add("prop0001", new RegisterActivityData("res://prefab/prop/buff/Buff0001.tscn", ExcelConfig.ActivityObject_Map["prop0001"])); + _activityRegisterMap.Add("prop0002", new RegisterActivityData("res://prefab/prop/buff/Buff0002.tscn", ExcelConfig.ActivityObject_Map["prop0002"])); + _activityRegisterMap.Add("prop0003", new RegisterActivityData("res://prefab/prop/buff/Buff0003.tscn", ExcelConfig.ActivityObject_Map["prop0003"])); + _activityRegisterMap.Add("prop0004", new RegisterActivityData("res://prefab/prop/buff/Buff0004.tscn", ExcelConfig.ActivityObject_Map["prop0004"])); + _activityRegisterMap.Add("prop0005", new RegisterActivityData("res://prefab/prop/buff/Buff0005.tscn", ExcelConfig.ActivityObject_Map["prop0005"])); + _activityRegisterMap.Add("prop0006", new RegisterActivityData("res://prefab/prop/buff/Buff0006.tscn", ExcelConfig.ActivityObject_Map["prop0006"])); + _activityRegisterMap.Add("prop0007", new RegisterActivityData("res://prefab/prop/buff/Buff0007.tscn", ExcelConfig.ActivityObject_Map["prop0007"])); + _activityRegisterMap.Add("prop0008", new RegisterActivityData("res://prefab/prop/buff/Buff0008.tscn", ExcelConfig.ActivityObject_Map["prop0008"])); + _activityRegisterMap.Add("prop0009", new RegisterActivityData("res://prefab/prop/buff/Buff0009.tscn", ExcelConfig.ActivityObject_Map["prop0009"])); + _activityRegisterMap.Add("prop0010", new RegisterActivityData("res://prefab/prop/buff/Buff0010.tscn", ExcelConfig.ActivityObject_Map["prop0010"])); + _activityRegisterMap.Add("other_door_e", new RegisterActivityData("res://prefab/map/RoomDoor_E.tscn", ExcelConfig.ActivityObject_Map["other_door_e"])); + _activityRegisterMap.Add("other_door_w", new RegisterActivityData("res://prefab/map/RoomDoor_W.tscn", ExcelConfig.ActivityObject_Map["other_door_w"])); + _activityRegisterMap.Add("other_door_s", new RegisterActivityData("res://prefab/map/RoomDoor_S.tscn", ExcelConfig.ActivityObject_Map["other_door_s"])); + _activityRegisterMap.Add("other_door_n", new RegisterActivityData("res://prefab/map/RoomDoor_N.tscn", ExcelConfig.ActivityObject_Map["other_door_n"])); } } diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs index a08c0e6..9c82e49 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs @@ -1,12 +1,25 @@ using System; using System.Collections.Generic; +using Config; using Godot; public partial class ActivityObject { + private class RegisterActivityData + { + public RegisterActivityData(string path, ExcelConfig.ActivityObject config) + { + Path = path; + Config = config; + } + + public string Path; + public ExcelConfig.ActivityObject Config; + } + //负责存放所有注册对象数据 - private static Dictionary _activityRegisterMap = new Dictionary(); + private static Dictionary _activityRegisterMap = new Dictionary(); private static bool _initState = false; /// @@ -34,10 +47,10 @@ throw new Exception("实例化 ActivityObject 前请先调用 'GameApplication.Instance.CreateNewWorld()' 初始化 World 对象"); } - if (_activityRegisterMap.TryGetValue(itemId, out var path)) + if (_activityRegisterMap.TryGetValue(itemId, out var config)) { - var instance = ResourceManager.LoadAndInstantiate(path); - instance._InitNode(itemId, world); + var instance = ResourceManager.LoadAndInstantiate(config.Path); + instance._InitNode(config, world); return instance; } GD.PrintErr("创建实例失败, 未找到id为'" + itemId + "'的物体!"); diff --git a/DungeonShooting_Godot/src/framework/activity/CheckInteractiveResult.cs b/DungeonShooting_Godot/src/framework/activity/CheckInteractiveResult.cs index eb8676b..7603ef9 100644 --- a/DungeonShooting_Godot/src/framework/activity/CheckInteractiveResult.cs +++ b/DungeonShooting_Godot/src/framework/activity/CheckInteractiveResult.cs @@ -13,10 +13,6 @@ /// public bool CanInteractive; /// - /// 互动提示信息 - /// - public string Message; - /// /// 互动提示显示的图标 /// public string ShowIcon; @@ -25,4 +21,17 @@ { Target = target; } + + public CheckInteractiveResult(ActivityObject target, bool canInteractive) + { + Target = target; + CanInteractive = canInteractive; + } + + public CheckInteractiveResult(ActivityObject target, bool canInteractive, string showIcon) + { + Target = target; + CanInteractive = canInteractive; + ShowIcon = showIcon; + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs b/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs index b4b8ea4..67dff7f 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs @@ -43,6 +43,29 @@ BasisVelocity *= scale; } + + /// + /// 给当前控制器添加指定外力速率, 并且平均分配给所有外力速率 + /// + public void AddVelocity(Vector2 velocity) + { + if (velocity != Vector2.Zero) + { + var forceCount = GetForceCount(); + if (forceCount == 0) + { + AddForce(velocity); + } + else + { + var tempV = velocity / forceCount; + for (var i = 0; i < _forceList.Count; i++) + { + _forceList[i].Velocity += tempV; + } + } + } + } /// /// 设置所有力对象, 包括基础速率 @@ -78,9 +101,9 @@ /// /// 外力速率 /// 阻力大小 - public ExternalForce AddConstantForce(Vector2 velocity, float resistance) + public ExternalForce AddForce(Vector2 velocity, float resistance) { - var force = AddConstantForce("_anonymity_" + _index++); + var force = AddForce("_anonymity_" + _index++); force.Velocity = velocity; force.Resistance = resistance; return force; @@ -90,9 +113,9 @@ /// 快速创建一个外力, 该外力为匿名外力, 当速率变为 0 时自动销毁 ///
/// 外力速率 - public ExternalForce AddConstantForce(Vector2 velocity) + public ExternalForce AddForce(Vector2 velocity) { - var force = AddConstantForce("_anonymity_" + _index++); + var force = AddForce("_anonymity_" + _index++); force.Velocity = velocity; return force; } @@ -101,18 +124,18 @@ /// /// 根据名称添加一个外力, 并返回创建的外力的对象, 如果存在这个名称的外力, 移除之前的外力, 当速率变为 0 时不会自动销毁 /// - public ExternalForce AddConstantForce(string name) + public ExternalForce AddForce(string name) { var f = new ExternalForce(name); f.AutoDestroy = false; - AddConstantForce(f); + AddForce(f); return f; } /// /// 根据对象添加一个外力力, 如果存在这个名称的外力, 移除之前的外力 /// - public T AddConstantForce(T force) where T : ExternalForce + public T AddForce(T force) where T : ExternalForce { RemoveForce(force.Name); _forceList.Add(force); @@ -188,6 +211,7 @@ { if (_basisVelocity == Vector2.Zero && _forceList.Count == 0) { + ActivityInstance.Velocity = Vector2.Zero; return; } diff --git a/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs b/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs index c936b6f..ce71a11 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/StateBase.cs @@ -75,7 +75,7 @@ } /// - /// 立即切换到下一个指定状态, 并且这一帧会被调用 PhysicsProcess + /// 立即切换到下一个指定状态, 并且这一帧会被调用 Process /// public void ChangeStateInstant(S next, params object[] args) { @@ -83,7 +83,7 @@ } /// - /// 切换到下一个指定状态, 下一帧才会调用 PhysicsProcess + /// 切换到下一个指定状态, 下一帧才会调用 Process /// public void ChangeState(S next, params object[] args) { diff --git a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs index ca379b4..ecb69be 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs @@ -78,16 +78,16 @@ ///
public StateBase GetState(S state) { - if (_states.ContainsKey(state)) + if (_states.TryGetValue(state, out var temp)) { - return _states[state]; + return temp; } return null; } /// - /// 立即切换到下一个指定状态, 并且这一帧会被调用 PhysicsProcess + /// 立即切换到下一个指定状态, 并且这一帧会被调用 Process /// public void ChangeStateInstant(S next, params object[] arg) { @@ -95,7 +95,7 @@ } /// - /// 切换到下一个指定状态, 下一帧才会调用 PhysicsProcess + /// 切换到下一个指定状态, 下一帧才会调用 Process /// public void ChangeState(S next, params object[] arg) { diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs index 5b3c546..c35931d 100644 --- a/DungeonShooting_Godot/src/framework/common/Utils.cs +++ b/DungeonShooting_Godot/src/framework/common/Utils.cs @@ -34,6 +34,13 @@ public static bool RandomBoolean() { return _random.NextSingle() >= 0.5f; + } + /// + /// 指定概率会返回 true, probability 范围 0 - 1 + /// + public static bool RandomBoolean(float probability) + { + return _random.NextSingle() <= probability; } /// diff --git a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs index 26d9357..2fb744f 100644 --- a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs @@ -43,18 +43,18 @@ foreach (var item in array) { var id = item["Id"]; + var name = item["Name"] + ""; var remark = item["Remark"] + ""; - if (!string.IsNullOrEmpty(remark)) - { - code1 += $" /// \n"; - code1 += $" /// {remark}\n"; - code1 += $" /// \n"; - } + code1 += $" /// \n"; + code1 += $" /// 名称: {name}
\n"; + code1 += $" /// 备注: {remark.Replace("\n", "
\n /// ")}\n"; + code1 += $" ///
\n"; code1 += $" public const string Id_{id} = \"{id}\";\n"; - code2 += $" _activityRegisterMap.Add(\"{id}\", \"{item["Prefab"]}\");\n"; + code2 += $" _activityRegisterMap.Add(\"{id}\", new RegisterActivityData(\"{item["Prefab"]}\", ExcelConfig.ActivityObject_Map[\"{id}\"]));\n"; } - var str = $"/// \n"; + var str = $"using Config;\n\n"; + str += $"/// \n"; str += $"/// 根据配置表注册物体, 该类是自动生成的, 请不要手动编辑!\n"; str += $"/// \n"; str += $"public partial class ActivityObject\n"; diff --git a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs index 89cf6e0..337dab2 100644 --- a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs +++ b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs @@ -52,7 +52,7 @@ Monitoring = true; Monitorable = false; CollisionLayer = PhysicsLayer.None; - CollisionMask = PhysicsLayer.Props | PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Shell | PhysicsLayer.Throwing; + CollisionMask = PhysicsLayer.Prop | PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Shell | PhysicsLayer.Throwing; BodyEntered += OnBodyEntered; } diff --git a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs index 2f7ef01..09b87da 100644 --- a/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs +++ b/DungeonShooting_Godot/src/framework/ui/grid/UiGrid.cs @@ -97,8 +97,11 @@ return _cellPool.Pop(); } - var cell = Activator.CreateInstance(_cellType); - var uiCell = (UiCell)cell; + var uiCell = Activator.CreateInstance(_cellType) as UiCell; + if (uiCell is null) + { + throw new Exception($"cellType 无法转为'{typeof(UiCell).FullName}'类型!"); + } uiCell.CellNode = _template.Clone(); uiCell.Grid = this; uiCell.OnInit(); diff --git a/DungeonShooting_Godot/src/game/AnimatorNames.cs b/DungeonShooting_Godot/src/game/AnimatorNames.cs index 5ea58e8..bbe65d1 100644 --- a/DungeonShooting_Godot/src/game/AnimatorNames.cs +++ b/DungeonShooting_Godot/src/game/AnimatorNames.cs @@ -48,4 +48,12 @@ /// 子弹上膛 /// public const string BeLoaded = "beLoaded"; + /// + /// ui入场 + /// + public const string In = "in"; + /// + /// ui出场 + /// + public const string Out = "out"; } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index a7580e3..517953c 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -5,6 +5,7 @@ using System.Text.Json; using Config; using Godot; +using UI.BottomTips; public partial class GameApplication : Node2D { @@ -130,6 +131,8 @@ DungeonManager = new DungeonManager(); DungeonManager.Name = "DungeonManager"; SceneRoot.AddChild(DungeonManager); + + BottomTipsPanel.Init(); //打开主菜单Ui UiManager.Open_Main(); } @@ -154,6 +157,7 @@ { if (World != null) { + ClearWorld(); World.QueueFree(); } World = ResourceManager.LoadAndInstantiate(ResourcePath.scene_World_tscn); @@ -168,6 +172,7 @@ { if (World != null) { + ClearWorld(); World.QueueFree(); } @@ -271,6 +276,30 @@ cursorLayer.AddChild(Cursor); } + //清理世界 + private void ClearWorld() + { + + var childCount = World.NormalLayer.GetChildCount(); + for (var i = 0; i < childCount; i++) + { + var c = World.NormalLayer.GetChild(i); + if (c is IDestroy destroy) + { + destroy.Destroy(); + } + } + childCount = World.YSortLayer.GetChildCount(); + for (var i = 0; i < childCount; i++) + { + var c = World.YSortLayer.GetChild(i); + if (c is IDestroy destroy) + { + destroy.Destroy(); + } + } + } + #if TOOLS //调试模式下, 指定生成哪些房间 private void InitDesignatedRoom() diff --git a/DungeonShooting_Godot/src/game/PhysicsLayer.cs b/DungeonShooting_Godot/src/game/PhysicsLayer.cs index c1c53ea..a96e34d 100644 --- a/DungeonShooting_Godot/src/game/PhysicsLayer.cs +++ b/DungeonShooting_Godot/src/game/PhysicsLayer.cs @@ -18,7 +18,7 @@ /// /// 道具 /// - public const uint Props = 0b100; + public const uint Prop = 0b100; /// /// 玩家 /// diff --git a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs index 9def84a..16bf6b7 100644 --- a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs +++ b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs @@ -16,6 +16,11 @@ /// 发射该子弹的武器 ///
public Weapon Weapon { get; private set; } + + /// + /// 发射该子弹的角色 + /// + public Role Role { get; private set; } /// /// 最小伤害 @@ -39,6 +44,7 @@ public void Init(Weapon weapon, float speed, float maxDistance, Vector2 position, float rotation, uint targetLayer) { Weapon = weapon; + Role = weapon.Master; CollisionArea.CollisionMask = targetLayer; CollisionArea.AreaEntered += OnArea2dEntered; @@ -98,8 +104,16 @@ var node = packedScene.Instantiate(); node.GlobalPosition = GlobalPosition; node.AddToActivityRoot(RoomLayerEnum.YSortLayer); - - role.CallDeferred(nameof(Role.Hurt), Utils.RandomRangeInt(MinHarm, MaxHarm), Rotation); + + //计算子弹造成的伤害 + var damage = Utils.RandomRangeInt(MinHarm, MaxHarm); + if (Role != null) + { + var d = damage; + damage = Role.RoleState.CallCalcDamageEvent(damage); + GD.Print($"原伤害: {d}, 计算伤害: {damage}"); + } + role.CallDeferred(nameof(Role.Hurt), damage, Rotation); Destroy(); } } diff --git a/DungeonShooting_Godot/src/game/activity/package/Holster.cs b/DungeonShooting_Godot/src/game/activity/package/Holster.cs index a487f64..df5dc56 100644 --- a/DungeonShooting_Godot/src/game/activity/package/Holster.cs +++ b/DungeonShooting_Godot/src/game/activity/package/Holster.cs @@ -141,7 +141,7 @@ for (var i = 0; i < Weapons.Length; i++) { var item = Weapons[i]; - if (item != null && item.ItemId == id) + if (item != null && item.ItemConfig.Id == id) { return i; } diff --git a/DungeonShooting_Godot/src/game/activity/prop/Prop.cs b/DungeonShooting_Godot/src/game/activity/prop/Prop.cs new file mode 100644 index 0000000..5962d3b --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/Prop.cs @@ -0,0 +1,8 @@ + +/// +/// 道具基类 +/// +public abstract partial class Prop : ActivityObject +{ + +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff.cs new file mode 100644 index 0000000..1afa4d7 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff.cs @@ -0,0 +1,43 @@ + +/// +/// 增益被动道具 +/// +public abstract partial class Buff : Prop +{ + /// + /// buff的拥有者 + /// + public Role Master { get; private set; } + + /// + /// 当被动被道具被拾起时调用 + /// + /// 拾起该buff的角色 + protected abstract void OnPickUp(Role master); + + /// + /// 当被动道具被移除时调用 + /// + /// 移除该buff的角色 + protected abstract void OnRemove(Role master); + + public override void Interactive(ActivityObject master) + { + if (master is Role role) + { + Pickup(); + Master = role; + role.PushProp(this); + OnPickUp(role); + } + } + + public override CheckInteractiveResult CheckInteractive(ActivityObject master) + { + if (master is Player) + { + return new CheckInteractiveResult(this, true, ResourcePath.resource_sprite_ui_icon_icon_pickup_png); + } + return base.CheckInteractive(master); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0001.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0001.cs new file mode 100644 index 0000000..4133458 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0001.cs @@ -0,0 +1,23 @@ + +using Godot; + +/// +/// 移速 buff, 移速 + 3 +/// +[GlobalClass, Tool] +public partial class Buff0001 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.MoveSpeed += 30; + master.RoleState.Acceleration += 400; + master.RoleState.Friction += 300; + } + + protected override void OnRemove(Role master) + { + master.RoleState.MoveSpeed -= 30; + master.RoleState.Acceleration -= 400; + master.RoleState.Friction -= 300; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0002.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0002.cs new file mode 100644 index 0000000..43d7347 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0002.cs @@ -0,0 +1,20 @@ + +using Godot; + +/// +/// 血量上限buff, 心之容器 + 1 +/// +[GlobalClass, Tool] +public partial class Buff0002 : Buff +{ + protected override void OnPickUp(Role master) + { + master.MaxHp += 2; + master.Hp += 2; + } + + protected override void OnRemove(Role master) + { + master.MaxHp -= 2; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0003.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0003.cs new file mode 100644 index 0000000..679bdbc --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0003.cs @@ -0,0 +1,20 @@ + +using Godot; + +/// +/// 护盾上限buff, 护盾 + 1 +/// +[GlobalClass, Tool] +public partial class Buff0003 : Buff +{ + protected override void OnPickUp(Role master) + { + master.MaxShield += 1; + master.Shield += 1; + } + + protected override void OnRemove(Role master) + { + master.MaxShield -= 1; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0004.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0004.cs new file mode 100644 index 0000000..bcb05be --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0004.cs @@ -0,0 +1,19 @@ + +using Godot; + +/// +/// 护盾恢复时间buff, 恢复时间 - 1.5s +/// +[GlobalClass, Tool] +public partial class Buff0004 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.ShieldRecoveryTime -= 1.5f; + } + + protected override void OnRemove(Role master) + { + master.RoleState.ShieldRecoveryTime += 1.5f; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0005.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0005.cs new file mode 100644 index 0000000..e97fbaf --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0005.cs @@ -0,0 +1,24 @@ + +using Godot; + +/// +/// 提升伤害buff, 子弹伤害提升20% +/// +[GlobalClass, Tool] +public partial class Buff0005 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.CalcDamageEvent += CalcDamage; + } + + protected override void OnRemove(Role master) + { + master.RoleState.CalcDamageEvent -= CalcDamage; + } + + private void CalcDamage(int originDamage, RefValue refValue) + { + refValue.Value += Mathf.CeilToInt(originDamage * 0.2f); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0006.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0006.cs new file mode 100644 index 0000000..396abd0 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0006.cs @@ -0,0 +1,19 @@ + +using Godot; + +/// +/// 延长无敌时间buff, 受伤后无敌时间 + 2s +/// +[GlobalClass, Tool] +public partial class Buff0006 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.WoundedInvincibleTime += 2f; + } + + protected override void OnRemove(Role master) + { + master.RoleState.WoundedInvincibleTime -= 2f; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0007.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0007.cs new file mode 100644 index 0000000..b6c1be7 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0007.cs @@ -0,0 +1,27 @@ + +using Godot; + +/// +/// 受伤时有15%概率抵消伤害 +/// +[GlobalClass, Tool] +public partial class Buff0007 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.CalcHurtDamageEvent += CalcHurtDamageEvent; + } + + protected override void OnRemove(Role master) + { + master.RoleState.CalcHurtDamageEvent -= CalcHurtDamageEvent; + } + + private void CalcHurtDamageEvent(int originDamage, RefValue refValue) + { + if (refValue.Value > 0 && Utils.RandomBoolean(0.15f)) + { + refValue.Value = 0; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0008.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0008.cs new file mode 100644 index 0000000..800a2cc --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0008.cs @@ -0,0 +1,31 @@ + +using Godot; + +/// +/// 眼镜, 提高武器50%精准度 +/// +[GlobalClass, Tool] +public partial class Buff0008 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.CalcStartScatteringEvent += CalcStartScatteringEvent; + master.RoleState.CalcFinalScatteringEvent += CalcFinalScatteringEvent; + } + + protected override void OnRemove(Role master) + { + master.RoleState.CalcStartScatteringEvent -= CalcStartScatteringEvent; + master.RoleState.CalcFinalScatteringEvent -= CalcFinalScatteringEvent; + } + + private void CalcStartScatteringEvent(Weapon weapon, float originValue, RefValue refValue) + { + refValue.Value *= 0.5f; + } + + private void CalcFinalScatteringEvent(Weapon weapon, float originValue, RefValue refValue) + { + refValue.Value *= 0.5f; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0009.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0009.cs new file mode 100644 index 0000000..aad07a2 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0009.cs @@ -0,0 +1,31 @@ + +using Godot; + +/// +/// 高速子弹 子弹速度和射程提升25% +/// +[GlobalClass, Tool] +public partial class Buff0009 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; + master.RoleState.CalcBulletDistanceEvent += CalcBulletDistanceEvent; + } + + protected override void OnRemove(Role master) + { + master.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent; + master.RoleState.CalcBulletDistanceEvent -= CalcBulletDistanceEvent; + } + + private void CalcBulletSpeedEvent(Weapon weapon, float originSpeed, RefValue speed) + { + speed.Value += originSpeed * 0.25f; + } + + private void CalcBulletDistanceEvent(Weapon weapon, float originDistance, RefValue distance) + { + distance.Value += originDistance * 0.25f; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0010.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0010.cs new file mode 100644 index 0000000..14195a6 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/Buff0010.cs @@ -0,0 +1,43 @@ + +using Godot; + +/// +/// 分裂子弹 子弹数量翻倍, 但是精准度和伤害降低 +/// +[GlobalClass, Tool] +public partial class Buff0010 : Buff +{ + protected override void OnPickUp(Role master) + { + master.RoleState.CalcBulletCountEvent += CalcBulletCountEvent; + master.RoleState.CalcBulletDeviationAngleEvent += CalcBulletDeviationAngleEvent; + master.RoleState.CalcDamageEvent += CalcDamageEvent; + } + + protected override void OnRemove(Role master) + { + master.RoleState.CalcBulletCountEvent -= CalcBulletCountEvent; + master.RoleState.CalcBulletDeviationAngleEvent -= CalcBulletDeviationAngleEvent; + master.RoleState.CalcDamageEvent -= CalcDamageEvent; + } + + private void CalcBulletCountEvent(Weapon weapon, int originCount, RefValue refValue) + { + refValue.Value += originCount; + } + + private void CalcBulletDeviationAngleEvent(Weapon weapon, float originAngle, RefValue refValue) + { + refValue.Value += Utils.RandomRangeFloat(-10, 10); + } + + private void CalcDamageEvent(int originDamage, RefValue refValue) + { + if (refValue.Value <= 0) + { + return; + } + + refValue.Value = Mathf.Max(1, refValue.Value - Mathf.FloorToInt(originDamage * 0.4f)); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/CampEnum.cs b/DungeonShooting_Godot/src/game/activity/role/CampEnum.cs new file mode 100644 index 0000000..6954070 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/CampEnum.cs @@ -0,0 +1,10 @@ + +public enum CampEnum +{ + // 阵营1, 玩家 + Camp1, + // 阵营2, 敌人 + Camp2, + // 阵营3, 中立单位 + Camp3 +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/FaceDirection.cs b/DungeonShooting_Godot/src/game/activity/role/FaceDirection.cs new file mode 100644 index 0000000..5be28ef --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/FaceDirection.cs @@ -0,0 +1,8 @@ +/// +/// 脸的朝向 +/// +public enum FaceDirection +{ + Left = -1, + Right = 1, +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/MountRotation.cs b/DungeonShooting_Godot/src/game/activity/role/MountRotation.cs new file mode 100644 index 0000000..e265b10 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/MountRotation.cs @@ -0,0 +1,67 @@ + +using Godot; + +/// +/// 用于限定 Marker2D 节点的旋转角度 +/// +[Tool] +public partial class MountRotation : Marker2D +{ + /// + /// 吸附角度 + /// + private int _adsorption = 6; + + /// + /// 所在的角色 + /// + public Role Master { get; set; } + + /// + /// 当前节点真实的旋转角度, 角度制 + /// + public float RealRotationDegrees { get; private set; } + + /// + /// 当前节点真实的旋转角度, 弧度制 + /// + public float RealRotation => Mathf.DegToRad(RealRotationDegrees); + + /// + /// 设置看向的目标点 + /// + public void SetLookAt(Vector2 target) + { + var myPos = GlobalPosition; + var angle = Mathf.RadToDeg((target - myPos).Angle()); + + if (Master.Face == FaceDirection.Left) + { + if (angle < 0 && angle > -80) + { + angle = -80; + } + else if (angle >= 0 && angle < 80) + { + angle = 80; + } + } + else + { + angle = Mathf.Clamp(angle, -100, 100); + } + + RealRotationDegrees = angle; + + // if (Master.GlobalPosition.X >= target.X) + // { + // angle = -angle; + // } + GlobalRotationDegrees = AdsorptionAngle(angle); + } + + private float AdsorptionAngle(float angle) + { + return Mathf.Round(angle / _adsorption) * _adsorption; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/Player.cs b/DungeonShooting_Godot/src/game/activity/role/Player.cs new file mode 100644 index 0000000..24d432b --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/Player.cs @@ -0,0 +1,266 @@ +using Godot; + + +/// +/// 玩家角色基类, 所有角色都必须继承该类 +/// +[Tool, GlobalClass] +public partial class Player : Role +{ + /// + /// 获取当前操作的角色 + /// + public static Player Current { get; private set; } + + /// + /// 设置当前操作的玩家对象 + /// + public static void SetCurrentPlayer(Player player) + { + Current = player; + //设置相机和鼠标跟随玩家 + GameCamera.Main.SetFollowTarget(player); + GameApplication.Instance.Cursor.SetMountRole(player); + } + + public override void OnInit() + { + base.OnInit(); + + AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Prop | PhysicsLayer.Enemy; + Camp = CampEnum.Camp1; + + //让相机跟随玩家 + // var remoteTransform = new RemoteTransform2D(); + // AddChild(remoteTransform); + // MainCamera.Main.GlobalPosition = GlobalPosition; + // MainCamera.Main.ResetSmoothing(); + // remoteTransform.RemotePath = remoteTransform.GetPathTo(MainCamera.Main); + + MaxHp = 6; + Hp = 6; + MaxShield = 0; + Shield = 0; + + // debug用 + // Acceleration = 3000; + // Friction = 3000; + // MoveSpeed = 500; + // CollisionLayer = 0; + // CollisionMask = 0; + // GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); + } + + protected override void Process(float delta) + { + if (IsDie) + { + return; + } + base.Process(delta); + //脸的朝向 + if (LookTarget == null) + { + var gPos = GlobalPosition; + Vector2 mousePos = InputManager.CursorPosition; + if (mousePos.X > gPos.X && Face == FaceDirection.Left) + { + Face = FaceDirection.Right; + } + else if (mousePos.X < gPos.X && Face == FaceDirection.Right) + { + Face = FaceDirection.Left; + } + //枪口跟随鼠标 + MountPoint.SetLookAt(mousePos); + } + + if (InputManager.Exchange) //切换武器 + { + ExchangeNext(); + } + else if (InputManager.Throw) //扔掉武器 + { + ThrowWeapon(); + + // //测试用的, 所有敌人也扔掉武器 + // if (Affiliation != null) + // { + // var enemies = Affiliation.FindIncludeItems(o => + // { + // return o.CollisionWithMask(PhysicsLayer.Enemy); + // }); + // foreach (var activityObject in enemies) + // { + // if (activityObject is Enemy enemy) + // { + // enemy.ThrowWeapon(); + // } + // } + // } + } + else if (InputManager.Interactive) //互动物体 + { + TriggerInteractive(); + } + else if (InputManager.Reload) //换弹 + { + Reload(); + } + if (InputManager.Fire) //开火 + { + Attack(); + } + + if (Input.IsKeyPressed(Key.P)) + { + Hurt(1000, 0); + } + } + + protected override void PhysicsProcess(float delta) + { + if (IsDie) + { + return; + } + + base.PhysicsProcess(delta); + HandleMoveInput(delta); + //播放动画 + PlayAnim(); + } + + public override bool PickUpWeapon(Weapon weapon, bool exchange = true) + { + //拾起武器 + var result = base.PickUpWeapon(weapon, exchange); + if (result) + { + EventManager.EmitEvent(EventEnum.OnPlayerPickUpWeapon, weapon); + } + return result; + } + + public override void ThrowWeapon() + { + //扔掉武器 + var weapon = Holster.ActiveWeapon; + base.ThrowWeapon(); + EventManager.EmitEvent(EventEnum.OnPlayerThrowWeapon, weapon); + } + + public override void ThrowWeapon(int index) + { + //扔掉武器 + var weapon = Holster.GetWeapon(index); + base.ThrowWeapon(index); + EventManager.EmitEvent(EventEnum.OnPlayerThrowWeapon, weapon); + } + + protected override int OnHandlerHurt(int damage) + { + //修改受到的伤害, 每次只受到1点伤害 + return 1; + } + + protected override void OnHit(int damage, bool realHarm) + { + //进入无敌状态 + if (realHarm) //真实伤害 + { + PlayInvincibleFlashing(RoleState.WoundedInvincibleTime); + } + else //护盾抵消掉的 + { + PlayInvincibleFlashing(RoleState.ShieldInvincibleTime); + } + } + + protected override void OnChangeHp(int hp) + { + //GameApplication.Instance.Ui.SetHp(hp); + EventManager.EmitEvent(EventEnum.OnPlayerHpChange, hp); + } + + protected override void OnChangeMaxHp(int maxHp) + { + //GameApplication.Instance.Ui.SetMaxHp(maxHp); + EventManager.EmitEvent(EventEnum.OnPlayerMaxHpChange, maxHp); + } + + protected override void ChangeInteractiveItem(CheckInteractiveResult result) + { + //派发互动对象改变事件 + EventManager.EmitEvent(EventEnum.OnPlayerChangeInteractiveItem, result); + } + + protected override void OnChangeShield(int shield) + { + //GameApplication.Instance.Ui.SetShield(shield); + EventManager.EmitEvent(EventEnum.OnPlayerShieldChange, shield); + } + + protected override void OnChangeMaxShield(int maxShield) + { + //GameApplication.Instance.Ui.SetMaxShield(maxShield); + EventManager.EmitEvent(EventEnum.OnPlayerMaxShieldChange, maxShield); + } + + protected override void OnDie() + { + GameCamera.Main.SetFollowTarget(null); + BasisVelocity = Vector2.Zero; + MoveController.ClearForce(); + UiManager.Open_Settlement(); + //GameApplication.Instance.World.ProcessMode = ProcessModeEnum.WhenPaused; + } + + //处理角色移动的输入 + private void HandleMoveInput(float delta) + { + //角色移动 + Vector2 dir = InputManager.MoveAxis; + // 移动. 如果移动的数值接近0(是用 摇杆可能出现 方向 可能会出现浮点),就friction的值 插值 到 0 + // 如果 有输入 就以当前速度,用acceleration 插值到 对应方向 * 最大速度 + if (Mathf.IsZeroApprox(dir.X)) + { + BasisVelocity = new Vector2(Mathf.MoveToward(BasisVelocity.X, 0, RoleState.Friction * delta), BasisVelocity.Y); + } + else + { + BasisVelocity = new Vector2(Mathf.MoveToward(BasisVelocity.X, dir.X * RoleState.MoveSpeed, RoleState.Acceleration * delta), + BasisVelocity.Y); + } + + if (Mathf.IsZeroApprox(dir.Y)) + { + BasisVelocity = new Vector2(BasisVelocity.X, Mathf.MoveToward(BasisVelocity.Y, 0, RoleState.Friction * delta)); + } + else + { + BasisVelocity = new Vector2(BasisVelocity.X, + Mathf.MoveToward(BasisVelocity.Y, dir.Y * RoleState.MoveSpeed, RoleState.Acceleration * delta)); + } + } + + // 播放动画 + private void PlayAnim() + { + if (BasisVelocity != Vector2.Zero) + { + if ((Face == FaceDirection.Right && BasisVelocity.X >= 0) || Face == FaceDirection.Left && BasisVelocity.X <= 0) //向前走 + { + AnimatedSprite.Play(AnimatorNames.Run); + } + else if ((Face == FaceDirection.Right && BasisVelocity.X < 0) || Face == FaceDirection.Left && BasisVelocity.X > 0) //向后走 + { + AnimatedSprite.Play(AnimatorNames.ReverseRun); + } + } + else + { + AnimatedSprite.Play(AnimatorNames.Idle); + } + } +} \ 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 new file mode 100644 index 0000000..5bc0694 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -0,0 +1,773 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; + +/// +/// 角色基类 +/// +public abstract partial class Role : ActivityObject +{ + /// + /// 是否是 Ai + /// + public bool IsAi { get; protected set; } = false; + + /// + /// 角色属性 + /// + public RoleState RoleState { get; } = new RoleState(); + + /// + /// 默认攻击对象层级 + /// + public const uint DefaultAttackLayer = PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Wall | PhysicsLayer.Prop; + + /// + /// 伤害区域 + /// + [Export, ExportFillNode] + public Area2D HurtArea { get; set; } + + /// + /// 所属阵营 + /// + public CampEnum Camp; + + /// + /// 攻击目标的碰撞器所属层级, 数据源自于: PhysicsLayer + /// + public uint AttackLayer { get; set; } = PhysicsLayer.Wall; + + /// + /// 携带的道具包裹 + /// + public List PropsPack { get; } = new List(); + + /// + /// 角色携带的武器袋 + /// + public Holster Holster { get; private set; } + + /// + /// 武器挂载点 + /// + [Export, ExportFillNode] + public MountRotation MountPoint { get; set; } + /// + /// 背后武器的挂载点 + /// + [Export, ExportFillNode] + public Marker2D BackMountPoint { get; set; } + + /// + /// 互动碰撞区域 + /// + [Export, ExportFillNode] + public Area2D InteractiveArea { get; set; } + + /// + /// 脸的朝向 + /// + public FaceDirection Face { get => _face; set => SetFace(value); } + private FaceDirection _face; + + /// + /// 是否死亡 + /// + public bool IsDie { get; private set; } + + /// + /// 血量 + /// + public int Hp + { + get => _hp; + set + { + int temp = _hp; + _hp = value; + if (temp != _hp) + { + OnChangeHp(_hp); + } + } + } + private int _hp = 20; + + /// + /// 最大血量 + /// + public int MaxHp + { + get => _maxHp; + set + { + int temp = _maxHp; + _maxHp = value; + //最大血量值改变 + if (temp != _maxHp) + { + OnChangeMaxHp(_maxHp); + } + //调整血量 + if (Hp > _maxHp) + { + Hp = _maxHp; + } + } + } + private int _maxHp = 20; + + /// + /// 当前护盾值 + /// + public int Shield + { + get => _shield; + set + { + int temp = _shield; + _shield = value; + //护盾被破坏 + if (temp > 0 && _shield <= 0 && _maxShield > 0) + { + OnShieldDestroy(); + } + //护盾值改变 + if (temp != _shield) + { + OnChangeShield(_shield); + } + } + } + private int _shield = 0; + + /// + /// 最大护盾值 + /// + public int MaxShield + { + get => _maxShield; + set + { + int temp = _maxShield; + _maxShield = value; + //最大护盾值改变 + if (temp != _maxShield) + { + OnChangeMaxShield(_maxShield); + } + //调整护盾值 + if (Shield > _maxShield) + { + Shield = _maxShield; + } + } + } + private int _maxShield = 0; + + /// + /// 无敌状态 + /// + public bool Invincible + { + get => _invincible; + set + { + if (_invincible != value) + { + if (value) //无敌状态 + { + HurtArea.CollisionLayer = _currentLayer; + _flashingInvincibleTimer = -1; + _flashingInvincibleFlag = false; + } + else //正常状态 + { + HurtArea.CollisionLayer = _currentLayer; + SetBlendAlpha(1); + } + } + + _invincible = value; + } + } + + private bool _invincible = false; + + /// + /// 当前角色所看向的对象, 也就是枪口指向的对象 + /// + public ActivityObject LookTarget { get; set; } + + //初始缩放 + private Vector2 _startScale; + //所有角色碰撞的物体 + private readonly List _interactiveItemList = new List(); + + private CheckInteractiveResult _tempResultData; + private uint _currentLayer; + //闪烁计时器 + private float _flashingInvincibleTimer = -1; + //闪烁状态 + private bool _flashingInvincibleFlag = false; + //闪烁动画协程id + private long _invincibleFlashingId = -1; + //护盾恢复计时器 + private float _shieldRecoveryTimer = 0; + + /// + /// 可以互动的物体 + /// + public ActivityObject InteractiveItem { get; private set; } + + /// + /// 当血量改变时调用 + /// + protected virtual void OnChangeHp(int hp) + { + } + + /// + /// 当最大血量改变时调用 + /// + protected virtual void OnChangeMaxHp(int maxHp) + { + } + + /// + /// 护盾值改变时调用 + /// + protected virtual void OnChangeShield(int shield) + { + } + + /// + /// 最大护盾值改变时调用 + /// + protected virtual void OnChangeMaxShield(int maxShield) + { + } + + /// + /// 当护盾被破坏时调用 + /// + protected virtual void OnShieldDestroy() + { + } + + /// + /// 当受伤时调用 + /// + /// 受到的伤害 + /// 是否受到真实伤害, 如果为false, 则表示该伤害被互动格挡掉了 + protected virtual void OnHit(int damage, bool realHarm) + { + } + + /// + /// 受到伤害时调用, 用于改变受到的伤害值 + /// + /// 受到的伤害 + protected virtual int OnHandlerHurt(int damage) + { + return damage; + } + + /// + /// 当可互动的物体改变时调用, result 参数为 null 表示变为不可互动 + /// + /// 检测是否可互动时的返回值 + protected virtual void ChangeInteractiveItem(CheckInteractiveResult result) + { + } + + /// + /// 死亡时调用 + /// + protected virtual void OnDie() + { + } + + public override void OnInit() + { + Holster = new Holster(this); + _startScale = Scale; + MountPoint.Master = this; + + HurtArea.CollisionLayer = CollisionLayer; + HurtArea.CollisionMask = 0; + _currentLayer = HurtArea.CollisionLayer; + + Face = FaceDirection.Right; + + //连接互动物体信号 + InteractiveArea.BodyEntered += _OnPropsEnter; + InteractiveArea.BodyExited += _OnPropsExit; + } + + protected override void Process(float delta) + { + //看向目标 + if (LookTarget != null) + { + Vector2 pos = LookTarget.GlobalPosition; + //脸的朝向 + var gPos = GlobalPosition; + if (pos.X > gPos.X && Face == FaceDirection.Left) + { + Face = FaceDirection.Right; + } + else if (pos.X < gPos.X && Face == FaceDirection.Right) + { + Face = FaceDirection.Left; + } + //枪口跟随目标 + MountPoint.SetLookAt(pos); + } + + //检查可互动的物体 + bool findFlag = false; + for (int i = 0; i < _interactiveItemList.Count; i++) + { + var item = _interactiveItemList[i]; + if (item == null || item.IsDestroyed) + { + _interactiveItemList.RemoveAt(i--); + } + else + { + //找到可互动的物体了 + if (!findFlag) + { + var result = item.CheckInteractive(this); + if (result.CanInteractive) //可以互动 + { + findFlag = true; + if (InteractiveItem != item) //更改互动物体 + { + InteractiveItem = item; + ChangeInteractiveItem(result); + } + else if (result.ShowIcon != _tempResultData.ShowIcon) //切换状态 + { + ChangeInteractiveItem(result); + } + } + _tempResultData = result; + } + } + } + //没有可互动的物体 + if (!findFlag && InteractiveItem != null) + { + InteractiveItem = null; + ChangeInteractiveItem(null); + } + + //无敌状态, 播放闪烁动画 + if (Invincible) + { + _flashingInvincibleTimer -= delta; + if (_flashingInvincibleTimer <= 0) + { + _flashingInvincibleTimer = 0.15f; + if (_flashingInvincibleFlag) + { + _flashingInvincibleFlag = false; + SetBlendAlpha(0.7f); + } + else + { + _flashingInvincibleFlag = true; + SetBlendAlpha(0); + } + } + + _shieldRecoveryTimer = 0; + } + else //恢复护盾 + { + if (Shield < MaxShield) + { + _shieldRecoveryTimer += delta; + if (_shieldRecoveryTimer >= RoleState.ShieldRecoveryTime) //时间到, 恢复 + { + Shield++; + _shieldRecoveryTimer = 0; + } + } + else + { + _shieldRecoveryTimer = 0; + } + } + } + + /// + /// 当武器放到后背时调用, 用于设置武器位置和角度 + /// + /// 武器实例 + /// 放入武器袋的位置 + public virtual void OnPutBackMount(Weapon weapon, int index) + { + if (index < 8) + { + if (index % 2 == 0) + { + weapon.Position = new Vector2(-4, 3); + weapon.RotationDegrees = 90 - (index / 2f) * 20; + weapon.Scale = new Vector2(-1, 1); + } + else + { + weapon.Position = new Vector2(4, 3); + weapon.RotationDegrees = 270 + (index - 1) / 2f * 20; + weapon.Scale = new Vector2(1, 1); + } + } + else + { + weapon.Visible = false; + } + } + + protected override void OnAffiliationChange() + { + //身上的武器的所属区域也得跟着变 + Holster.ForEach((weapon, i) => + { + if (AffiliationArea != null) + { + AffiliationArea.InsertItem(weapon); + } + else if (weapon.AffiliationArea != null) + { + weapon.AffiliationArea.RemoveItem(weapon); + } + }); + } + + /// + /// 获取当前角色的中心点坐标 + /// + public Vector2 GetCenterPosition() + { + return MountPoint.GlobalPosition; + } + + /// + /// 使角色看向指定的坐标, + /// 注意, 调用该函数会清空 LookTarget, 因为拥有 LookTarget 时也会每帧更新玩家视野位置 + /// + /// + public void LookTargetPosition(Vector2 pos) + { + LookTarget = null; + //脸的朝向 + var gPos = GlobalPosition; + if (pos.X > gPos.X && Face == FaceDirection.Left) + { + Face = FaceDirection.Right; + } + else if (pos.X < gPos.X && Face == FaceDirection.Right) + { + Face = FaceDirection.Left; + } + //枪口跟随目标 + MountPoint.SetLookAt(pos); + } + + /// + /// 判断指定坐标是否在角色视野方向 + /// + public bool IsPositionInForward(Vector2 pos) + { + var gps = GlobalPosition; + return (Face == FaceDirection.Left && pos.X <= gps.X) || + (Face == FaceDirection.Right && pos.X >= gps.X); + } + + /// + /// 返回所有武器是否弹药都打光了 + /// + public bool IsAllWeaponTotalAmmoEmpty() + { + foreach (var weapon in Holster.Weapons) + { + if (weapon != null && !weapon.IsTotalAmmoEmpty()) + { + return false; + } + } + + return true; + } + + /// + /// 拾起一个武器, 返回是否成功拾取, 如果不想立刻切换到该武器, exchange 请传 false + /// + /// 武器对象 + /// 是否立即切换到该武器, 默认 true + public virtual bool PickUpWeapon(Weapon weapon, bool exchange = true) + { + if (Holster.PickupWeapon(weapon, exchange) != -1) + { + //从可互动队列中移除 + _interactiveItemList.Remove(weapon); + return true; + } + + return false; + } + + /// + /// 切换到下一个武器 + /// + public virtual void ExchangeNext() + { + Holster.ExchangeNext(); + } + + /// + /// 切换到上一个武器 + /// + public virtual void ExchangePrev() + { + Holster.ExchangePrev(); + } + + /// + /// 扔掉当前使用的武器, 切换到上一个武器 + /// + public virtual void ThrowWeapon() + { + ThrowWeapon(Holster.ActiveIndex); + } + + /// + /// 扔掉指定位置的武器 + /// + /// 武器在武器袋中的位置 + public virtual void ThrowWeapon(int index) + { + var weapon = Holster.GetWeapon(index); + if (weapon == null) + { + return; + } + + var temp = weapon.AnimatedSprite.Position; + if (Face == FaceDirection.Left) + { + temp.Y = -temp.Y; + } + //var pos = GlobalPosition + temp.Rotated(weapon.GlobalRotation); + Holster.RemoveWeapon(index); + //播放抛出效果 + weapon.ThrowWeapon(this, GlobalPosition); + } + + /// + /// 返回是否存在可互动的物体 + /// + public bool HasInteractive() + { + return InteractiveItem != null; + } + + /// + /// 触发与碰撞的物体互动, 并返回与其互动的物体 + /// + public ActivityObject TriggerInteractive() + { + if (HasInteractive()) + { + var item = InteractiveItem; + item.Interactive(this); + return item; + } + + return null; + } + + /// + /// 触发换弹 + /// + public virtual void Reload() + { + if (Holster.ActiveWeapon != null) + { + Holster.ActiveWeapon.Reload(); + } + } + + /// + /// 触发攻击 + /// + public virtual void Attack() + { + if (Holster.ActiveWeapon != null) + { + Holster.ActiveWeapon.Trigger(); + } + } + + /// + /// 受到伤害, 如果是在碰撞信号处理函数中调用该函数, 请使用 CallDeferred 来延时调用, 否则很有可能导致报错 + /// + /// 伤害的量 + /// 角度 + public virtual void Hurt(int damage, float angle) + { + //受伤闪烁, 无敌状态 + if (Invincible) + { + return; + } + + //计算真正受到的伤害 + damage = OnHandlerHurt(damage); + var flag = Shield > 0; + if (flag) + { + Shield -= damage; + } + else + { + damage = RoleState.CallCalcHurtDamageEvent(damage); + if (damage < 0) + { + return; + } + Hp -= damage; + //播放血液效果 + // var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_Blood_tscn); + // var blood = packedScene.Instance(); + // blood.GlobalPosition = GlobalPosition; + // blood.Rotation = angle; + // GameApplication.Instance.Node3D.GetRoot().AddChild(blood); + } + OnHit(damage, !flag); + + //受伤特效 + PlayHitAnimation(); + + //死亡判定 + if (Hp <= 0) + { + //死亡 + if (!IsDie) + { + IsDie = true; + OnDie(); + } + } + } + + /// + /// 播放无敌状态闪烁动画 + /// + /// 持续时间 + public void PlayInvincibleFlashing(float time) + { + Invincible = true; + if (_invincibleFlashingId >= 0) //上一个还没结束 + { + StopCoroutine(_invincibleFlashingId); + } + + _invincibleFlashingId = StartCoroutine(RunInvincibleFlashing(time)); + } + + /// + /// 停止无敌状态闪烁动画 + /// + public void StopInvincibleFlashing() + { + Invincible = false; + if (_invincibleFlashingId >= 0) + { + StopCoroutine(_invincibleFlashingId); + _invincibleFlashingId = -1; + } + } + + private IEnumerator RunInvincibleFlashing(float time) + { + yield return new WaitForSeconds(time); + _invincibleFlashingId = -1; + Invincible = false; + } + + /// + /// 设置脸的朝向 + /// + private void SetFace(FaceDirection face) + { + if (_face != face) + { + _face = face; + if (face == FaceDirection.Right) + { + RotationDegrees = 0; + Scale = _startScale; + } + else + { + RotationDegrees = 180; + Scale = new Vector2(_startScale.X, -_startScale.Y); + } + } + } + + /// + /// 连接信号: InteractiveArea.BodyEntered + /// 与物体碰撞 + /// + private void _OnPropsEnter(Node2D other) + { + if (other is ActivityObject propObject && !propObject.CollisionWithMask(PhysicsLayer.OnHand)) + { + if (!_interactiveItemList.Contains(propObject)) + { + _interactiveItemList.Add(propObject); + } + } + } + + /// + /// 连接信号: InteractiveArea.BodyExited + /// 物体离开碰撞区域 + /// + private void _OnPropsExit(Node2D other) + { + if (other is ActivityObject propObject) + { + if (_interactiveItemList.Contains(propObject)) + { + _interactiveItemList.Remove(propObject); + } + if (InteractiveItem == propObject) + { + InteractiveItem = null; + ChangeInteractiveItem(null); + } + } + } + + /// + /// 添加道具 + /// + /// + public void PushProp(Buff buff) + { + if (PropsPack.Contains(buff)) + { + GD.PrintErr("道具已经在包裹中了!"); + return; + } + PropsPack.Add(buff); + EventManager.EmitEvent(EventEnum.OnPlayerPickUpProp, buff); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/RoleState.cs b/DungeonShooting_Godot/src/game/activity/role/RoleState.cs new file mode 100644 index 0000000..0585f25 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/RoleState.cs @@ -0,0 +1,167 @@ + +using System; + +/// +/// 角色属性类 +/// +public class RoleState +{ + /// + /// 移动速度 + /// + public float MoveSpeed = 120f; + + /// + /// 移动加速度 + /// + public float Acceleration = 1500f; + + /// + /// 移动摩擦力 + /// + public float Friction = 900f; + + /// + /// 单格护盾恢复时间, 单位: 秒 + /// + public float ShieldRecoveryTime = 8; + + /// + /// 受伤后的无敌时间, 单位: 秒 + /// + public float WoundedInvincibleTime = 1f; + + /// + /// 护盾被攻击后的无敌时间, 单位: 秒 + /// + public float ShieldInvincibleTime = 0.5f; + + /// + /// 攻击/发射后计算伤害 + /// + public event Action> CalcDamageEvent; + public int CallCalcDamageEvent(int damage) + { + if (CalcDamageEvent != null) + { + var result = new RefValue(damage); + CalcDamageEvent(damage, result); + return result.Value; + } + + return damage; + } + + /// + /// 受伤后计算受到的伤害 + /// + public event Action> CalcHurtDamageEvent; + public int CallCalcHurtDamageEvent(int damage) + { + if (CalcHurtDamageEvent != null) + { + var result = new RefValue(damage); + CalcHurtDamageEvent(damage, result); + return result.Value; + } + + return damage; + } + + /// + /// 武器初始散射值增量 + /// + public event Action> CalcStartScatteringEvent; + + public float CallCalcStartScatteringEvent(Weapon weapon, float value) + { + if (CalcStartScatteringEvent != null) + { + var result = new RefValue(value); + CalcStartScatteringEvent(weapon, value, result); + return result.Value; + } + + return value; + } + + /// + /// 武器最终散射值增量 + /// + public event Action> CalcFinalScatteringEvent; + public float CallCalcFinalScatteringEvent(Weapon weapon, float value) + { + if (CalcFinalScatteringEvent != null) + { + var result = new RefValue(value); + CalcFinalScatteringEvent(weapon, value, result); + return result.Value; + } + + return value; + } + + /// + /// 武器开火发射子弹数量 + /// + public event Action> CalcBulletCountEvent; + public int CallCalcBulletCountEvent(Weapon weapon, int count) + { + if (CalcBulletCountEvent != null) + { + var result = new RefValue(count); + CalcBulletCountEvent(weapon, count, result); + return result.Value; + } + + return count; + } + + /// + /// 子弹偏移角度, 角度制 + /// + public event Action> CalcBulletDeviationAngleEvent; + public float CallCalcBulletDeviationAngleEvent(Weapon weapon, float angle) + { + if (CalcBulletDeviationAngleEvent != null) + { + var result = new RefValue(angle); + CalcBulletDeviationAngleEvent(weapon, angle, result); + return result.Value; + } + + return angle; + } + + /// + /// 子弹速度 + /// + public event Action> CalcBulletSpeedEvent; + public float CallCalcBulletSpeedEvent(Weapon weapon, float speed) + { + if (CalcBulletSpeedEvent != null) + { + var result = new RefValue(speed); + CalcBulletSpeedEvent(weapon, speed, result); + return result.Value; + } + + return speed; + } + + /// + /// 子弹射程 + /// + public event Action> CalcBulletDistanceEvent; + public float CallCalcBulletDistanceEvent(Weapon weapon, float distance) + { + if (CalcBulletDistanceEvent != null) + { + var result = new RefValue(distance); + CalcBulletDistanceEvent(weapon, distance, result); + return result.Value; + } + + return distance; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs new file mode 100644 index 0000000..d2200c6 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs @@ -0,0 +1,459 @@ +#region 基础敌人设计思路 +/* +敌人有三种状态: +状态1: 未发现玩家, 视野不可穿墙, 该状态下敌人移动比较规律, 移动速度较慢, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3, 该房间的敌人不能再回到状态1 +状态2: 发现有玩家, 但不知道在哪, 视野不可穿墙, 该情况下敌人移动速度明显加快, 移动不规律, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3 +状态3: 明确知道玩家的位置, 视野允许穿墙, 移动速度与状态2一致, 进入该状态时, 敌人之间会相互告知玩家所在位置, 并朝着玩家位置开火, + 如果有墙格挡, 则有一定概率继续开火, 一旦玩家立刻敌人视野超哥一段时间, 敌人自动切换为状态2 + +敌人状态1只存在于少数房间内, 比如特殊房间, 大部分情况下敌人应该是状态2, 或者玩家进入房间时就被敌人发现 +*/ +#endregion + + +using Godot; + +/// +/// 基础敌人 +/// +[Tool, GlobalClass] +public partial class Enemy : Role +{ + /// + /// 敌人身上的状态机控制器 + /// + public StateController StateController { get; private set; } + + /// + /// 视野半径, 单位像素, 发现玩家后改视野范围可以穿墙 + /// + public float ViewRange { get; set; } = 250; + + /// + /// 发现玩家后的视野半径 + /// + public float TailAfterViewRange { get; set; } = 400; + + /// + /// 背后的视野半径, 单位像素 + /// + public float BackViewRange { get; set; } = 50; + + /// + /// 视野检测射线, 朝玩家打射线, 检测是否碰到墙 + /// + public RayCast2D ViewRay { get; private set; } + + /// + /// 导航代理 + /// + public NavigationAgent2D NavigationAgent2D { get; private set; } + + /// + /// 导航代理中点 + /// + public Marker2D NavigationPoint { get; private set; } + + //开火间隙时间 + private float _enemyAttackTimer = 0; + //目标在视野内的时间 + private float _targetInViewTime = 0; + + public override void OnInit() + { + base.OnInit(); + IsAi = true; + StateController = AddComponent>(); + + AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Prop | PhysicsLayer.Player; + Camp = CampEnum.Camp2; + + RoleState.MoveSpeed = 20; + + MaxHp = 20; + Hp = 20; + + //视野射线 + ViewRay = GetNode("ViewRay"); + NavigationPoint = GetNode("NavigationPoint"); + NavigationAgent2D = NavigationPoint.GetNode("NavigationAgent2D"); + + //PathSign = new PathSign(this, PathSignLength, GameApplication.Instance.Node3D.Player); + + //注册Ai状态机 + StateController.Register(new AiNormalState()); + StateController.Register(new AiProbeState()); + StateController.Register(new AiTailAfterState()); + StateController.Register(new AiFollowUpState()); + StateController.Register(new AiLeaveForState()); + StateController.Register(new AiSurroundState()); + StateController.Register(new AiFindAmmoState()); + + //默认状态 + StateController.ChangeStateInstant(AiStateEnum.AiNormal); + } + + public override void EnterTree() + { + base.EnterTree(); + if (!World.Enemy_InstanceList.Contains(this)) + { + World.Enemy_InstanceList.Add(this); + } + } + + public override void ExitTree() + { + base.ExitTree(); + World.Enemy_InstanceList.Remove(this); + } + + protected override void OnDie() + { + //扔掉所有武器 + var weapons = Holster.GetAndClearWeapon(); + for (var i = 0; i < weapons.Length; i++) + { + weapons[i].ThrowWeapon(this); + } + + var effPos = Position + new Vector2(0, -Altitude); + //血液特效 + var blood = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_effect_activityObject_EnemyBloodEffect_tscn); + blood.Position = effPos - new Vector2(0, 12); + blood.AddToActivityRoot(RoomLayerEnum.NormalLayer); + + //创建敌人碎片 + var count = Utils.RandomRangeInt(3, 6); + for (var i = 0; i < count; i++) + { + var debris = Create(Ids.Id_effect0001); + debris.PutDown(effPos, RoomLayerEnum.NormalLayer); + debris.InheritVelocity(this); + } + + //派发敌人死亡信号 + EventManager.EmitEvent(EventEnum.OnEnemyDie, this); + Destroy(); + } + + protected override void Process(float delta) + { + base.Process(delta); + _enemyAttackTimer -= delta; + + //目标在视野内的时间 + var currState = StateController.CurrState; + if (currState == AiStateEnum.AiSurround || currState == AiStateEnum.AiFollowUp) + { + _targetInViewTime += delta; + } + else + { + _targetInViewTime = 0; + } + + EnemyPickUpWeapon(); + } + + protected override void OnHit(int damage, bool realHarm) + { + //受到伤害 + var state = StateController.CurrState; + if (state == AiStateEnum.AiNormal || state == AiStateEnum.AiProbe || state == AiStateEnum.AiLeaveFor) + { + StateController.ChangeState(AiStateEnum.AiTailAfter); + } + } + + /// + /// 返回地上的武器是否有可以拾取的, 也包含没有被其他敌人标记的武器 + /// + public bool CheckUsableWeaponInUnclaimed() + { + foreach (var unclaimedWeapon in World.Weapon_UnclaimedWeapons) + { + //判断是否能拾起武器, 条件: 相同的房间 + if (unclaimedWeapon.AffiliationArea == AffiliationArea) + { + if (!unclaimedWeapon.IsTotalAmmoEmpty()) + { + if (!unclaimedWeapon.HasSign(SignNames.AiFindWeaponSign)) + { + return true; + } + else + { + //判断是否可以移除该标记 + var enemy = unclaimedWeapon.GetSign(SignNames.AiFindWeaponSign); + if (enemy == null || enemy.IsDestroyed) //标记当前武器的敌人已经被销毁 + { + unclaimedWeapon.RemoveSign(SignNames.AiFindWeaponSign); + return true; + } + else if (!enemy.IsAllWeaponTotalAmmoEmpty()) //标记当前武器的敌人已经有新的武器了 + { + unclaimedWeapon.RemoveSign(SignNames.AiFindWeaponSign); + return true; + } + } + } + } + } + + return false; + } + + /// + /// 寻找可用的武器 + /// + public Weapon FindTargetWeapon() + { + Weapon target = null; + var position = Position; + foreach (var weapon in World.Weapon_UnclaimedWeapons) + { + //判断是否能拾起武器, 条件: 相同的房间, 或者当前房间目前没有战斗, 或者不在战斗房间 + if (weapon.AffiliationArea == AffiliationArea) + { + //还有弹药 + if (!weapon.IsTotalAmmoEmpty()) + { + //查询是否有其他敌人标记要拾起该武器 + if (weapon.HasSign(SignNames.AiFindWeaponSign)) + { + var enemy = weapon.GetSign(SignNames.AiFindWeaponSign); + if (enemy == this) //就是自己标记的 + { + + } + else if (enemy == null || enemy.IsDestroyed) //标记当前武器的敌人已经被销毁 + { + weapon.RemoveSign(SignNames.AiFindWeaponSign); + } + else if (!enemy.IsAllWeaponTotalAmmoEmpty()) //标记当前武器的敌人已经有新的武器了 + { + weapon.RemoveSign(SignNames.AiFindWeaponSign); + } + else //放弃这把武器 + { + continue; + } + } + + if (target == null) //第一把武器 + { + target = weapon; + } + else if (target.Position.DistanceSquaredTo(position) > + weapon.Position.DistanceSquaredTo(position)) //距离更近 + { + target = weapon; + } + } + } + } + + return target; + } + + /// + /// 检查是否能切换到 AiStateEnum.AiLeaveFor 状态 + /// + /// + public bool CanChangeLeaveFor() + { + if (!World.Enemy_IsFindTarget) + { + return false; + } + + var currState = StateController.CurrState; + if (currState == AiStateEnum.AiNormal || currState == AiStateEnum.AiProbe) + { + //判断是否在同一个房间内 + return World.Enemy_FindTargetAffiliationSet.Contains(AffiliationArea); + } + + return false; + } + + /// + /// Ai触发的攻击 + /// + public void EnemyAttack(float delta) + { + var weapon = Holster.ActiveWeapon; + if (weapon != null) + { + if (weapon.IsTotalAmmoEmpty()) //当前武器弹药打空 + { + //切换到有子弹的武器 + var index = Holster.FindWeapon((we, i) => !we.IsTotalAmmoEmpty()); + if (index != -1) + { + Holster.ExchangeByIndex(index); + } + else //所有子弹打光 + { + + } + } + else if (weapon.Reloading) //换弹中 + { + + } + else if (weapon.IsAmmoEmpty()) //弹夹已经打空 + { + Reload(); + } + else if (_targetInViewTime >= weapon.Attribute.AiTargetLockingTime) //正常射击 + { + if (weapon.GetDelayedAttackTime() > 0) + { + Attack(); + } + else + { + if (weapon.Attribute.ContinuousShoot) //连发 + { + Attack(); + } + else //单发 + { + if (_enemyAttackTimer <= 0) + { + _enemyAttackTimer = 60f / weapon.Attribute.StartFiringSpeed; + Attack(); + } + } + } + } + } + } + + /// + /// 获取武器攻击范围 (最大距离值与最小距离的中间值) + /// + /// 从最小到最大距离的过渡量, 0 - 1, 默认 0.5 + public float GetWeaponRange(float weight = 0.5f) + { + if (Holster.ActiveWeapon != null) + { + var attribute = Holster.ActiveWeapon.Attribute; + return Mathf.Lerp(attribute.BulletMinDistance, attribute.BulletMaxDistance, weight); + } + + return 0; + } + + /// + /// 返回目标点是否在视野范围内 + /// + public bool IsInViewRange(Vector2 target) + { + var isForward = IsPositionInForward(target); + if (isForward) + { + if (GlobalPosition.DistanceSquaredTo(target) <= ViewRange * ViewRange) //没有超出视野半径 + { + return true; + } + } + + return false; + } + + /// + /// 返回目标点是否在跟随状态下的视野半径内 + /// + public bool IsInTailAfterViewRange(Vector2 target) + { + var isForward = IsPositionInForward(target); + if (isForward) + { + if (GlobalPosition.DistanceSquaredTo(target) <= TailAfterViewRange * TailAfterViewRange) //没有超出视野半径 + { + return true; + } + } + + return false; + } + + /// + /// 调用视野检测, 如果被墙壁和其它物体遮挡, 则返回被挡住视野的物体对象, 视野无阻则返回 null + /// + public bool TestViewRayCast(Vector2 target) + { + ViewRay.Enabled = true; + ViewRay.TargetPosition = ViewRay.ToLocal(target); + ViewRay.ForceRaycastUpdate(); + return ViewRay.IsColliding(); + } + + /// + /// 调用视野检测完毕后, 需要调用 TestViewRayCastOver() 来关闭视野检测射线 + /// + public void TestViewRayCastOver() + { + ViewRay.Enabled = false; + } + + /// + /// AI 拾起武器操作 + /// + private void EnemyPickUpWeapon() + { + //这几个状态不需要主动拾起武器操作 + var state = StateController.CurrState; + if (state == AiStateEnum.AiNormal) + { + return; + } + + //拾起地上的武器 + if (InteractiveItem is Weapon weapon) + { + if (Holster.ActiveWeapon == null) //手上没有武器, 无论如何也要拾起 + { + TriggerInteractive(); + return; + } + + //没弹药了 + if (weapon.IsTotalAmmoEmpty()) + { + return; + } + + var index = Holster.FindWeapon((we, i) => we.ItemConfig.Id == weapon.ItemConfig.Id); + if (index != -1) //与武器袋中武器类型相同, 补充子弹 + { + if (!Holster.GetWeapon(index).IsAmmoFull()) + { + TriggerInteractive(); + } + + return; + } + + // var index2 = Holster.FindWeapon((we, i) => + // we.Attribute.WeightType == weapon.Attribute.WeightType && we.IsTotalAmmoEmpty()); + var index2 = Holster.FindWeapon((we, i) => we.IsTotalAmmoEmpty()); + if (index2 != -1) //扔掉没子弹的武器 + { + ThrowWeapon(index2); + TriggerInteractive(); + return; + } + + // if (Holster.HasVacancy()) //有空位, 拾起武器 + // { + // TriggerInteractive(); + // return; + // } + } + } + +} diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AIStateEnum.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AIStateEnum.cs new file mode 100644 index 0000000..6bb8db4 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AIStateEnum.cs @@ -0,0 +1,32 @@ + +public enum AiStateEnum +{ + /// + /// Ai 状态, 正常, 未发现目标 + /// + AiNormal, + /// + /// 发现目标, 但不知道在哪 + /// + AiProbe, + /// + /// 收到其他敌人通知, 前往发现目标的位置 + /// + AiLeaveFor, + /// + /// 发现目标, 目标不在视野内, 但是知道位置 + /// + AiTailAfter, + /// + /// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 + /// + AiFollowUp, + /// + /// 距离足够近, 在目标附近随机移动 + /// + AiSurround, + /// + /// Ai 寻找弹药 + /// + AiFindAmmo, +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs new file mode 100644 index 0000000..f1f6863 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs @@ -0,0 +1,152 @@ + +using Godot; + +/// +/// Ai 寻找弹药, 进入该状态需要在参数中传入目标武器对象 +/// +public class AiFindAmmoState : StateBase +{ + + private Weapon _target; + + //导航目标点刷新计时器 + private float _navigationUpdateTimer = 0; + private float _navigationInterval = 1f; + + private bool _isInTailAfterRange = false; + private float _tailAfterTimer = 0; + + public AiFindAmmoState() : base(AiStateEnum.AiFindAmmo) + { + } + + public override void Enter(AiStateEnum prev, params object[] args) + { + if (args.Length == 0) + { + GD.PrintErr("进入 AiStateEnum.AiFindAmmo 状态必须要把目标武器当成参数传过来"); + ChangeState(prev); + return; + } + + SetTargetWeapon((Weapon)args[0]); + _navigationUpdateTimer = 0; + _isInTailAfterRange = false; + _tailAfterTimer = 0; + + //标记武器 + _target.SetSign(SignNames.AiFindWeaponSign, Master); + } + + public override void Process(float delta) + { + if (!Master.IsAllWeaponTotalAmmoEmpty()) //已经有弹药了 + { + ChangeState(GetNextState()); + return; + } + + //更新目标位置 + if (_navigationUpdateTimer <= 0) + { + //每隔一段时间秒更改目标位置 + _navigationUpdateTimer = _navigationInterval; + var position = _target.GlobalPosition; + Master.NavigationAgent2D.TargetPosition = position; + } + else + { + _navigationUpdateTimer -= delta; + } + + var playerPos = Player.Current.GetCenterPosition(); + //枪口指向玩家 + Master.LookTargetPosition(playerPos); + + if (_target.IsDestroyed || _target.IsTotalAmmoEmpty()) //已经被销毁, 或者弹药已经被其他角色捡走 + { + //再去寻找其他武器 + SetTargetWeapon(Master.FindTargetWeapon()); + + if (_target == null) //也没有其他可用的武器了 + { + ChangeState(GetNextState()); + } + } + else if (_target.Master == Master) //已经被自己拾起 + { + ChangeState(GetNextState()); + } + else if (_target.Master != null) //武器已经被其他角色拾起! + { + //再去寻找其他武器 + SetTargetWeapon(Master.FindTargetWeapon()); + + if (_target == null) //也没有其他可用的武器了 + { + ChangeState(GetNextState()); + } + } + else + { + //检测目标没有超出跟随视野距离 + _isInTailAfterRange = Master.IsInTailAfterViewRange(playerPos); + if (_isInTailAfterRange) + { + _tailAfterTimer = 0; + } + else + { + _tailAfterTimer += delta; + } + + //向武器移动 + if (!Master.NavigationAgent2D.IsNavigationFinished()) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = + (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.BasisVelocity = Vector2.Zero; + } + } + } + + private AiStateEnum GetNextState() + { + return _tailAfterTimer > 10 ? AiStateEnum.AiNormal : AiStateEnum.AiTailAfter; + } + + private void SetTargetWeapon(Weapon weapon) + { + _target = weapon; + //设置目标点 + if (_target != null) + { + Master.NavigationAgent2D.TargetPosition = _target.GlobalPosition; + } + } + + public override void DebugDraw() + { + if (_target != null) + { + Master.DrawLine(Vector2.Zero, Master.ToLocal(_target.GlobalPosition), Colors.Purple); + + if (_tailAfterTimer <= 0) + { + Master.DrawLine(Vector2.Zero, Master.ToLocal(Player.Current.GetCenterPosition()), Colors.Orange); + } + else if (_tailAfterTimer <= 10) + { + Master.DrawLine(Vector2.Zero, Master.ToLocal(Player.Current.GetCenterPosition()), Colors.Blue); + } + + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs new file mode 100644 index 0000000..1e253ea --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs @@ -0,0 +1,126 @@ + +using Godot; + +/// +/// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 +/// +public class AiFollowUpState : StateBase +{ + + /// + /// 目标是否在视野内 + /// + public bool IsInView; + + //导航目标点刷新计时器 + private float _navigationUpdateTimer = 0; + private float _navigationInterval = 0.3f; + + public AiFollowUpState() : base(AiStateEnum.AiFollowUp) + { + } + + public override void Enter(AiStateEnum prev, params object[] args) + { + _navigationUpdateTimer = 0; + IsInView = true; + } + + public override void Process(float delta) + { + //先检查弹药是否打光 + if (Master.IsAllWeaponTotalAmmoEmpty()) + { + //再寻找是否有可用的武器 + var targetWeapon = Master.FindTargetWeapon(); + if (targetWeapon != null) + { + ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); + return; + } + else + { + //切换到随机移动状态 + ChangeState(AiStateEnum.AiSurround); + } + } + + var playerPos = Player.Current.GetCenterPosition(); + + //更新玩家位置 + if (_navigationUpdateTimer <= 0) + { + //每隔一段时间秒更改目标位置 + _navigationUpdateTimer = _navigationInterval; + Master.NavigationAgent2D.TargetPosition = playerPos; + } + else + { + _navigationUpdateTimer -= delta; + } + + var masterPosition = Master.GlobalPosition; + + //是否在攻击范围内 + var inAttackRange = false; + + var weapon = Master.Holster.ActiveWeapon; + if (weapon != null) + { + inAttackRange = masterPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Master.GetWeaponRange(0.7f), 2); + } + + //枪口指向玩家 + Master.LookTargetPosition(playerPos); + + if (!Master.NavigationAgent2D.IsNavigationFinished()) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - masterPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.BasisVelocity = Vector2.Zero; + } + + //检测玩家是否在视野内 + if (Master.IsInTailAfterViewRange(playerPos)) + { + IsInView = !Master.TestViewRayCast(playerPos); + //关闭射线检测 + Master.TestViewRayCastOver(); + } + else + { + IsInView = false; + } + + if (IsInView) + { + if (inAttackRange) //在攻击范围内 + { + //发起攻击 + Master.EnemyAttack(delta); + + //距离够近, 可以切换到环绕模式 + if (Master.GlobalPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(weapon.Attribute.BulletMinDistance, 2) * 0.7f) + { + ChangeState(AiStateEnum.AiSurround); + } + } + } + else + { + ChangeState(AiStateEnum.AiTailAfter); + } + } + + public override void DebugDraw() + { + var playerPos = Player.Current.GetCenterPosition(); + Master.DrawLine(new Vector2(0, -8), Master.ToLocal(playerPos), Colors.Red); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiLeaveForState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiLeaveForState.cs new file mode 100644 index 0000000..bb1c761 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiLeaveForState.cs @@ -0,0 +1,101 @@ + +using Godot; + +/// +/// 收到其他敌人通知, 前往发现目标的位置 +/// +public class AiLeaveForState : StateBase +{ + //导航目标点刷新计时器 + private float _navigationUpdateTimer = 0; + private float _navigationInterval = 0.3f; + + public AiLeaveForState() : base(AiStateEnum.AiLeaveFor) + { + } + + public override void Enter(AiStateEnum prev, params object[] args) + { + if (Master.World.Enemy_IsFindTarget) + { + Master.NavigationAgent2D.TargetPosition = Master.World.Enemy_FindTargetPosition; + } + else + { + ChangeState(prev); + return; + } + + //先检查弹药是否打光 + if (Master.IsAllWeaponTotalAmmoEmpty()) + { + //再寻找是否有可用的武器 + var targetWeapon = Master.FindTargetWeapon(); + if (targetWeapon != null) + { + ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); + } + } + } + + public override void Process(float delta) + { + //这个状态下不会有攻击事件, 所以没必要每一帧检查是否弹药耗尽 + + //更新玩家位置 + if (_navigationUpdateTimer <= 0) + { + //每隔一段时间秒更改目标位置 + _navigationUpdateTimer = _navigationInterval; + Master.NavigationAgent2D.TargetPosition = Master.World.Enemy_FindTargetPosition; + } + else + { + _navigationUpdateTimer -= delta; + } + + if (!Master.NavigationAgent2D.IsNavigationFinished()) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.LookTargetPosition(Master.World.Enemy_FindTargetPosition); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.BasisVelocity = Vector2.Zero; + } + + var playerPos = Player.Current.GetCenterPosition(); + //检测玩家是否在视野内, 如果在, 则切换到 AiTargetInView 状态 + if (Master.IsInTailAfterViewRange(playerPos)) + { + if (!Master.TestViewRayCast(playerPos)) //看到玩家 + { + //关闭射线检测 + Master.TestViewRayCastOver(); + //切换成发现目标状态 + ChangeState(AiStateEnum.AiFollowUp); + return; + } + else + { + //关闭射线检测 + Master.TestViewRayCastOver(); + } + } + + //移动到目标掉了, 还没发现目标 + if (Master.NavigationAgent2D.IsNavigationFinished()) + { + ChangeState(AiStateEnum.AiNormal); + } + } + + public override void DebugDraw() + { + Master.DrawLine(Vector2.Zero, Master.ToLocal(Master.NavigationAgent2D.TargetPosition), Colors.Yellow); + } +} diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiNormalState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiNormalState.cs new file mode 100644 index 0000000..20cad58 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiNormalState.cs @@ -0,0 +1,181 @@ + +using Godot; + +/// +/// AI 正常状态 +/// +public class AiNormalState : StateBase +{ + //是否发现玩家 + private bool _isFindPlayer; + + //下一个运动的角度 + private Vector2 _nextPos; + + //是否移动结束 + private bool _isMoveOver; + + //上一次移动是否撞墙 + private bool _againstWall; + + //撞墙法线角度 + private float _againstWallNormalAngle; + + //移动停顿计时器 + private float _pauseTimer; + private bool _moveFlag; + + //上一帧位置 + private Vector2 _prevPos; + //卡在一个位置的时间 + private float _lockTimer; + + public AiNormalState() : base(AiStateEnum.AiNormal) + { + } + + public override void Enter(AiStateEnum prev, params object[] args) + { + _isFindPlayer = false; + _isMoveOver = true; + _againstWall = false; + _againstWallNormalAngle = 0; + _pauseTimer = 0; + _moveFlag = false; + } + + public override void Process(float delta) + { + //其他敌人发现玩家 + if (Master.CanChangeLeaveFor()) + { + ChangeState(AiStateEnum.AiLeaveFor); + return; + } + + if (_isFindPlayer) //已经找到玩家了 + { + //现临时处理, 直接切换状态 + ChangeState(AiStateEnum.AiTailAfter); + } + else //没有找到玩家 + { + //检测玩家 + var player = Player.Current; + //玩家中心点坐标 + var playerPos = player.GetCenterPosition(); + + if (Master.IsInViewRange(playerPos) && !Master.TestViewRayCast(playerPos)) //发现玩家 + { + //发现玩家 + _isFindPlayer = true; + } + else if (_pauseTimer >= 0) + { + Master.AnimatedSprite.Play(AnimatorNames.Idle); + _pauseTimer -= delta; + } + else if (_isMoveOver) //没发现玩家, 且已经移动完成 + { + RunOver(); + _isMoveOver = false; + } + else //移动中 + { + if (_lockTimer >= 1) //卡在一个点超过一秒 + { + RunOver(); + _isMoveOver = false; + _lockTimer = 0; + } + else if (Master.NavigationAgent2D.IsNavigationFinished()) //到达终点 + { + _pauseTimer = Utils.RandomRangeFloat(0.3f, 2f); + _isMoveOver = true; + _moveFlag = false; + Master.BasisVelocity = Vector2.Zero; + } + else if (!_moveFlag) + { + _moveFlag = true; + var pos = Master.GlobalPosition; + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + _prevPos = pos; + } + else + { + var pos = Master.GlobalPosition; + var lastSlideCollision = Master.GetLastSlideCollision(); + if (lastSlideCollision != null && lastSlideCollision.GetCollider() is Role) //碰到其他角色 + { + _pauseTimer = Utils.RandomRangeFloat(0.1f, 0.5f); + _isMoveOver = true; + _moveFlag = false; + Master.BasisVelocity = Vector2.Zero; + } + else + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + + if (_prevPos.DistanceSquaredTo(pos) <= 0.01f) + { + _lockTimer += delta; + } + else + { + _prevPos = pos; + } + } + } + + //关闭射线检测 + Master.TestViewRayCastOver(); + } + } + + //移动结束 + private void RunOver() + { + float angle; + if (_againstWall) + { + angle = Utils.RandomRangeFloat(_againstWallNormalAngle - Mathf.Pi * 0.5f, + _againstWallNormalAngle + Mathf.Pi * 0.5f); + } + else + { + angle = Utils.RandomRangeFloat(0, Mathf.Pi * 2f); + } + + var len = Utils.RandomRangeInt(30, 200); + _nextPos = new Vector2(len, 0).Rotated(angle) + Master.GlobalPosition; + //获取射线碰到的坐标 + if (Master.TestViewRayCast(_nextPos)) //碰到墙壁 + { + _nextPos = Master.ViewRay.GetCollisionPoint(); + _againstWall = true; + _againstWallNormalAngle = Master.ViewRay.GetCollisionNormal().Angle(); + } + else + { + _againstWall = false; + } + + Master.NavigationAgent2D.TargetPosition = _nextPos; + Master.LookTargetPosition(_nextPos); + } + + public override void DebugDraw() + { + Master.DrawLine(new Vector2(0, -8), Master.ToLocal(_nextPos), Colors.Green); + } +} diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiProbeState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiProbeState.cs new file mode 100644 index 0000000..1015095 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiProbeState.cs @@ -0,0 +1,20 @@ + +/// +/// Ai 不确定玩家位置 +/// +public class AiProbeState : StateBase +{ + public AiProbeState() : base(AiStateEnum.AiProbe) + { + } + + public override void Process(float delta) + { + //其他敌人发现玩家 + if (Master.CanChangeLeaveFor()) + { + ChangeState(AiStateEnum.AiLeaveFor); + return; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs new file mode 100644 index 0000000..9a4c90e --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs @@ -0,0 +1,176 @@ + +using Godot; + +/// +/// 距离目标足够近, 在目标附近随机移动, 并开火 +/// +public class AiSurroundState : StateBase +{ + /// + /// 目标是否在视野内 + /// + public bool IsInView = true; + + //是否移动结束 + private bool _isMoveOver; + + //移动停顿计时器 + private float _pauseTimer; + private bool _moveFlag; + + //下一个移动点 + private Vector2 _nextPosition; + + //上一帧位置 + private Vector2 _prevPos; + //卡在一个位置的时间 + private float _lockTimer; + + public AiSurroundState() : base(AiStateEnum.AiSurround) + { + } + + public override void Enter(AiStateEnum prev, params object[] args) + { + IsInView = true; + _isMoveOver = true; + _pauseTimer = 0; + _moveFlag = false; + } + + public override void Process(float delta) + { + //先检查弹药是否打光 + if (Master.IsAllWeaponTotalAmmoEmpty()) + { + //再寻找是否有可用的武器 + var targetWeapon = Master.FindTargetWeapon(); + if (targetWeapon != null) + { + ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); + return; + } + } + + var playerPos = Player.Current.GetCenterPosition(); + var weapon = Master.Holster.ActiveWeapon; + + //枪口指向玩家 + Master.LookTargetPosition(playerPos); + + //检测玩家是否在视野内 + if (Master.IsInTailAfterViewRange(playerPos)) + { + IsInView = !Master.TestViewRayCast(playerPos); + //关闭射线检测 + Master.TestViewRayCastOver(); + } + else + { + IsInView = false; + } + + if (IsInView) + { + if (_pauseTimer >= 0) + { + Master.AnimatedSprite.Play(AnimatorNames.Idle); + _pauseTimer -= delta; + } + else if (_isMoveOver) //移动已经完成 + { + RunOver(playerPos); + _isMoveOver = false; + } + else + { + if (_lockTimer >= 1) //卡在一个点超过一秒 + { + RunOver(playerPos); + _isMoveOver = false; + _lockTimer = 0; + } + else if (Master.NavigationAgent2D.IsNavigationFinished()) //到达终点 + { + _pauseTimer = Utils.RandomRangeFloat(0f, 0.5f); + _isMoveOver = true; + _moveFlag = false; + Master.BasisVelocity = Vector2.Zero; + } + else if (!_moveFlag) + { + _moveFlag = true; + //计算移动 + var pos = Master.GlobalPosition; + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + var pos = Master.GlobalPosition; + var lastSlideCollision = Master.GetLastSlideCollision(); + if (lastSlideCollision != null && lastSlideCollision.GetCollider() is Role) //碰到其他角色 + { + _pauseTimer = Utils.RandomRangeFloat(0f, 0.3f); + _isMoveOver = true; + _moveFlag = false; + Master.BasisVelocity = Vector2.Zero; + } + else + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + + if (_prevPos.DistanceSquaredTo(pos) <= 0.01f) + { + _lockTimer += delta; + } + else + { + _prevPos = pos; + } + } + + if (weapon != null) + { + var position = Master.GlobalPosition; + if (position.DistanceSquaredTo(playerPos) > Mathf.Pow(Master.GetWeaponRange(0.7f), 2)) //玩家离开正常射击范围 + { + ChangeState(AiStateEnum.AiFollowUp); + } + else + { + //发起攻击 + Master.EnemyAttack(delta); + } + } + } + } + else //目标离开视野 + { + ChangeState(AiStateEnum.AiTailAfter); + } + } + + private void RunOver(Vector2 targetPos) + { + var weapon = Master.Holster.ActiveWeapon; + var distance = (int)(weapon == null ? 150 : (weapon.Attribute.BulletMinDistance * 0.7f)); + _nextPosition = new Vector2( + targetPos.X + Utils.RandomRangeInt(-distance, distance), + targetPos.Y + Utils.RandomRangeInt(-distance, distance) + ); + Master.NavigationAgent2D.TargetPosition = _nextPosition; + } + + public override void DebugDraw() + { + Master.DrawLine(new Vector2(0, -8), Master.ToLocal(_nextPosition), Colors.White); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiTailAfterState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiTailAfterState.cs new file mode 100644 index 0000000..455e4ae --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiTailAfterState.cs @@ -0,0 +1,125 @@ + +using Godot; + +/// +/// AI 发现玩家, 跟随玩家 +/// +public class AiTailAfterState : StateBase +{ + /// + /// 目标是否在视野半径内 + /// + private bool _isInViewRange; + + //导航目标点刷新计时器 + private float _navigationUpdateTimer = 0; + private float _navigationInterval = 0.3f; + + //目标从视野消失时已经过去的时间 + private float _viewTimer; + + public AiTailAfterState() : base(AiStateEnum.AiTailAfter) + { + } + + public override void Enter(AiStateEnum prev, params object[] args) + { + _isInViewRange = true; + _navigationUpdateTimer = 0; + _viewTimer = 0; + + //先检查弹药是否打光 + if (Master.IsAllWeaponTotalAmmoEmpty()) + { + //再寻找是否有可用的武器 + var targetWeapon = Master.FindTargetWeapon(); + if (targetWeapon != null) + { + ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); + } + } + } + + public override void Process(float delta) + { + //这个状态下不会有攻击事件, 所以没必要每一帧检查是否弹药耗尽 + + var playerPos = Player.Current.GetCenterPosition(); + + //更新玩家位置 + if (_navigationUpdateTimer <= 0) + { + //每隔一段时间秒更改目标位置 + _navigationUpdateTimer = _navigationInterval; + Master.NavigationAgent2D.TargetPosition = playerPos; + } + else + { + _navigationUpdateTimer -= delta; + } + + //枪口指向玩家 + Master.LookTargetPosition(playerPos); + + if (!Master.NavigationAgent2D.IsNavigationFinished()) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.BasisVelocity = Vector2.Zero; + } + //检测玩家是否在视野内, 如果在, 则切换到 AiTargetInView 状态 + if (Master.IsInTailAfterViewRange(playerPos)) + { + if (!Master.TestViewRayCast(playerPos)) //看到玩家 + { + //关闭射线检测 + Master.TestViewRayCastOver(); + //切换成发现目标状态 + ChangeState(AiStateEnum.AiFollowUp); + return; + } + else + { + //关闭射线检测 + Master.TestViewRayCastOver(); + } + } + + //检测玩家是否在穿墙视野范围内, 直接检测距离即可 + _isInViewRange = Master.IsInViewRange(playerPos); + if (_isInViewRange) + { + _viewTimer = 0; + } + else //超出视野 + { + if (_viewTimer > 10) //10秒 + { + ChangeState(AiStateEnum.AiNormal); + } + else + { + _viewTimer += delta; + } + } + } + + public override void DebugDraw() + { + var playerPos = Player.Current.GetCenterPosition(); + if (_isInViewRange) + { + Master.DrawLine(new Vector2(0, -8), Master.ToLocal(playerPos), Colors.Orange); + } + else + { + Master.DrawLine(new Vector2(0, -8), Master.ToLocal(playerPos), Colors.Blue); + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index 4cae2a7..17ac271 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -238,7 +238,7 @@ { if (_weaponAttributeMap.TryGetValue(itemId, out var attr)) { - return attr; + return attr.Clone(); } throw new Exception($"武器'{itemId}'没有在 Weapon 表中配置属性数据!"); @@ -246,7 +246,7 @@ public override void OnInit() { - InitWeapon(_GetWeaponAttribute(ItemId)); + InitWeapon(_GetWeaponAttribute(ItemConfig.Id)); AnimatedSprite.AnimationFinished += OnAnimationFinished; } @@ -269,7 +269,7 @@ if (Attribute.AmmoCapacity > Attribute.MaxAmmoCapacity) { Attribute.AmmoCapacity = Attribute.MaxAmmoCapacity; - GD.PrintErr("弹夹的容量不能超过弹药上限, 武器id: " + ItemId); + GD.PrintErr("弹夹的容量不能超过弹药上限, 武器id: " + ItemConfig.Id); } //弹药量 CurrAmmo = Attribute.AmmoCapacity; @@ -366,7 +366,8 @@ /// /// 当武器从武器袋中移除时调用 /// - protected virtual void OnRemove() + /// 移除该武器的角色 + protected virtual void OnRemove(Role master) { } @@ -421,8 +422,7 @@ //攻击冷却计时 _attackTimer = _attackTimer > 0 ? _attackTimer - delta : 0; //武器的当前散射半径 - CurrScatteringRange = Mathf.Max(CurrScatteringRange - Attribute.ScatteringRangeBackSpeed * delta, - Attribute.StartScatteringRange); + ScatteringRangeBackHandler(delta); //松开扳机 if (_triggerFlag || _downTimer > 0) { @@ -609,7 +609,7 @@ //连发开火 TriggerFire(); //连发最后一发打完了 - if (_continuousCount <= 0) + if (Attribute.ManualBeLoaded && _continuousCount <= 0) { //执行上膛逻辑 RunBeLoaded(); @@ -619,8 +619,7 @@ //散射值销退 if (_noAttackTime >= Attribute.ScatteringRangeBackDelayTime) { - CurrScatteringRange = Mathf.Max(CurrScatteringRange - Attribute.ScatteringRangeBackSpeed * delta, - Attribute.StartScatteringRange); + ScatteringRangeBackHandler(delta); } _triggerTimer = _triggerTimer > 0 ? _triggerTimer - delta : 0; @@ -772,7 +771,7 @@ TriggerFire(); //非连射模式 - if (!Attribute.ContinuousShoot && _continuousCount <= 0) + if (!Attribute.ContinuousShoot && Attribute.ManualBeLoaded && _continuousCount <= 0) { //执行上膛逻辑 RunBeLoaded(); @@ -849,7 +848,7 @@ { TriggerFire(); //非连射模式 - if (!Attribute.ContinuousShoot && _continuousCount <= 0) + if (!Attribute.ContinuousShoot && Attribute.ManualBeLoaded && _continuousCount <= 0) { //执行上膛逻辑 RunBeLoaded(); @@ -909,7 +908,7 @@ PlayShootSound(); //抛弹 - if (Attribute.ContinuousShoot && Attribute.ShellId != null) + if ((Attribute.ContinuousShoot || !Attribute.ManualBeLoaded)) { ThrowShellHandler(1f); } @@ -917,8 +916,7 @@ //触发开火函数 OnFire(); - //开火发射的子弹数量 - var bulletCount = Utils.RandomRangeInt(Attribute.MaxFireBulletCount, Attribute.MinFireBulletCount); + //武器口角度 var angle = new Vector2(GameConfig.ScatteringDistance, CurrScatteringRange).Angle(); @@ -927,7 +925,16 @@ var tempAngle = Mathf.RadToDeg(tempRotation); //开火时枪口角度 - var fireRotation = Mathf.DegToRad(Master.MountPoint.RealRotationDegrees) + tempRotation; + var fireRotation = tempRotation; + + //开火发射的子弹数量 + var bulletCount = Utils.RandomRangeInt(Attribute.MaxFireBulletCount, Attribute.MinFireBulletCount); + if (Master != null) + { + bulletCount = Master.RoleState.CallCalcBulletCountEvent(this, bulletCount); + fireRotation += Mathf.DegToRad(Master.MountPoint.RealRotationDegrees); + } + //创建子弹 for (int i = 0; i < bulletCount; i++) { @@ -936,8 +943,8 @@ } //开火添加散射值 - CurrScatteringRange = Mathf.Min(CurrScatteringRange + Attribute.ScatteringRangeAddValue, - Attribute.FinalScatteringRange); + ScatteringRangeAddHandler(); + //武器的旋转角度 tempAngle -= Attribute.UpliftAngle; RotationDegrees = tempAngle; @@ -1060,7 +1067,7 @@ // GD.Print("开始换弹."); //抛弹 - if (!Attribute.ContinuousShoot && (_beLoadedState == 0 || _beLoadedState == -1) && Attribute.BeLoadedTime > 0 && Attribute.ShellId != null) + if (!Attribute.ContinuousShoot && (_beLoadedState == 0 || _beLoadedState == -1) && Attribute.BeLoadedTime > 0) { ThrowShellHandler(0.6f); } @@ -1163,7 +1170,7 @@ //执行上膛逻辑 private void RunBeLoaded() { - if (Attribute.AutoBeLoaded) + if (Attribute.AutoManualBeLoaded) { if (_attackTimer <= 0) { @@ -1240,7 +1247,7 @@ private void BeLoadedHandler() { //上膛抛弹 - if (!Attribute.ContinuousShoot && Attribute.BeLoadedTime > 0 && Attribute.ShellId != null) + if (!Attribute.ContinuousShoot && Attribute.BeLoadedTime > 0) { ThrowShellHandler(0.6f); } @@ -1281,6 +1288,10 @@ //抛弹逻辑 private void ThrowShellHandler(float speedScale) { + if (string.IsNullOrEmpty(Attribute.ShellId)) + { + return; + } //创建一个弹壳 if (Attribute.ThrowShellDelayTime > 0) { @@ -1292,6 +1303,50 @@ } } + //散射值消退处理 + private void ScatteringRangeBackHandler(float delta) + { + var startScatteringRange = Attribute.StartScatteringRange; + var finalScatteringRange = Attribute.FinalScatteringRange; + if (Master != null) + { + startScatteringRange = Master.RoleState.CallCalcStartScatteringEvent(this, startScatteringRange); + finalScatteringRange = Master.RoleState.CallCalcFinalScatteringEvent(this, finalScatteringRange); + } + if (startScatteringRange <= finalScatteringRange) + { + CurrScatteringRange = Mathf.Max(CurrScatteringRange - Attribute.ScatteringRangeBackSpeed * delta, + startScatteringRange); + } + else + { + CurrScatteringRange = Mathf.Min(CurrScatteringRange + Attribute.ScatteringRangeBackSpeed * delta, + startScatteringRange); + } + } + + //散射值添加处理 + private void ScatteringRangeAddHandler() + { + var startScatteringRange = Attribute.StartScatteringRange; + var finalScatteringRange = Attribute.FinalScatteringRange; + if (Master != null) + { + startScatteringRange = Master.RoleState.CallCalcStartScatteringEvent(this, startScatteringRange); + finalScatteringRange = Master.RoleState.CallCalcFinalScatteringEvent(this, finalScatteringRange); + } + if (startScatteringRange <= finalScatteringRange) + { + CurrScatteringRange = Mathf.Min(CurrScatteringRange + Attribute.ScatteringRangeAddValue, + finalScatteringRange); + } + else + { + CurrScatteringRange = Mathf.Min(CurrScatteringRange - Attribute.ScatteringRangeAddValue, + finalScatteringRange); + } + } + //停止当前的换弹状态 private void StopReloadState() { @@ -1387,7 +1442,7 @@ { var masterWeapon = roleMaster.Holster.ActiveWeapon; //查找是否有同类型武器 - var index = roleMaster.Holster.FindWeapon(ItemId); + var index = roleMaster.Holster.FindWeapon(ItemConfig.Id); if (index != -1) //如果有这个武器 { if (CurrAmmo + ResidueAmmo != 0) //子弹不为空 @@ -1397,7 +1452,6 @@ { //可以互动拾起弹药 result.CanInteractive = true; - result.Message = Attribute.Name; result.ShowIcon = ResourcePath.resource_sprite_ui_icon_icon_bullet_png; return result; } @@ -1409,7 +1463,6 @@ { //可以互动, 拾起武器 result.CanInteractive = true; - result.Message = Attribute.Name; result.ShowIcon = ResourcePath.resource_sprite_ui_icon_icon_pickup_png; return result; } @@ -1417,7 +1470,6 @@ { //可以互动, 切换武器 result.CanInteractive = true; - result.Message = Attribute.Name; result.ShowIcon = ResourcePath.resource_sprite_ui_icon_icon_replace_png; return result; } @@ -1434,7 +1486,7 @@ { var holster = roleMaster.Holster; //查找是否有同类型武器 - var index = holster.FindWeapon(ItemId); + var index = holster.FindWeapon(ItemConfig.Id); if (index != -1) //如果有这个武器 { if (CurrAmmo + ResidueAmmo == 0) //没有子弹了 @@ -1519,15 +1571,15 @@ var rotation = master.MountPoint.GlobalRotation; GlobalRotation = rotation; - - //继承role的移动速度 - InheritVelocity(master); startPosition -= GripPoint.Position.Rotated(rotation); var startHeight = -master.MountPoint.Position.Y; var velocity = new Vector2(20, 0).Rotated(rotation); var yf = Utils.RandomRangeInt(50, 70); Throw(startPosition, startHeight, yf, velocity, 0); + + //继承role的移动速度 + InheritVelocity(master); } protected override void OnThrowStart() @@ -1582,13 +1634,14 @@ /// public void RemoveAt() { + var master = Master; Master = null; CollisionLayer = _tempLayer; _weaponAttribute = _playerWeaponAttribute; AnimatedSprite.Position = _tempAnimatedSpritePosition; //清除 Ai 拾起标记 RemoveSign(SignNames.AiFindWeaponSign); - OnRemove(); + OnRemove(master); } /// @@ -1630,8 +1683,8 @@ var rotate = Utils.RandomRangeInt((int)(-720 * speedScale), (int)(720 * speedScale)); var shell = Create(shellId); shell.Rotation = (Master != null ? Master.MountPoint.RealRotation : Rotation); - shell.InheritVelocity(Master != null ? Master : this); shell.Throw(startPos, startHeight, verticalSpeed, velocity, rotate); + shell.InheritVelocity(Master != null ? Master : this); if (Master == null) { AffiliationArea.InsertItem(shell); @@ -1649,14 +1702,24 @@ /// protected Bullet ShootBullet(float fireRotation, string bulletId) { + var speed = Utils.RandomRangeFloat(Attribute.BulletMinSpeed, Attribute.BulletMaxSpeed); + var distance = Utils.RandomRangeFloat(Attribute.BulletMinDistance, Attribute.BulletMaxDistance); + var deviationAngle = + Utils.RandomRangeFloat(Attribute.BulletMinDeviationAngle, Attribute.BulletMaxDeviationAngle); + if (Master != null) + { + speed = Master.RoleState.CallCalcBulletSpeedEvent(this, speed); + distance = Master.RoleState.CallCalcBulletDistanceEvent(this, distance); + deviationAngle = Master.RoleState.CallCalcBulletDeviationAngleEvent(this, deviationAngle); + } //创建子弹 var bullet = Create(bulletId); bullet.Init( this, - Utils.RandomRangeFloat(Attribute.BulletMinSpeed, Attribute.BulletMaxSpeed), - Utils.RandomRangeFloat(Attribute.BulletMinDistance, Attribute.BulletMaxDistance), + speed, + distance, FirePoint.GlobalPosition, - fireRotation + Mathf.DegToRad(Utils.RandomRangeFloat(Attribute.BulletMinDeviationAngle, Attribute.BulletMaxDeviationAngle)), + fireRotation + Mathf.DegToRad(deviationAngle), GetAttackLayer() ); bullet.MinHarm = Attribute.BulletMinHarm; diff --git a/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs b/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs index 8f7e3ce..41ada9c 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs @@ -59,7 +59,7 @@ { //播放挥刀特效 SpecialEffectManager.Play( - ResourcePath.resource_spriteFrames_KnifeHit1_tres, "default", + ResourcePath.resource_spriteFrames_effect_KnifeHit1_tres, "default", Master.MountPoint.GlobalPosition, GlobalRotation + Mathf.Pi * 0.5f, new Vector2((int)Master.Face, 1) * AnimatedSprite.Scale, new Vector2(17, 4), 1 ); diff --git a/DungeonShooting_Godot/src/game/buff/State.cs b/DungeonShooting_Godot/src/game/buff/State.cs deleted file mode 100644 index cca36d1..0000000 --- a/DungeonShooting_Godot/src/game/buff/State.cs +++ /dev/null @@ -1,5 +0,0 @@ - -public class State -{ - -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/event/EventEnum.cs b/DungeonShooting_Godot/src/game/event/EventEnum.cs index cf97ec2..75274c6 100644 --- a/DungeonShooting_Godot/src/game/event/EventEnum.cs +++ b/DungeonShooting_Godot/src/game/event/EventEnum.cs @@ -37,6 +37,23 @@ ///
OnPlayerMaxShieldChange, /// + /// 玩家拾起武器, 参数为 + /// + OnPlayerPickUpWeapon, + /// + /// 玩家丢弃武器, 参数为 + /// + OnPlayerThrowWeapon, + /// + /// 玩家拾起道具, 参数为 + /// + OnPlayerPickUpProp, + /// + /// 玩家丢弃道具, 参数为 + /// + OnPlayerThrowProp, + + /// /// 当玩家进入地牢时调用, 没有参数 /// OnEnterDungeon, diff --git a/DungeonShooting_Godot/src/game/manager/ActivityIdPrefix.cs b/DungeonShooting_Godot/src/game/manager/ActivityIdPrefix.cs index c2edfc4..6c3d949 100644 --- a/DungeonShooting_Godot/src/game/manager/ActivityIdPrefix.cs +++ b/DungeonShooting_Godot/src/game/manager/ActivityIdPrefix.cs @@ -41,9 +41,13 @@ ///
Effect, /// + /// 道具 + /// + Prop, + /// /// 其它类型 /// - Other, + Other = 99, } /// @@ -75,6 +79,10 @@ /// public const string Effect = "effect"; /// + /// 道具 + /// + public const string Prop = "prop"; + /// /// 其他类型 /// public const string Other = "other"; @@ -103,6 +111,8 @@ return Shell; case ActivityPrefixType.Effect: return Effect; + case ActivityPrefixType.Prop: + return Prop; case ActivityPrefixType.Other: return Other; } diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 1c9126a..e5bbc63 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -24,6 +24,16 @@ public const string prefab_map_RoomDoor_N_tscn = "res://prefab/map/RoomDoor_N.tscn"; public const string prefab_map_RoomDoor_S_tscn = "res://prefab/map/RoomDoor_S.tscn"; public const string prefab_map_RoomDoor_W_tscn = "res://prefab/map/RoomDoor_W.tscn"; + public const string prefab_prop_buff_Buff0001_tscn = "res://prefab/prop/buff/Buff0001.tscn"; + public const string prefab_prop_buff_Buff0002_tscn = "res://prefab/prop/buff/Buff0002.tscn"; + public const string prefab_prop_buff_Buff0003_tscn = "res://prefab/prop/buff/Buff0003.tscn"; + public const string prefab_prop_buff_Buff0004_tscn = "res://prefab/prop/buff/Buff0004.tscn"; + public const string prefab_prop_buff_Buff0005_tscn = "res://prefab/prop/buff/Buff0005.tscn"; + public const string prefab_prop_buff_Buff0006_tscn = "res://prefab/prop/buff/Buff0006.tscn"; + public const string prefab_prop_buff_Buff0007_tscn = "res://prefab/prop/buff/Buff0007.tscn"; + public const string prefab_prop_buff_Buff0008_tscn = "res://prefab/prop/buff/Buff0008.tscn"; + public const string prefab_prop_buff_Buff0009_tscn = "res://prefab/prop/buff/Buff0009.tscn"; + public const string prefab_prop_buff_Buff0010_tscn = "res://prefab/prop/buff/Buff0010.tscn"; public const string prefab_role_Enemy0001_tscn = "res://prefab/role/Enemy0001.tscn"; public const string prefab_role_Role0001_tscn = "res://prefab/role/Role0001.tscn"; public const string prefab_role_RoleTemplate_tscn = "res://prefab/role/RoleTemplate.tscn"; @@ -32,6 +42,7 @@ public const string prefab_shell_Shell0003_tscn = "res://prefab/shell/Shell0003.tscn"; public const string prefab_test_MoveComponent_tscn = "res://prefab/test/MoveComponent.tscn"; public const string prefab_test_TestActivity_tscn = "res://prefab/test/TestActivity.tscn"; + public const string prefab_ui_BottomTips_tscn = "res://prefab/ui/BottomTips.tscn"; public const string prefab_ui_EditorTools_tscn = "res://prefab/ui/EditorTools.tscn"; public const string prefab_ui_Loading_tscn = "res://prefab/ui/Loading.tscn"; public const string prefab_ui_Main_tscn = "res://prefab/ui/Main.tscn"; @@ -115,6 +126,16 @@ public const string resource_sprite_map_map1_16x16dungeoniiwallreconfigv04spritesheet_png = "res://resource/sprite/map/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png"; public const string resource_sprite_map_map1_door1_down_png = "res://resource/sprite/map/map1/door1_down.png"; public const string resource_sprite_map_map1_website_txt = "res://resource/sprite/map/map1/website.txt"; + public const string resource_sprite_prop_buff_Buff0001_png = "res://resource/sprite/prop/buff/Buff0001.png"; + public const string resource_sprite_prop_buff_Buff0002_png = "res://resource/sprite/prop/buff/Buff0002.png"; + public const string resource_sprite_prop_buff_Buff0003_png = "res://resource/sprite/prop/buff/Buff0003.png"; + public const string resource_sprite_prop_buff_Buff0004_png = "res://resource/sprite/prop/buff/Buff0004.png"; + public const string resource_sprite_prop_buff_Buff0005_png = "res://resource/sprite/prop/buff/Buff0005.png"; + public const string resource_sprite_prop_buff_Buff0006_png = "res://resource/sprite/prop/buff/Buff0006.png"; + public const string resource_sprite_prop_buff_Buff0007_png = "res://resource/sprite/prop/buff/Buff0007.png"; + public const string resource_sprite_prop_buff_Buff0008_png = "res://resource/sprite/prop/buff/Buff0008.png"; + public const string resource_sprite_prop_buff_Buff0009_png = "res://resource/sprite/prop/buff/Buff0009.png"; + public const string resource_sprite_prop_buff_Buff0010_png = "res://resource/sprite/prop/buff/Buff0010.png"; public const string resource_sprite_role_role10_png = "res://resource/sprite/role/role10.png"; public const string resource_sprite_role_role2_png = "res://resource/sprite/role/role2.png"; public const string resource_sprite_role_role3_png = "res://resource/sprite/role/role3.png"; @@ -168,22 +189,32 @@ public const string resource_sprite_weapon_weapon0003_Weapon0003_png = "res://resource/sprite/weapon/weapon0003/Weapon0003.png"; public const string resource_sprite_weapon_weapon0005_Weapon0005_png = "res://resource/sprite/weapon/weapon0005/Weapon0005.png"; public const string resource_sprite_weapon_weapon0006_Weapon0006_png = "res://resource/sprite/weapon/weapon0006/Weapon0006.png"; - public const string resource_spriteFrames_Bullet0001_tres = "res://resource/spriteFrames/Bullet0001.tres"; - public const string resource_spriteFrames_Bullet0002_tres = "res://resource/spriteFrames/Bullet0002.tres"; - public const string resource_spriteFrames_KnifeHit1_tres = "res://resource/spriteFrames/KnifeHit1.tres"; - public const string resource_spriteFrames_Role0001_tres = "res://resource/spriteFrames/Role0001.tres"; - public const string resource_spriteFrames_Role1001_tres = "res://resource/spriteFrames/Role1001.tres"; - public const string resource_spriteFrames_RoomDoor_EW_tres = "res://resource/spriteFrames/RoomDoor_EW.tres"; - public const string resource_spriteFrames_RoomDoor_NS_tres = "res://resource/spriteFrames/RoomDoor_NS.tres"; - public const string resource_spriteFrames_Shell0001_tres = "res://resource/spriteFrames/Shell0001.tres"; - public const string resource_spriteFrames_Shell0002_tres = "res://resource/spriteFrames/Shell0002.tres"; - public const string resource_spriteFrames_Shell0003_tres = "res://resource/spriteFrames/Shell0003.tres"; - public const string resource_spriteFrames_Weapon0001_tres = "res://resource/spriteFrames/Weapon0001.tres"; - public const string resource_spriteFrames_Weapon0002_tres = "res://resource/spriteFrames/Weapon0002.tres"; - public const string resource_spriteFrames_Weapon0003_tres = "res://resource/spriteFrames/Weapon0003.tres"; - public const string resource_spriteFrames_Weapon0004_tres = "res://resource/spriteFrames/Weapon0004.tres"; - public const string resource_spriteFrames_Weapon0005_tres = "res://resource/spriteFrames/Weapon0005.tres"; - public const string resource_spriteFrames_Weapon0006_tres = "res://resource/spriteFrames/Weapon0006.tres"; + public const string resource_spriteFrames_bullet_Bullet0001_tres = "res://resource/spriteFrames/bullet/Bullet0001.tres"; + public const string resource_spriteFrames_bullet_Bullet0002_tres = "res://resource/spriteFrames/bullet/Bullet0002.tres"; + public const string resource_spriteFrames_effect_KnifeHit1_tres = "res://resource/spriteFrames/effect/KnifeHit1.tres"; + public const string resource_spriteFrames_other_RoomDoor_EW_tres = "res://resource/spriteFrames/other/RoomDoor_EW.tres"; + public const string resource_spriteFrames_other_RoomDoor_NS_tres = "res://resource/spriteFrames/other/RoomDoor_NS.tres"; + public const string resource_spriteFrames_prop_buff_Buff0001_tres = "res://resource/spriteFrames/prop/buff/Buff0001.tres"; + public const string resource_spriteFrames_prop_buff_Buff0002_tres = "res://resource/spriteFrames/prop/buff/Buff0002.tres"; + public const string resource_spriteFrames_prop_buff_Buff0003_tres = "res://resource/spriteFrames/prop/buff/Buff0003.tres"; + public const string resource_spriteFrames_prop_buff_Buff0004_tres = "res://resource/spriteFrames/prop/buff/Buff0004.tres"; + public const string resource_spriteFrames_prop_buff_Buff0005_tres = "res://resource/spriteFrames/prop/buff/Buff0005.tres"; + public const string resource_spriteFrames_prop_buff_Buff0006_tres = "res://resource/spriteFrames/prop/buff/Buff0006.tres"; + public const string resource_spriteFrames_prop_buff_Buff0007_tres = "res://resource/spriteFrames/prop/buff/Buff0007.tres"; + public const string resource_spriteFrames_prop_buff_Buff0008_tres = "res://resource/spriteFrames/prop/buff/Buff0008.tres"; + public const string resource_spriteFrames_prop_buff_Buff0009_tres = "res://resource/spriteFrames/prop/buff/Buff0009.tres"; + public const string resource_spriteFrames_prop_buff_Buff0010_tres = "res://resource/spriteFrames/prop/buff/Buff0010.tres"; + public const string resource_spriteFrames_role_Role0001_tres = "res://resource/spriteFrames/role/Role0001.tres"; + public const string resource_spriteFrames_role_Role1001_tres = "res://resource/spriteFrames/role/Role1001.tres"; + public const string resource_spriteFrames_shell_Shell0001_tres = "res://resource/spriteFrames/shell/Shell0001.tres"; + public const string resource_spriteFrames_shell_Shell0002_tres = "res://resource/spriteFrames/shell/Shell0002.tres"; + public const string resource_spriteFrames_shell_Shell0003_tres = "res://resource/spriteFrames/shell/Shell0003.tres"; + public const string resource_spriteFrames_weapon_Weapon0001_tres = "res://resource/spriteFrames/weapon/Weapon0001.tres"; + public const string resource_spriteFrames_weapon_Weapon0002_tres = "res://resource/spriteFrames/weapon/Weapon0002.tres"; + public const string resource_spriteFrames_weapon_Weapon0003_tres = "res://resource/spriteFrames/weapon/Weapon0003.tres"; + public const string resource_spriteFrames_weapon_Weapon0004_tres = "res://resource/spriteFrames/weapon/Weapon0004.tres"; + public const string resource_spriteFrames_weapon_Weapon0005_tres = "res://resource/spriteFrames/weapon/Weapon0005.tres"; + public const string resource_spriteFrames_weapon_Weapon0006_tres = "res://resource/spriteFrames/weapon/Weapon0006.tres"; public const string resource_theme_mainTheme_tres = "res://resource/theme/mainTheme.tres"; public const string resource_theme_theme1_tres = "res://resource/theme/theme1.tres"; public const string scene_EditorDemo_tscn = "res://scene/EditorDemo.tscn"; diff --git a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs index 431fc32..2576d6a 100644 --- a/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs +++ b/DungeonShooting_Godot/src/game/manager/UiManager_Methods.cs @@ -6,6 +6,7 @@ public static class UiName { + public const string BottomTips = "BottomTips"; public const string EditorTools = "EditorTools"; public const string Loading = "Loading"; public const string Main = "Main"; @@ -14,6 +15,46 @@ } /// + /// 打开 BottomTips, 并返回UI实例 + /// + public static UI.BottomTips.BottomTipsPanel Open_BottomTips() + { + return OpenUi(UiName.BottomTips); + } + + /// + /// 隐藏 BottomTips 的所有实例 + /// + public static void Hide_BottomTips() + { + var uiInstance = Get_BottomTips_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.HideUi(); + } + } + + /// + /// 销毁 BottomTips 的所有实例 + /// + public static void Dispose_BottomTips() + { + var uiInstance = Get_BottomTips_Instance(); + foreach (var uiPanel in uiInstance) + { + uiPanel.DisposeUi(); + } + } + + /// + /// 获取所有 BottomTips 的实例, 如果没有实例, 则返回一个空数组 + /// + public static UI.BottomTips.BottomTipsPanel[] Get_BottomTips_Instance() + { + return GetUiInstance(nameof(UI.BottomTips.BottomTips)); + } + + /// /// 打开 EditorTools, 并返回UI实例 /// public static UI.EditorTools.EditorToolsPanel Open_EditorTools() diff --git a/DungeonShooting_Godot/src/game/role/CampEnum.cs b/DungeonShooting_Godot/src/game/role/CampEnum.cs deleted file mode 100644 index 6954070..0000000 --- a/DungeonShooting_Godot/src/game/role/CampEnum.cs +++ /dev/null @@ -1,10 +0,0 @@ - -public enum CampEnum -{ - // 阵营1, 玩家 - Camp1, - // 阵营2, 敌人 - Camp2, - // 阵营3, 中立单位 - Camp3 -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/Characters/CPlusPlus.cs b/DungeonShooting_Godot/src/game/role/Characters/CPlusPlus.cs deleted file mode 100644 index 00e5353..0000000 --- a/DungeonShooting_Godot/src/game/role/Characters/CPlusPlus.cs +++ /dev/null @@ -1,36 +0,0 @@ -#region 设计思路 -// c/c++ -// 被动:易于精通 随着刷的房间的增多 提升对于 道具的加成 增加攻击力 或者 增强对应效果 -// -// 速度:中偏上 -// 血量:中 -// 护盾:下 -// -// 专属武器:指针 近战武器 -// 武器描述:短按 向目标方向 刺出 对路径中的 敌人或可破坏建筑 造成伤害 -// 长按 1.8 秒 向目标方向 冲刺 并消除 途中的弹幕 蓄力过程会被打断 打断后强制取消攻击 -// -// -// 每个角色都应该有对应的被动 属性 专属武器 -#endregion - -public partial class CPlusPlus : Player -{ - - - public override void OnInit() - { - base.OnInit(); - #region 初始属性 - - MaxHp = 55; - MoveSpeed = 130f; - #endregion - } - - // public CPlusPlus() : base(ResourcePath.prefab_role_CPlusPlus_tscn) - // { - - // } - -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/FaceDirection.cs b/DungeonShooting_Godot/src/game/role/FaceDirection.cs deleted file mode 100644 index 5be28ef..0000000 --- a/DungeonShooting_Godot/src/game/role/FaceDirection.cs +++ /dev/null @@ -1,8 +0,0 @@ -/// -/// 脸的朝向 -/// -public enum FaceDirection -{ - Left = -1, - Right = 1, -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/MountRotation.cs b/DungeonShooting_Godot/src/game/role/MountRotation.cs deleted file mode 100644 index e265b10..0000000 --- a/DungeonShooting_Godot/src/game/role/MountRotation.cs +++ /dev/null @@ -1,67 +0,0 @@ - -using Godot; - -/// -/// 用于限定 Marker2D 节点的旋转角度 -/// -[Tool] -public partial class MountRotation : Marker2D -{ - /// - /// 吸附角度 - /// - private int _adsorption = 6; - - /// - /// 所在的角色 - /// - public Role Master { get; set; } - - /// - /// 当前节点真实的旋转角度, 角度制 - /// - public float RealRotationDegrees { get; private set; } - - /// - /// 当前节点真实的旋转角度, 弧度制 - /// - public float RealRotation => Mathf.DegToRad(RealRotationDegrees); - - /// - /// 设置看向的目标点 - /// - public void SetLookAt(Vector2 target) - { - var myPos = GlobalPosition; - var angle = Mathf.RadToDeg((target - myPos).Angle()); - - if (Master.Face == FaceDirection.Left) - { - if (angle < 0 && angle > -80) - { - angle = -80; - } - else if (angle >= 0 && angle < 80) - { - angle = 80; - } - } - else - { - angle = Mathf.Clamp(angle, -100, 100); - } - - RealRotationDegrees = angle; - - // if (Master.GlobalPosition.X >= target.X) - // { - // angle = -angle; - // } - GlobalRotationDegrees = AdsorptionAngle(angle); - } - - private float AdsorptionAngle(float angle) - { - return Mathf.Round(angle / _adsorption) * _adsorption; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/Player.cs b/DungeonShooting_Godot/src/game/role/Player.cs deleted file mode 100644 index cb58fc9..0000000 --- a/DungeonShooting_Godot/src/game/role/Player.cs +++ /dev/null @@ -1,249 +0,0 @@ -using Godot; - - -/// -/// 玩家角色基类, 所有角色都必须继承该类 -/// -[Tool, GlobalClass] -public partial class Player : Role -{ - /// - /// 获取当前操作的角色 - /// - public static Player Current { get; private set; } - - /// - /// 移动加速度 - /// - public float Acceleration { get; set; } = 1500f; - - /// - /// 移动摩擦力 - /// - public float Friction { get; set; } = 800f; - - /// - /// 设置当前操作的玩家对象 - /// - public static void SetCurrentPlayer(Player player) - { - Current = player; - //设置相机和鼠标跟随玩家 - GameCamera.Main.SetFollowTarget(player); - GameApplication.Instance.Cursor.SetMountRole(player); - } - - public override void OnInit() - { - base.OnInit(); - - AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Props | PhysicsLayer.Enemy; - Camp = CampEnum.Camp1; - - //让相机跟随玩家 - // var remoteTransform = new RemoteTransform2D(); - // AddChild(remoteTransform); - // MainCamera.Main.GlobalPosition = GlobalPosition; - // MainCamera.Main.ResetSmoothing(); - // remoteTransform.RemotePath = remoteTransform.GetPathTo(MainCamera.Main); - - MaxHp = 6; - Hp = 6; - MaxShield = 2; - Shield = 2; - - // debug用 - // Acceleration = 3000; - // Friction = 3000; - // MoveSpeed = 500; - // CollisionLayer = 0; - // CollisionMask = 0; - // GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); - } - - protected override void Process(float delta) - { - if (IsDie) - { - return; - } - base.Process(delta); - //脸的朝向 - if (LookTarget == null) - { - var gPos = GlobalPosition; - Vector2 mousePos = InputManager.CursorPosition; - if (mousePos.X > gPos.X && Face == FaceDirection.Left) - { - Face = FaceDirection.Right; - } - else if (mousePos.X < gPos.X && Face == FaceDirection.Right) - { - Face = FaceDirection.Left; - } - //枪口跟随鼠标 - MountPoint.SetLookAt(mousePos); - } - - if (InputManager.Exchange) //切换武器 - { - ExchangeNext(); - } - else if (InputManager.Throw) //扔掉武器 - { - ThrowWeapon(); - - // //测试用的, 所有敌人也扔掉武器 - // if (Affiliation != null) - // { - // var enemies = Affiliation.FindIncludeItems(o => - // { - // return o.CollisionWithMask(PhysicsLayer.Enemy); - // }); - // foreach (var activityObject in enemies) - // { - // if (activityObject is Enemy enemy) - // { - // enemy.ThrowWeapon(); - // } - // } - // } - } - else if (InputManager.Interactive) //互动物体 - { - TriggerInteractive(); - } - else if (InputManager.Reload) //换弹 - { - Reload(); - } - if (InputManager.Fire) //开火 - { - Attack(); - } - - if (Input.IsKeyPressed(Key.P)) - { - Hurt(1000, 0); - } - } - - protected override void PhysicsProcess(float delta) - { - if (IsDie) - { - return; - } - - base.PhysicsProcess(delta); - HandleMoveInput(delta); - //播放动画 - PlayAnim(); - } - - protected override int OnHandlerHurt(int damage) - { - //修改受到的伤害, 每次只受到1点伤害 - return 1; - } - - protected override void OnHit(int damage, bool realHarm) - { - //进入无敌状态 - if (realHarm) //真实伤害 - { - PlayInvincibleFlashing(1.5f); - } - else //护盾抵消掉的 - { - PlayInvincibleFlashing(0.5f); - } - } - - protected override void OnChangeHp(int hp) - { - //GameApplication.Instance.Ui.SetHp(hp); - EventManager.EmitEvent(EventEnum.OnPlayerHpChange, hp); - } - - protected override void OnChangeMaxHp(int maxHp) - { - //GameApplication.Instance.Ui.SetMaxHp(maxHp); - EventManager.EmitEvent(EventEnum.OnPlayerMaxHpChange, maxHp); - } - - protected override void ChangeInteractiveItem(CheckInteractiveResult result) - { - //派发互动对象改变事件 - EventManager.EmitEvent(EventEnum.OnPlayerChangeInteractiveItem, result); - } - - protected override void OnChangeShield(int shield) - { - //GameApplication.Instance.Ui.SetShield(shield); - EventManager.EmitEvent(EventEnum.OnPlayerShieldChange, shield); - } - - protected override void OnChangeMaxShield(int maxShield) - { - //GameApplication.Instance.Ui.SetMaxShield(maxShield); - EventManager.EmitEvent(EventEnum.OnPlayerMaxShieldChange, maxShield); - } - - protected override void OnDie() - { - GameCamera.Main.SetFollowTarget(null); - BasisVelocity = Vector2.Zero; - MoveController.ClearForce(); - UiManager.Open_Settlement(); - //GameApplication.Instance.World.ProcessMode = ProcessModeEnum.WhenPaused; - } - - //处理角色移动的输入 - private void HandleMoveInput(float delta) - { - //角色移动 - Vector2 dir = InputManager.MoveAxis; - // 移动. 如果移动的数值接近0(是用 摇杆可能出现 方向 可能会出现浮点),就friction的值 插值 到 0 - // 如果 有输入 就以当前速度,用acceleration 插值到 对应方向 * 最大速度 - if (Mathf.IsZeroApprox(dir.X)) - { - BasisVelocity = new Vector2(Mathf.MoveToward(BasisVelocity.X, 0, Friction * delta), BasisVelocity.Y); - } - else - { - BasisVelocity = new Vector2(Mathf.MoveToward(BasisVelocity.X, dir.X * MoveSpeed, Acceleration * delta), - BasisVelocity.Y); - } - - if (Mathf.IsZeroApprox(dir.Y)) - { - BasisVelocity = new Vector2(BasisVelocity.X, Mathf.MoveToward(BasisVelocity.Y, 0, Friction * delta)); - } - else - { - BasisVelocity = new Vector2(BasisVelocity.X, - Mathf.MoveToward(BasisVelocity.Y, dir.Y * MoveSpeed, Acceleration * delta)); - } - } - - // 播放动画 - private void PlayAnim() - { - if (BasisVelocity != Vector2.Zero) - { - if ((Face == FaceDirection.Right && BasisVelocity.X >= 0) || Face == FaceDirection.Left && BasisVelocity.X <= 0) //向前走 - { - AnimatedSprite.Play(AnimatorNames.Run); - } - else if ((Face == FaceDirection.Right && BasisVelocity.X < 0) || Face == FaceDirection.Left && BasisVelocity.X > 0) //向后走 - { - AnimatedSprite.Play(AnimatorNames.ReverseRun); - } - } - else - { - AnimatedSprite.Play(AnimatorNames.Idle); - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/Role.cs b/DungeonShooting_Godot/src/game/role/Role.cs deleted file mode 100644 index 10ebd64..0000000 --- a/DungeonShooting_Godot/src/game/role/Role.cs +++ /dev/null @@ -1,737 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using Godot; - -/// -/// 角色基类 -/// -public abstract partial class Role : ActivityObject -{ - /// - /// 是否是 Ai - /// - public bool IsAi { get; protected set; } = false; - - /// - /// 默认攻击对象层级 - /// - public const uint DefaultAttackLayer = PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Wall | PhysicsLayer.Props; - - /// - /// 伤害区域 - /// - [Export, ExportFillNode] - public Area2D HurtArea { get; set; } - - /// - /// 移动速度 - /// - public float MoveSpeed = 120f; - - /// - /// 所属阵营 - /// - public CampEnum Camp; - - /// - /// 攻击目标的碰撞器所属层级, 数据源自于: PhysicsLayer - /// - public uint AttackLayer { get; set; } = PhysicsLayer.Wall; - - // /// - // /// 携带的道具包裹 - // /// - // public List PropsPack { get; } = new List(); - - /// - /// 角色携带的武器袋 - /// - public Holster Holster { get; private set; } - - /// - /// 武器挂载点 - /// - [Export, ExportFillNode] - public MountRotation MountPoint { get; set; } - /// - /// 背后武器的挂载点 - /// - [Export, ExportFillNode] - public Marker2D BackMountPoint { get; set; } - - /// - /// 互动碰撞区域 - /// - [Export, ExportFillNode] - public Area2D InteractiveArea { get; set; } - - /// - /// 脸的朝向 - /// - public FaceDirection Face { get => _face; set => SetFace(value); } - private FaceDirection _face; - - /// - /// 是否死亡 - /// - public bool IsDie { get; private set; } - - /// - /// 血量 - /// - public int Hp - { - get => _hp; - protected set - { - int temp = _hp; - _hp = value; - if (temp != _hp) OnChangeHp(_hp); - } - } - private int _hp = 20; - - /// - /// 最大血量 - /// - public int MaxHp - { - get => _maxHp; - protected set - { - int temp = _maxHp; - _maxHp = value; - //护盾值改变 - if (temp != _maxHp) OnChangeMaxHp(_maxHp); - } - } - private int _maxHp = 20; - - /// - /// 当前护盾值 - /// - public int Shield - { - get => _shield; - protected set - { - int temp = _shield; - _shield = value; - //护盾被破坏 - if (temp > 0 && _shield <= 0) OnShieldDestroy(); - //护盾值改变 - if (temp != _shield) OnChangeShield(_shield); - } - } - private int _shield = 0; - - /// - /// 最大护盾值 - /// - public int MaxShield - { - get => _maxShield; - protected set - { - int temp = _maxShield; - _maxShield = value; - if (temp != _maxShield) OnChangeMaxShield(_maxShield); - } - } - private int _maxShield = 0; - - /// - /// 单格护盾恢复时间 - /// - private float ShieldRecoveryTime { get; set; } = 8; - - /// - /// 无敌状态 - /// - public bool Invincible - { - get => _invincible; - set - { - if (_invincible != value) - { - if (value) //无敌状态 - { - HurtArea.CollisionLayer = _currentLayer; - _flashingInvincibleTimer = -1; - _flashingInvincibleFlag = false; - } - else //正常状态 - { - HurtArea.CollisionLayer = _currentLayer; - SetBlendAlpha(1); - } - } - - _invincible = value; - } - } - - private bool _invincible = false; - - /// - /// 当前角色所看向的对象, 也就是枪口指向的对象 - /// - public ActivityObject LookTarget { get; set; } - - //初始缩放 - private Vector2 _startScale; - //所有角色碰撞的道具 - private readonly List _interactiveItemList = new List(); - - private CheckInteractiveResult _tempResultData; - private uint _currentLayer; - //闪烁计时器 - private float _flashingInvincibleTimer = -1; - //闪烁状态 - private bool _flashingInvincibleFlag = false; - //闪烁动画协程id - private long _invincibleFlashingId = -1; - //护盾恢复计时器 - private float _shieldRecoveryTimer = 0; - - /// - /// 可以互动的道具 - /// - public ActivityObject InteractiveItem { get; private set; } - - /// - /// 当血量改变时调用 - /// - protected virtual void OnChangeHp(int hp) - { - } - - /// - /// 当最大血量改变时调用 - /// - protected virtual void OnChangeMaxHp(int maxHp) - { - } - - /// - /// 护盾值改变时调用 - /// - protected virtual void OnChangeShield(int shield) - { - } - - /// - /// 最大护盾值改变时调用 - /// - protected virtual void OnChangeMaxShield(int maxShield) - { - } - - /// - /// 当护盾被破坏时调用 - /// - protected virtual void OnShieldDestroy() - { - } - - /// - /// 当受伤时调用 - /// - /// 受到的伤害 - /// 是否受到真实伤害, 如果为false, 则表示该伤害被互动格挡掉了 - protected virtual void OnHit(int damage, bool realHarm) - { - } - - /// - /// 受到伤害时调用, 用于改变受到的伤害值 - /// - /// 受到的伤害 - protected virtual int OnHandlerHurt(int damage) - { - return damage; - } - - /// - /// 当可互动的物体改变时调用, result 参数为 null 表示变为不可互动 - /// - /// 检测是否可互动时的返回值 - protected virtual void ChangeInteractiveItem(CheckInteractiveResult result) - { - } - - /// - /// 死亡时调用 - /// - protected virtual void OnDie() - { - } - - public override void OnInit() - { - Holster = new Holster(this); - _startScale = Scale; - MountPoint.Master = this; - - HurtArea.CollisionLayer = CollisionLayer; - HurtArea.CollisionMask = 0; - _currentLayer = HurtArea.CollisionLayer; - - Face = FaceDirection.Right; - - //连接互动物体信号 - InteractiveArea.BodyEntered += _OnPropsEnter; - InteractiveArea.BodyExited += _OnPropsExit; - } - - protected override void Process(float delta) - { - //看向目标 - if (LookTarget != null) - { - Vector2 pos = LookTarget.GlobalPosition; - //脸的朝向 - var gPos = GlobalPosition; - if (pos.X > gPos.X && Face == FaceDirection.Left) - { - Face = FaceDirection.Right; - } - else if (pos.X < gPos.X && Face == FaceDirection.Right) - { - Face = FaceDirection.Left; - } - //枪口跟随目标 - MountPoint.SetLookAt(pos); - } - - //检查可互动的道具 - bool findFlag = false; - for (int i = 0; i < _interactiveItemList.Count; i++) - { - var item = _interactiveItemList[i]; - if (item == null || item.IsDestroyed) - { - _interactiveItemList.RemoveAt(i--); - } - else - { - //找到可互动的道具了 - if (!findFlag) - { - var result = item.CheckInteractive(this); - if (result.CanInteractive) //可以互动 - { - findFlag = true; - if (InteractiveItem != item) //更改互动物体 - { - InteractiveItem = item; - ChangeInteractiveItem(result); - } - else if (result.ShowIcon != _tempResultData.ShowIcon) //切换状态 - { - ChangeInteractiveItem(result); - } - } - _tempResultData = result; - } - } - } - //没有可互动的道具 - if (!findFlag && InteractiveItem != null) - { - InteractiveItem = null; - ChangeInteractiveItem(null); - } - - //无敌状态, 播放闪烁动画 - if (Invincible) - { - _flashingInvincibleTimer -= delta; - if (_flashingInvincibleTimer <= 0) - { - _flashingInvincibleTimer = 0.15f; - if (_flashingInvincibleFlag) - { - _flashingInvincibleFlag = false; - SetBlendAlpha(0.7f); - } - else - { - _flashingInvincibleFlag = true; - SetBlendAlpha(0); - } - } - - _shieldRecoveryTimer = 0; - } - else //恢复护盾 - { - if (Shield < MaxShield) - { - _shieldRecoveryTimer += delta; - if (_shieldRecoveryTimer >= ShieldRecoveryTime) //时间到, 恢复 - { - Shield++; - _shieldRecoveryTimer = 0; - } - } - else - { - _shieldRecoveryTimer = 0; - } - } - } - - /// - /// 当武器放到后背时调用, 用于设置武器位置和角度 - /// - /// 武器实例 - /// 放入武器袋的位置 - public virtual void OnPutBackMount(Weapon weapon, int index) - { - if (index < 8) - { - if (index % 2 == 0) - { - weapon.Position = new Vector2(-4, 3); - weapon.RotationDegrees = 90 - (index / 2f) * 20; - weapon.Scale = new Vector2(-1, 1); - } - else - { - weapon.Position = new Vector2(4, 3); - weapon.RotationDegrees = 270 + (index - 1) / 2f * 20; - weapon.Scale = new Vector2(1, 1); - } - } - else - { - weapon.Visible = false; - } - } - - protected override void OnAffiliationChange() - { - //身上的武器的所属区域也得跟着变 - Holster.ForEach((weapon, i) => - { - if (AffiliationArea != null) - { - AffiliationArea.InsertItem(weapon); - } - else if (weapon.AffiliationArea != null) - { - weapon.AffiliationArea.RemoveItem(weapon); - } - }); - } - - /// - /// 获取当前角色的中心点坐标 - /// - public Vector2 GetCenterPosition() - { - return MountPoint.GlobalPosition; - } - - /// - /// 使角色看向指定的坐标, - /// 注意, 调用该函数会清空 LookTarget, 因为拥有 LookTarget 时也会每帧更新玩家视野位置 - /// - /// - public void LookTargetPosition(Vector2 pos) - { - LookTarget = null; - //脸的朝向 - var gPos = GlobalPosition; - if (pos.X > gPos.X && Face == FaceDirection.Left) - { - Face = FaceDirection.Right; - } - else if (pos.X < gPos.X && Face == FaceDirection.Right) - { - Face = FaceDirection.Left; - } - //枪口跟随目标 - MountPoint.SetLookAt(pos); - } - - /// - /// 判断指定坐标是否在角色视野方向 - /// - public bool IsPositionInForward(Vector2 pos) - { - var gps = GlobalPosition; - return (Face == FaceDirection.Left && pos.X <= gps.X) || - (Face == FaceDirection.Right && pos.X >= gps.X); - } - - /// - /// 返回所有武器是否弹药都打光了 - /// - public bool IsAllWeaponTotalAmmoEmpty() - { - foreach (var weapon in Holster.Weapons) - { - if (weapon != null && !weapon.IsTotalAmmoEmpty()) - { - return false; - } - } - - return true; - } - - /// - /// 拾起一个武器, 返回是否成功拾取, 如果不想立刻切换到该武器, exchange 请传 false - /// - /// 武器对象 - /// 是否立即切换到该武器, 默认 true - public virtual bool PickUpWeapon(Weapon weapon, bool exchange = true) - { - if (Holster.PickupWeapon(weapon, exchange) != -1) - { - //从可互动队列中移除 - _interactiveItemList.Remove(weapon); - return true; - } - - return false; - } - - /// - /// 切换到下一个武器 - /// - public virtual void ExchangeNext() - { - Holster.ExchangeNext(); - } - - /// - /// 切换到上一个武器 - /// - public virtual void ExchangePrev() - { - Holster.ExchangePrev(); - } - - /// - /// 扔掉当前使用的武器, 切换到上一个武器 - /// - public virtual void ThrowWeapon() - { - ThrowWeapon(Holster.ActiveIndex); - } - - /// - /// 扔掉指定位置的武器 - /// - /// 武器在武器袋中的位置 - public virtual void ThrowWeapon(int index) - { - var weapon = Holster.GetWeapon(index); - if (weapon == null) - { - return; - } - - var temp = weapon.AnimatedSprite.Position; - if (Face == FaceDirection.Left) - { - temp.Y = -temp.Y; - } - //var pos = GlobalPosition + temp.Rotated(weapon.GlobalRotation); - Holster.RemoveWeapon(index); - //播放抛出效果 - weapon.ThrowWeapon(this, GlobalPosition); - } - - /// - /// 返回是否存在可互动的物体 - /// - public bool HasInteractive() - { - return InteractiveItem != null; - } - - /// - /// 触发与碰撞的物体互动, 并返回与其互动的物体 - /// - public ActivityObject TriggerInteractive() - { - if (HasInteractive()) - { - var item = InteractiveItem; - item.Interactive(this); - return item; - } - - return null; - } - - /// - /// 触发换弹 - /// - public virtual void Reload() - { - if (Holster.ActiveWeapon != null) - { - Holster.ActiveWeapon.Reload(); - } - } - - /// - /// 触发攻击 - /// - public virtual void Attack() - { - if (Holster.ActiveWeapon != null) - { - Holster.ActiveWeapon.Trigger(); - } - } - - /// - /// 受到伤害, 如果是在碰撞信号处理函数中调用该函数, 请使用 CallDeferred 来延时调用, 否则很有可能导致报错 - /// - /// 伤害的量 - /// 角度 - public virtual void Hurt(int damage, float angle) - { - //受伤闪烁, 无敌状态 - if (Invincible) - { - return; - } - - //计算真正受到的伤害 - damage = OnHandlerHurt(damage); - if (damage <= 0) - { - return; - } - - var flag = Shield > 0; - if (flag) - { - Shield -= damage; - } - else - { - Hp -= damage; - //播放血液效果 - // var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_Blood_tscn); - // var blood = packedScene.Instance(); - // blood.GlobalPosition = GlobalPosition; - // blood.Rotation = angle; - // GameApplication.Instance.Node3D.GetRoot().AddChild(blood); - } - OnHit(damage, !flag); - - //受伤特效 - PlayHitAnimation(); - - //死亡判定 - if (Hp <= 0) - { - //死亡 - if (!IsDie) - { - IsDie = true; - OnDie(); - } - } - } - - /// - /// 播放无敌状态闪烁动画 - /// - /// 持续时间 - public void PlayInvincibleFlashing(float time) - { - Invincible = true; - if (_invincibleFlashingId >= 0) //上一个还没结束 - { - StopCoroutine(_invincibleFlashingId); - } - - _invincibleFlashingId = StartCoroutine(RunInvincibleFlashing(time)); - } - - /// - /// 停止无敌状态闪烁动画 - /// - public void StopInvincibleFlashing() - { - Invincible = false; - if (_invincibleFlashingId >= 0) - { - StopCoroutine(_invincibleFlashingId); - _invincibleFlashingId = -1; - } - } - - private IEnumerator RunInvincibleFlashing(float time) - { - yield return new WaitForSeconds(time); - _invincibleFlashingId = -1; - Invincible = false; - } - - /// - /// 设置脸的朝向 - /// - private void SetFace(FaceDirection face) - { - if (_face != face) - { - _face = face; - if (face == FaceDirection.Right) - { - RotationDegrees = 0; - Scale = _startScale; - } - else - { - RotationDegrees = 180; - Scale = new Vector2(_startScale.X, -_startScale.Y); - } - } - } - - /// - /// 连接信号: InteractiveArea.BodyEntered - /// 与物体碰撞 - /// - private void _OnPropsEnter(Node2D other) - { - if (other is ActivityObject propObject && !propObject.CollisionWithMask(PhysicsLayer.OnHand)) - { - if (!_interactiveItemList.Contains(propObject)) - { - _interactiveItemList.Add(propObject); - } - } - } - - /// - /// 连接信号: InteractiveArea.BodyExited - /// 物体离开碰撞区域 - /// - private void _OnPropsExit(Node2D other) - { - if (other is ActivityObject propObject) - { - if (_interactiveItemList.Contains(propObject)) - { - _interactiveItemList.Remove(propObject); - } - if (InteractiveItem == propObject) - { - InteractiveItem = null; - ChangeInteractiveItem(null); - } - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/role/enemy/Enemy.cs deleted file mode 100644 index c28da7e..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/Enemy.cs +++ /dev/null @@ -1,459 +0,0 @@ -#region 基础敌人设计思路 -/* -敌人有三种状态: -状态1: 未发现玩家, 视野不可穿墙, 该状态下敌人移动比较规律, 移动速度较慢, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3, 该房间的敌人不能再回到状态1 -状态2: 发现有玩家, 但不知道在哪, 视野不可穿墙, 该情况下敌人移动速度明显加快, 移动不规律, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3 -状态3: 明确知道玩家的位置, 视野允许穿墙, 移动速度与状态2一致, 进入该状态时, 敌人之间会相互告知玩家所在位置, 并朝着玩家位置开火, - 如果有墙格挡, 则有一定概率继续开火, 一旦玩家立刻敌人视野超哥一段时间, 敌人自动切换为状态2 - -敌人状态1只存在于少数房间内, 比如特殊房间, 大部分情况下敌人应该是状态2, 或者玩家进入房间时就被敌人发现 -*/ -#endregion - - -using Godot; - -/// -/// 基础敌人 -/// -[Tool, GlobalClass] -public partial class Enemy : Role -{ - /// - /// 敌人身上的状态机控制器 - /// - public StateController StateController { get; private set; } - - /// - /// 视野半径, 单位像素, 发现玩家后改视野范围可以穿墙 - /// - public float ViewRange { get; set; } = 250; - - /// - /// 发现玩家后的视野半径 - /// - public float TailAfterViewRange { get; set; } = 400; - - /// - /// 背后的视野半径, 单位像素 - /// - public float BackViewRange { get; set; } = 50; - - /// - /// 视野检测射线, 朝玩家打射线, 检测是否碰到墙 - /// - public RayCast2D ViewRay { get; private set; } - - /// - /// 导航代理 - /// - public NavigationAgent2D NavigationAgent2D { get; private set; } - - /// - /// 导航代理中点 - /// - public Marker2D NavigationPoint { get; private set; } - - //开火间隙时间 - private float _enemyAttackTimer = 0; - //目标在视野内的时间 - private float _targetInViewTime = 0; - - public override void OnInit() - { - base.OnInit(); - IsAi = true; - StateController = AddComponent>(); - - AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Props | PhysicsLayer.Player; - Camp = CampEnum.Camp2; - - MoveSpeed = 20; - - MaxHp = 20; - Hp = 20; - - //视野射线 - ViewRay = GetNode("ViewRay"); - NavigationPoint = GetNode("NavigationPoint"); - NavigationAgent2D = NavigationPoint.GetNode("NavigationAgent2D"); - - //PathSign = new PathSign(this, PathSignLength, GameApplication.Instance.Node3D.Player); - - //注册Ai状态机 - StateController.Register(new AiNormalState()); - StateController.Register(new AiProbeState()); - StateController.Register(new AiTailAfterState()); - StateController.Register(new AiFollowUpState()); - StateController.Register(new AiLeaveForState()); - StateController.Register(new AiSurroundState()); - StateController.Register(new AiFindAmmoState()); - - //默认状态 - StateController.ChangeStateInstant(AiStateEnum.AiNormal); - } - - public override void EnterTree() - { - base.EnterTree(); - if (!World.Enemy_InstanceList.Contains(this)) - { - World.Enemy_InstanceList.Add(this); - } - } - - public override void ExitTree() - { - base.ExitTree(); - World.Enemy_InstanceList.Remove(this); - } - - protected override void OnDie() - { - //扔掉所有武器 - var weapons = Holster.GetAndClearWeapon(); - for (var i = 0; i < weapons.Length; i++) - { - weapons[i].ThrowWeapon(this); - } - - var effPos = Position + new Vector2(0, -Altitude); - //血液特效 - var blood = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_effect_activityObject_EnemyBloodEffect_tscn); - blood.Position = effPos - new Vector2(0, 12); - blood.AddToActivityRoot(RoomLayerEnum.NormalLayer); - - //创建敌人碎片 - var count = Utils.RandomRangeInt(3, 6); - for (var i = 0; i < count; i++) - { - var debris = Create(Ids.Id_effect0001); - debris.PutDown(effPos, RoomLayerEnum.NormalLayer); - debris.InheritVelocity(this); - } - - //派发敌人死亡信号 - EventManager.EmitEvent(EventEnum.OnEnemyDie, this); - Destroy(); - } - - protected override void Process(float delta) - { - base.Process(delta); - _enemyAttackTimer -= delta; - - //目标在视野内的时间 - var currState = StateController.CurrState; - if (currState == AiStateEnum.AiSurround || currState == AiStateEnum.AiFollowUp) - { - _targetInViewTime += delta; - } - else - { - _targetInViewTime = 0; - } - - EnemyPickUpWeapon(); - } - - protected override void OnHit(int damage, bool realHarm) - { - //受到伤害 - var state = StateController.CurrState; - if (state == AiStateEnum.AiNormal || state == AiStateEnum.AiProbe || state == AiStateEnum.AiLeaveFor) - { - StateController.ChangeState(AiStateEnum.AiTailAfter); - } - } - - /// - /// 返回地上的武器是否有可以拾取的, 也包含没有被其他敌人标记的武器 - /// - public bool CheckUsableWeaponInUnclaimed() - { - foreach (var unclaimedWeapon in World.Weapon_UnclaimedWeapons) - { - //判断是否能拾起武器, 条件: 相同的房间 - if (unclaimedWeapon.AffiliationArea == AffiliationArea) - { - if (!unclaimedWeapon.IsTotalAmmoEmpty()) - { - if (!unclaimedWeapon.HasSign(SignNames.AiFindWeaponSign)) - { - return true; - } - else - { - //判断是否可以移除该标记 - var enemy = unclaimedWeapon.GetSign(SignNames.AiFindWeaponSign); - if (enemy == null || enemy.IsDestroyed) //标记当前武器的敌人已经被销毁 - { - unclaimedWeapon.RemoveSign(SignNames.AiFindWeaponSign); - return true; - } - else if (!enemy.IsAllWeaponTotalAmmoEmpty()) //标记当前武器的敌人已经有新的武器了 - { - unclaimedWeapon.RemoveSign(SignNames.AiFindWeaponSign); - return true; - } - } - } - } - } - - return false; - } - - /// - /// 寻找可用的武器 - /// - public Weapon FindTargetWeapon() - { - Weapon target = null; - var position = Position; - foreach (var weapon in World.Weapon_UnclaimedWeapons) - { - //判断是否能拾起武器, 条件: 相同的房间, 或者当前房间目前没有战斗, 或者不在战斗房间 - if (weapon.AffiliationArea == AffiliationArea) - { - //还有弹药 - if (!weapon.IsTotalAmmoEmpty()) - { - //查询是否有其他敌人标记要拾起该武器 - if (weapon.HasSign(SignNames.AiFindWeaponSign)) - { - var enemy = weapon.GetSign(SignNames.AiFindWeaponSign); - if (enemy == this) //就是自己标记的 - { - - } - else if (enemy == null || enemy.IsDestroyed) //标记当前武器的敌人已经被销毁 - { - weapon.RemoveSign(SignNames.AiFindWeaponSign); - } - else if (!enemy.IsAllWeaponTotalAmmoEmpty()) //标记当前武器的敌人已经有新的武器了 - { - weapon.RemoveSign(SignNames.AiFindWeaponSign); - } - else //放弃这把武器 - { - continue; - } - } - - if (target == null) //第一把武器 - { - target = weapon; - } - else if (target.Position.DistanceSquaredTo(position) > - weapon.Position.DistanceSquaredTo(position)) //距离更近 - { - target = weapon; - } - } - } - } - - return target; - } - - /// - /// 检查是否能切换到 AiStateEnum.AiLeaveFor 状态 - /// - /// - public bool CanChangeLeaveFor() - { - if (!World.Enemy_IsFindTarget) - { - return false; - } - - var currState = StateController.CurrState; - if (currState == AiStateEnum.AiNormal || currState == AiStateEnum.AiProbe) - { - //判断是否在同一个房间内 - return World.Enemy_FindTargetAffiliationSet.Contains(AffiliationArea); - } - - return false; - } - - /// - /// Ai触发的攻击 - /// - public void EnemyAttack(float delta) - { - var weapon = Holster.ActiveWeapon; - if (weapon != null) - { - if (weapon.IsTotalAmmoEmpty()) //当前武器弹药打空 - { - //切换到有子弹的武器 - var index = Holster.FindWeapon((we, i) => !we.IsTotalAmmoEmpty()); - if (index != -1) - { - Holster.ExchangeByIndex(index); - } - else //所有子弹打光 - { - - } - } - else if (weapon.Reloading) //换弹中 - { - - } - else if (weapon.IsAmmoEmpty()) //弹夹已经打空 - { - Reload(); - } - else if (_targetInViewTime >= weapon.Attribute.AiTargetLockingTime) //正常射击 - { - if (weapon.GetDelayedAttackTime() > 0) - { - Attack(); - } - else - { - if (weapon.Attribute.ContinuousShoot) //连发 - { - Attack(); - } - else //单发 - { - if (_enemyAttackTimer <= 0) - { - _enemyAttackTimer = 60f / weapon.Attribute.StartFiringSpeed; - Attack(); - } - } - } - } - } - } - - /// - /// 获取武器攻击范围 (最大距离值与最小距离的中间值) - /// - /// 从最小到最大距离的过渡量, 0 - 1, 默认 0.5 - public float GetWeaponRange(float weight = 0.5f) - { - if (Holster.ActiveWeapon != null) - { - var attribute = Holster.ActiveWeapon.Attribute; - return Mathf.Lerp(attribute.BulletMinDistance, attribute.BulletMaxDistance, weight); - } - - return 0; - } - - /// - /// 返回目标点是否在视野范围内 - /// - public bool IsInViewRange(Vector2 target) - { - var isForward = IsPositionInForward(target); - if (isForward) - { - if (GlobalPosition.DistanceSquaredTo(target) <= ViewRange * ViewRange) //没有超出视野半径 - { - return true; - } - } - - return false; - } - - /// - /// 返回目标点是否在跟随状态下的视野半径内 - /// - public bool IsInTailAfterViewRange(Vector2 target) - { - var isForward = IsPositionInForward(target); - if (isForward) - { - if (GlobalPosition.DistanceSquaredTo(target) <= TailAfterViewRange * TailAfterViewRange) //没有超出视野半径 - { - return true; - } - } - - return false; - } - - /// - /// 调用视野检测, 如果被墙壁和其它物体遮挡, 则返回被挡住视野的物体对象, 视野无阻则返回 null - /// - public bool TestViewRayCast(Vector2 target) - { - ViewRay.Enabled = true; - ViewRay.TargetPosition = ViewRay.ToLocal(target); - ViewRay.ForceRaycastUpdate(); - return ViewRay.IsColliding(); - } - - /// - /// 调用视野检测完毕后, 需要调用 TestViewRayCastOver() 来关闭视野检测射线 - /// - public void TestViewRayCastOver() - { - ViewRay.Enabled = false; - } - - /// - /// AI 拾起武器操作 - /// - private void EnemyPickUpWeapon() - { - //这几个状态不需要主动拾起武器操作 - var state = StateController.CurrState; - if (state == AiStateEnum.AiNormal) - { - return; - } - - //拾起地上的武器 - if (InteractiveItem is Weapon weapon) - { - if (Holster.ActiveWeapon == null) //手上没有武器, 无论如何也要拾起 - { - TriggerInteractive(); - return; - } - - //没弹药了 - if (weapon.IsTotalAmmoEmpty()) - { - return; - } - - var index = Holster.FindWeapon((we, i) => we.ItemId == weapon.ItemId); - if (index != -1) //与武器袋中武器类型相同, 补充子弹 - { - if (!Holster.GetWeapon(index).IsAmmoFull()) - { - TriggerInteractive(); - } - - return; - } - - // var index2 = Holster.FindWeapon((we, i) => - // we.Attribute.WeightType == weapon.Attribute.WeightType && we.IsTotalAmmoEmpty()); - var index2 = Holster.FindWeapon((we, i) => we.IsTotalAmmoEmpty()); - if (index2 != -1) //扔掉没子弹的武器 - { - ThrowWeapon(index2); - TriggerInteractive(); - return; - } - - // if (Holster.HasVacancy()) //有空位, 拾起武器 - // { - // TriggerInteractive(); - // return; - // } - } - } - -} diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AIStateEnum.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AIStateEnum.cs deleted file mode 100644 index 6bb8db4..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AIStateEnum.cs +++ /dev/null @@ -1,32 +0,0 @@ - -public enum AiStateEnum -{ - /// - /// Ai 状态, 正常, 未发现目标 - /// - AiNormal, - /// - /// 发现目标, 但不知道在哪 - /// - AiProbe, - /// - /// 收到其他敌人通知, 前往发现目标的位置 - /// - AiLeaveFor, - /// - /// 发现目标, 目标不在视野内, 但是知道位置 - /// - AiTailAfter, - /// - /// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 - /// - AiFollowUp, - /// - /// 距离足够近, 在目标附近随机移动 - /// - AiSurround, - /// - /// Ai 寻找弹药 - /// - AiFindAmmo, -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiFindAmmoState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiFindAmmoState.cs deleted file mode 100644 index 9cfb3c6..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiFindAmmoState.cs +++ /dev/null @@ -1,152 +0,0 @@ - -using Godot; - -/// -/// Ai 寻找弹药, 进入该状态需要在参数中传入目标武器对象 -/// -public class AiFindAmmoState : StateBase -{ - - private Weapon _target; - - //导航目标点刷新计时器 - private float _navigationUpdateTimer = 0; - private float _navigationInterval = 1f; - - private bool _isInTailAfterRange = false; - private float _tailAfterTimer = 0; - - public AiFindAmmoState() : base(AiStateEnum.AiFindAmmo) - { - } - - public override void Enter(AiStateEnum prev, params object[] args) - { - if (args.Length == 0) - { - GD.PrintErr("进入 AiStateEnum.AiFindAmmo 状态必须要把目标武器当成参数传过来"); - ChangeState(prev); - return; - } - - SetTargetWeapon((Weapon)args[0]); - _navigationUpdateTimer = 0; - _isInTailAfterRange = false; - _tailAfterTimer = 0; - - //标记武器 - _target.SetSign(SignNames.AiFindWeaponSign, Master); - } - - public override void Process(float delta) - { - if (!Master.IsAllWeaponTotalAmmoEmpty()) //已经有弹药了 - { - ChangeState(GetNextState()); - return; - } - - //更新目标位置 - if (_navigationUpdateTimer <= 0) - { - //每隔一段时间秒更改目标位置 - _navigationUpdateTimer = _navigationInterval; - var position = _target.GlobalPosition; - Master.NavigationAgent2D.TargetPosition = position; - } - else - { - _navigationUpdateTimer -= delta; - } - - var playerPos = Player.Current.GetCenterPosition(); - //枪口指向玩家 - Master.LookTargetPosition(playerPos); - - if (_target.IsDestroyed || _target.IsTotalAmmoEmpty()) //已经被销毁, 或者弹药已经被其他角色捡走 - { - //再去寻找其他武器 - SetTargetWeapon(Master.FindTargetWeapon()); - - if (_target == null) //也没有其他可用的武器了 - { - ChangeState(GetNextState()); - } - } - else if (_target.Master == Master) //已经被自己拾起 - { - ChangeState(GetNextState()); - } - else if (_target.Master != null) //武器已经被其他角色拾起! - { - //再去寻找其他武器 - SetTargetWeapon(Master.FindTargetWeapon()); - - if (_target == null) //也没有其他可用的武器了 - { - ChangeState(GetNextState()); - } - } - else - { - //检测目标没有超出跟随视野距离 - _isInTailAfterRange = Master.IsInTailAfterViewRange(playerPos); - if (_isInTailAfterRange) - { - _tailAfterTimer = 0; - } - else - { - _tailAfterTimer += delta; - } - - //向武器移动 - if (!Master.NavigationAgent2D.IsNavigationFinished()) - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = - (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - } - else - { - Master.BasisVelocity = Vector2.Zero; - } - } - } - - private AiStateEnum GetNextState() - { - return _tailAfterTimer > 10 ? AiStateEnum.AiNormal : AiStateEnum.AiTailAfter; - } - - private void SetTargetWeapon(Weapon weapon) - { - _target = weapon; - //设置目标点 - if (_target != null) - { - Master.NavigationAgent2D.TargetPosition = _target.GlobalPosition; - } - } - - public override void DebugDraw() - { - if (_target != null) - { - Master.DrawLine(Vector2.Zero, Master.ToLocal(_target.GlobalPosition), Colors.Purple); - - if (_tailAfterTimer <= 0) - { - Master.DrawLine(Vector2.Zero, Master.ToLocal(Player.Current.GetCenterPosition()), Colors.Orange); - } - else if (_tailAfterTimer <= 10) - { - Master.DrawLine(Vector2.Zero, Master.ToLocal(Player.Current.GetCenterPosition()), Colors.Blue); - } - - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiFollowUpState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiFollowUpState.cs deleted file mode 100644 index ab05469..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiFollowUpState.cs +++ /dev/null @@ -1,126 +0,0 @@ - -using Godot; - -/// -/// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 -/// -public class AiFollowUpState : StateBase -{ - - /// - /// 目标是否在视野内 - /// - public bool IsInView; - - //导航目标点刷新计时器 - private float _navigationUpdateTimer = 0; - private float _navigationInterval = 0.3f; - - public AiFollowUpState() : base(AiStateEnum.AiFollowUp) - { - } - - public override void Enter(AiStateEnum prev, params object[] args) - { - _navigationUpdateTimer = 0; - IsInView = true; - } - - public override void Process(float delta) - { - //先检查弹药是否打光 - if (Master.IsAllWeaponTotalAmmoEmpty()) - { - //再寻找是否有可用的武器 - var targetWeapon = Master.FindTargetWeapon(); - if (targetWeapon != null) - { - ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); - return; - } - else - { - //切换到随机移动状态 - ChangeState(AiStateEnum.AiSurround); - } - } - - var playerPos = Player.Current.GetCenterPosition(); - - //更新玩家位置 - if (_navigationUpdateTimer <= 0) - { - //每隔一段时间秒更改目标位置 - _navigationUpdateTimer = _navigationInterval; - Master.NavigationAgent2D.TargetPosition = playerPos; - } - else - { - _navigationUpdateTimer -= delta; - } - - var masterPosition = Master.GlobalPosition; - - //是否在攻击范围内 - var inAttackRange = false; - - var weapon = Master.Holster.ActiveWeapon; - if (weapon != null) - { - inAttackRange = masterPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Master.GetWeaponRange(0.7f), 2); - } - - //枪口指向玩家 - Master.LookTargetPosition(playerPos); - - if (!Master.NavigationAgent2D.IsNavigationFinished()) - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - masterPosition - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - } - else - { - Master.BasisVelocity = Vector2.Zero; - } - - //检测玩家是否在视野内 - if (Master.IsInTailAfterViewRange(playerPos)) - { - IsInView = !Master.TestViewRayCast(playerPos); - //关闭射线检测 - Master.TestViewRayCastOver(); - } - else - { - IsInView = false; - } - - if (IsInView) - { - if (inAttackRange) //在攻击范围内 - { - //发起攻击 - Master.EnemyAttack(delta); - - //距离够近, 可以切换到环绕模式 - if (Master.GlobalPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(weapon.Attribute.BulletMinDistance, 2) * 0.7f) - { - ChangeState(AiStateEnum.AiSurround); - } - } - } - else - { - ChangeState(AiStateEnum.AiTailAfter); - } - } - - public override void DebugDraw() - { - var playerPos = Player.Current.GetCenterPosition(); - Master.DrawLine(new Vector2(0, -8), Master.ToLocal(playerPos), Colors.Red); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiLeaveForState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiLeaveForState.cs deleted file mode 100644 index 8185484..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiLeaveForState.cs +++ /dev/null @@ -1,101 +0,0 @@ - -using Godot; - -/// -/// 收到其他敌人通知, 前往发现目标的位置 -/// -public class AiLeaveForState : StateBase -{ - //导航目标点刷新计时器 - private float _navigationUpdateTimer = 0; - private float _navigationInterval = 0.3f; - - public AiLeaveForState() : base(AiStateEnum.AiLeaveFor) - { - } - - public override void Enter(AiStateEnum prev, params object[] args) - { - if (Master.World.Enemy_IsFindTarget) - { - Master.NavigationAgent2D.TargetPosition = Master.World.Enemy_FindTargetPosition; - } - else - { - ChangeState(prev); - return; - } - - //先检查弹药是否打光 - if (Master.IsAllWeaponTotalAmmoEmpty()) - { - //再寻找是否有可用的武器 - var targetWeapon = Master.FindTargetWeapon(); - if (targetWeapon != null) - { - ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); - } - } - } - - public override void Process(float delta) - { - //这个状态下不会有攻击事件, 所以没必要每一帧检查是否弹药耗尽 - - //更新玩家位置 - if (_navigationUpdateTimer <= 0) - { - //每隔一段时间秒更改目标位置 - _navigationUpdateTimer = _navigationInterval; - Master.NavigationAgent2D.TargetPosition = Master.World.Enemy_FindTargetPosition; - } - else - { - _navigationUpdateTimer -= delta; - } - - if (!Master.NavigationAgent2D.IsNavigationFinished()) - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.LookTargetPosition(Master.World.Enemy_FindTargetPosition); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - } - else - { - Master.BasisVelocity = Vector2.Zero; - } - - var playerPos = Player.Current.GetCenterPosition(); - //检测玩家是否在视野内, 如果在, 则切换到 AiTargetInView 状态 - if (Master.IsInTailAfterViewRange(playerPos)) - { - if (!Master.TestViewRayCast(playerPos)) //看到玩家 - { - //关闭射线检测 - Master.TestViewRayCastOver(); - //切换成发现目标状态 - ChangeState(AiStateEnum.AiFollowUp); - return; - } - else - { - //关闭射线检测 - Master.TestViewRayCastOver(); - } - } - - //移动到目标掉了, 还没发现目标 - if (Master.NavigationAgent2D.IsNavigationFinished()) - { - ChangeState(AiStateEnum.AiNormal); - } - } - - public override void DebugDraw() - { - Master.DrawLine(Vector2.Zero, Master.ToLocal(Master.NavigationAgent2D.TargetPosition), Colors.Yellow); - } -} diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiNormalState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiNormalState.cs deleted file mode 100644 index 299abf0..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiNormalState.cs +++ /dev/null @@ -1,181 +0,0 @@ - -using Godot; - -/// -/// AI 正常状态 -/// -public class AiNormalState : StateBase -{ - //是否发现玩家 - private bool _isFindPlayer; - - //下一个运动的角度 - private Vector2 _nextPos; - - //是否移动结束 - private bool _isMoveOver; - - //上一次移动是否撞墙 - private bool _againstWall; - - //撞墙法线角度 - private float _againstWallNormalAngle; - - //移动停顿计时器 - private float _pauseTimer; - private bool _moveFlag; - - //上一帧位置 - private Vector2 _prevPos; - //卡在一个位置的时间 - private float _lockTimer; - - public AiNormalState() : base(AiStateEnum.AiNormal) - { - } - - public override void Enter(AiStateEnum prev, params object[] args) - { - _isFindPlayer = false; - _isMoveOver = true; - _againstWall = false; - _againstWallNormalAngle = 0; - _pauseTimer = 0; - _moveFlag = false; - } - - public override void Process(float delta) - { - //其他敌人发现玩家 - if (Master.CanChangeLeaveFor()) - { - ChangeState(AiStateEnum.AiLeaveFor); - return; - } - - if (_isFindPlayer) //已经找到玩家了 - { - //现临时处理, 直接切换状态 - ChangeState(AiStateEnum.AiTailAfter); - } - else //没有找到玩家 - { - //检测玩家 - var player = Player.Current; - //玩家中心点坐标 - var playerPos = player.GetCenterPosition(); - - if (Master.IsInViewRange(playerPos) && !Master.TestViewRayCast(playerPos)) //发现玩家 - { - //发现玩家 - _isFindPlayer = true; - } - else if (_pauseTimer >= 0) - { - Master.AnimatedSprite.Play(AnimatorNames.Idle); - _pauseTimer -= delta; - } - else if (_isMoveOver) //没发现玩家, 且已经移动完成 - { - RunOver(); - _isMoveOver = false; - } - else //移动中 - { - if (_lockTimer >= 1) //卡在一个点超过一秒 - { - RunOver(); - _isMoveOver = false; - _lockTimer = 0; - } - else if (Master.NavigationAgent2D.IsNavigationFinished()) //到达终点 - { - _pauseTimer = Utils.RandomRangeFloat(0.3f, 2f); - _isMoveOver = true; - _moveFlag = false; - Master.BasisVelocity = Vector2.Zero; - } - else if (!_moveFlag) - { - _moveFlag = true; - var pos = Master.GlobalPosition; - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - _prevPos = pos; - } - else - { - var pos = Master.GlobalPosition; - var lastSlideCollision = Master.GetLastSlideCollision(); - if (lastSlideCollision != null && lastSlideCollision.GetCollider() is Role) //碰到其他角色 - { - _pauseTimer = Utils.RandomRangeFloat(0.1f, 0.5f); - _isMoveOver = true; - _moveFlag = false; - Master.BasisVelocity = Vector2.Zero; - } - else - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - } - - if (_prevPos.DistanceSquaredTo(pos) <= 0.01f) - { - _lockTimer += delta; - } - else - { - _prevPos = pos; - } - } - } - - //关闭射线检测 - Master.TestViewRayCastOver(); - } - } - - //移动结束 - private void RunOver() - { - float angle; - if (_againstWall) - { - angle = Utils.RandomRangeFloat(_againstWallNormalAngle - Mathf.Pi * 0.5f, - _againstWallNormalAngle + Mathf.Pi * 0.5f); - } - else - { - angle = Utils.RandomRangeFloat(0, Mathf.Pi * 2f); - } - - var len = Utils.RandomRangeInt(30, 200); - _nextPos = new Vector2(len, 0).Rotated(angle) + Master.GlobalPosition; - //获取射线碰到的坐标 - if (Master.TestViewRayCast(_nextPos)) //碰到墙壁 - { - _nextPos = Master.ViewRay.GetCollisionPoint(); - _againstWall = true; - _againstWallNormalAngle = Master.ViewRay.GetCollisionNormal().Angle(); - } - else - { - _againstWall = false; - } - - Master.NavigationAgent2D.TargetPosition = _nextPos; - Master.LookTargetPosition(_nextPos); - } - - public override void DebugDraw() - { - Master.DrawLine(new Vector2(0, -8), Master.ToLocal(_nextPos), Colors.Green); - } -} diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiProbeState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiProbeState.cs deleted file mode 100644 index 1015095..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiProbeState.cs +++ /dev/null @@ -1,20 +0,0 @@ - -/// -/// Ai 不确定玩家位置 -/// -public class AiProbeState : StateBase -{ - public AiProbeState() : base(AiStateEnum.AiProbe) - { - } - - public override void Process(float delta) - { - //其他敌人发现玩家 - if (Master.CanChangeLeaveFor()) - { - ChangeState(AiStateEnum.AiLeaveFor); - return; - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiSurroundState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiSurroundState.cs deleted file mode 100644 index ebfce46..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiSurroundState.cs +++ /dev/null @@ -1,176 +0,0 @@ - -using Godot; - -/// -/// 距离目标足够近, 在目标附近随机移动, 并开火 -/// -public class AiSurroundState : StateBase -{ - /// - /// 目标是否在视野内 - /// - public bool IsInView = true; - - //是否移动结束 - private bool _isMoveOver; - - //移动停顿计时器 - private float _pauseTimer; - private bool _moveFlag; - - //下一个移动点 - private Vector2 _nextPosition; - - //上一帧位置 - private Vector2 _prevPos; - //卡在一个位置的时间 - private float _lockTimer; - - public AiSurroundState() : base(AiStateEnum.AiSurround) - { - } - - public override void Enter(AiStateEnum prev, params object[] args) - { - IsInView = true; - _isMoveOver = true; - _pauseTimer = 0; - _moveFlag = false; - } - - public override void Process(float delta) - { - //先检查弹药是否打光 - if (Master.IsAllWeaponTotalAmmoEmpty()) - { - //再寻找是否有可用的武器 - var targetWeapon = Master.FindTargetWeapon(); - if (targetWeapon != null) - { - ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); - return; - } - } - - var playerPos = Player.Current.GetCenterPosition(); - var weapon = Master.Holster.ActiveWeapon; - - //枪口指向玩家 - Master.LookTargetPosition(playerPos); - - //检测玩家是否在视野内 - if (Master.IsInTailAfterViewRange(playerPos)) - { - IsInView = !Master.TestViewRayCast(playerPos); - //关闭射线检测 - Master.TestViewRayCastOver(); - } - else - { - IsInView = false; - } - - if (IsInView) - { - if (_pauseTimer >= 0) - { - Master.AnimatedSprite.Play(AnimatorNames.Idle); - _pauseTimer -= delta; - } - else if (_isMoveOver) //移动已经完成 - { - RunOver(playerPos); - _isMoveOver = false; - } - else - { - if (_lockTimer >= 1) //卡在一个点超过一秒 - { - RunOver(playerPos); - _isMoveOver = false; - _lockTimer = 0; - } - else if (Master.NavigationAgent2D.IsNavigationFinished()) //到达终点 - { - _pauseTimer = Utils.RandomRangeFloat(0f, 0.5f); - _isMoveOver = true; - _moveFlag = false; - Master.BasisVelocity = Vector2.Zero; - } - else if (!_moveFlag) - { - _moveFlag = true; - //计算移动 - var pos = Master.GlobalPosition; - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - } - else - { - var pos = Master.GlobalPosition; - var lastSlideCollision = Master.GetLastSlideCollision(); - if (lastSlideCollision != null && lastSlideCollision.GetCollider() is Role) //碰到其他角色 - { - _pauseTimer = Utils.RandomRangeFloat(0f, 0.3f); - _isMoveOver = true; - _moveFlag = false; - Master.BasisVelocity = Vector2.Zero; - } - else - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - } - - if (_prevPos.DistanceSquaredTo(pos) <= 0.01f) - { - _lockTimer += delta; - } - else - { - _prevPos = pos; - } - } - - if (weapon != null) - { - var position = Master.GlobalPosition; - if (position.DistanceSquaredTo(playerPos) > Mathf.Pow(Master.GetWeaponRange(0.7f), 2)) //玩家离开正常射击范围 - { - ChangeState(AiStateEnum.AiFollowUp); - } - else - { - //发起攻击 - Master.EnemyAttack(delta); - } - } - } - } - else //目标离开视野 - { - ChangeState(AiStateEnum.AiTailAfter); - } - } - - private void RunOver(Vector2 targetPos) - { - var weapon = Master.Holster.ActiveWeapon; - var distance = (int)(weapon == null ? 150 : (weapon.Attribute.BulletMinDistance * 0.7f)); - _nextPosition = new Vector2( - targetPos.X + Utils.RandomRangeInt(-distance, distance), - targetPos.Y + Utils.RandomRangeInt(-distance, distance) - ); - Master.NavigationAgent2D.TargetPosition = _nextPosition; - } - - public override void DebugDraw() - { - Master.DrawLine(new Vector2(0, -8), Master.ToLocal(_nextPosition), Colors.White); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/role/enemy/state/AiTailAfterState.cs b/DungeonShooting_Godot/src/game/role/enemy/state/AiTailAfterState.cs deleted file mode 100644 index 87d018e..0000000 --- a/DungeonShooting_Godot/src/game/role/enemy/state/AiTailAfterState.cs +++ /dev/null @@ -1,125 +0,0 @@ - -using Godot; - -/// -/// AI 发现玩家, 跟随玩家 -/// -public class AiTailAfterState : StateBase -{ - /// - /// 目标是否在视野半径内 - /// - private bool _isInViewRange; - - //导航目标点刷新计时器 - private float _navigationUpdateTimer = 0; - private float _navigationInterval = 0.3f; - - //目标从视野消失时已经过去的时间 - private float _viewTimer; - - public AiTailAfterState() : base(AiStateEnum.AiTailAfter) - { - } - - public override void Enter(AiStateEnum prev, params object[] args) - { - _isInViewRange = true; - _navigationUpdateTimer = 0; - _viewTimer = 0; - - //先检查弹药是否打光 - if (Master.IsAllWeaponTotalAmmoEmpty()) - { - //再寻找是否有可用的武器 - var targetWeapon = Master.FindTargetWeapon(); - if (targetWeapon != null) - { - ChangeState(AiStateEnum.AiFindAmmo, targetWeapon); - } - } - } - - public override void Process(float delta) - { - //这个状态下不会有攻击事件, 所以没必要每一帧检查是否弹药耗尽 - - var playerPos = Player.Current.GetCenterPosition(); - - //更新玩家位置 - if (_navigationUpdateTimer <= 0) - { - //每隔一段时间秒更改目标位置 - _navigationUpdateTimer = _navigationInterval; - Master.NavigationAgent2D.TargetPosition = playerPos; - } - else - { - _navigationUpdateTimer -= delta; - } - - //枪口指向玩家 - Master.LookTargetPosition(playerPos); - - if (!Master.NavigationAgent2D.IsNavigationFinished()) - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * - Master.MoveSpeed; - } - else - { - Master.BasisVelocity = Vector2.Zero; - } - //检测玩家是否在视野内, 如果在, 则切换到 AiTargetInView 状态 - if (Master.IsInTailAfterViewRange(playerPos)) - { - if (!Master.TestViewRayCast(playerPos)) //看到玩家 - { - //关闭射线检测 - Master.TestViewRayCastOver(); - //切换成发现目标状态 - ChangeState(AiStateEnum.AiFollowUp); - return; - } - else - { - //关闭射线检测 - Master.TestViewRayCastOver(); - } - } - - //检测玩家是否在穿墙视野范围内, 直接检测距离即可 - _isInViewRange = Master.IsInViewRange(playerPos); - if (_isInViewRange) - { - _viewTimer = 0; - } - else //超出视野 - { - if (_viewTimer > 10) //10秒 - { - ChangeState(AiStateEnum.AiNormal); - } - else - { - _viewTimer += delta; - } - } - } - - public override void DebugDraw() - { - var playerPos = Player.Current.GetCenterPosition(); - if (_isInViewRange) - { - Master.DrawLine(new Vector2(0, -8), Master.ToLocal(playerPos), Colors.Orange); - } - else - { - Master.DrawLine(new Vector2(0, -8), Master.ToLocal(playerPos), Colors.Blue); - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index f84968b..cab98e4 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -490,11 +490,7 @@ private void DisposeRoomInfo(RoomInfo roomInfo) { - foreach (var activityMark in roomInfo.ActivityMarks) - { - activityMark.QueueFree(); - } - roomInfo.ActivityMarks.Clear(); + roomInfo.Destroy(); } public override void _Draw() diff --git a/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTips.cs b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTips.cs new file mode 100644 index 0000000..f406a8c --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTips.cs @@ -0,0 +1,167 @@ +namespace UI.BottomTips; + +/// +/// Ui代码, 该类是根据ui场景自动生成的, 请不要手动编辑该类, 以免造成代码丢失 +/// +public abstract partial class BottomTips : UiBase +{ + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel + /// + public UiNode_Panel L_Panel + { + get + { + if (_L_Panel == null) _L_Panel = new UiNode_Panel(GetNodeOrNull("Panel")); + return _L_Panel; + } + } + private UiNode_Panel _L_Panel; + + + public BottomTips() : base(nameof(BottomTips)) + { + } + + /// + /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.AspectRatioContainer.TextureRect + /// + public class UiNode_TextureRect : IUiNode + { + public UiNode_TextureRect(Godot.TextureRect node) : base(node) { } + public override UiNode_TextureRect Clone() => new ((Godot.TextureRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.AspectRatioContainer + /// + public class UiNode_AspectRatioContainer : IUiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.TextureRect + /// + public UiNode_TextureRect L_TextureRect + { + get + { + if (_L_TextureRect == null) _L_TextureRect = new UiNode_TextureRect(Instance.GetNodeOrNull("TextureRect")); + return _L_TextureRect; + } + } + private UiNode_TextureRect _L_TextureRect; + + public UiNode_AspectRatioContainer(Godot.AspectRatioContainer node) : base(node) { } + public override UiNode_AspectRatioContainer Clone() => new ((Godot.AspectRatioContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer.Label + /// + public class UiNode_Label : IUiNode + { + public UiNode_Label(Godot.Label node) : base(node) { } + public override UiNode_Label Clone() => new ((Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer.HBoxContainer + /// + public class UiNode_HBoxContainer : IUiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.MarginContainer.CenterContainer.AspectRatioContainer + /// + public UiNode_AspectRatioContainer L_AspectRatioContainer + { + get + { + if (_L_AspectRatioContainer == null) _L_AspectRatioContainer = new UiNode_AspectRatioContainer(Instance.GetNodeOrNull("AspectRatioContainer")); + return _L_AspectRatioContainer; + } + } + private UiNode_AspectRatioContainer _L_AspectRatioContainer; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.MarginContainer.CenterContainer.Label + /// + public UiNode_Label L_Label + { + get + { + if (_L_Label == null) _L_Label = new UiNode_Label(Instance.GetNodeOrNull("Label")); + return _L_Label; + } + } + private UiNode_Label _L_Label; + + public UiNode_HBoxContainer(Godot.HBoxContainer node) : base(node) { } + public override UiNode_HBoxContainer Clone() => new ((Godot.HBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: BottomTips.Panel.MarginContainer.CenterContainer + /// + public class UiNode_CenterContainer : IUiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.MarginContainer.HBoxContainer + /// + public UiNode_HBoxContainer L_HBoxContainer + { + get + { + if (_L_HBoxContainer == null) _L_HBoxContainer = new UiNode_HBoxContainer(Instance.GetNodeOrNull("HBoxContainer")); + return _L_HBoxContainer; + } + } + private UiNode_HBoxContainer _L_HBoxContainer; + + public UiNode_CenterContainer(Godot.CenterContainer node) : base(node) { } + public override UiNode_CenterContainer Clone() => new ((Godot.CenterContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: BottomTips.Panel.MarginContainer + /// + public class UiNode_MarginContainer : IUiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.Panel.CenterContainer + /// + public UiNode_CenterContainer L_CenterContainer + { + get + { + if (_L_CenterContainer == null) _L_CenterContainer = new UiNode_CenterContainer(Instance.GetNodeOrNull("CenterContainer")); + return _L_CenterContainer; + } + } + private UiNode_CenterContainer _L_CenterContainer; + + public UiNode_MarginContainer(Godot.MarginContainer node) : base(node) { } + public override UiNode_MarginContainer Clone() => new ((Godot.MarginContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: BottomTips.Panel + /// + public class UiNode_Panel : IUiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: BottomTips.MarginContainer + /// + public UiNode_MarginContainer L_MarginContainer + { + get + { + if (_L_MarginContainer == null) _L_MarginContainer = new UiNode_MarginContainer(Instance.GetNodeOrNull("MarginContainer")); + return _L_MarginContainer; + } + } + private UiNode_MarginContainer _L_MarginContainer; + + public UiNode_Panel(Godot.PanelContainer node) : base(node) { } + public override UiNode_Panel Clone() => new ((Godot.PanelContainer)Instance.Duplicate()); + } + +} diff --git a/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTipsPanel.cs b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTipsPanel.cs new file mode 100644 index 0000000..cdfe7dc --- /dev/null +++ b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTipsPanel.cs @@ -0,0 +1,132 @@ +using System.Collections; +using Godot; + +namespace UI.BottomTips; + +public partial class BottomTipsPanel : BottomTips +{ + private long _id = -1; + + private float _offsetY; + //动画播放时间 + private float _animationTime = 0.5f; + //动画移动的像素 + private int _movePixel = 153; + + public override void OnCreateUi() + { + _offsetY = L_Panel.Instance.Position.Y - (Position.Y + Size.Y); + } + + public override void OnShowUi() + { + + } + + public override void OnHideUi() + { + + } + + /// + /// 执行入场流程 + /// + public void PlayInStep(Texture2D icon, string message) + { + if (_id >= 0) + { + StopCoroutine(_id); + HideUi(); + } + _id = StartCoroutine(RunAnimation(icon, message)); + } + + /// + /// 设置图标 + /// + public void SetIcon(Texture2D icon) + { + L_Panel.L_MarginContainer.L_CenterContainer.L_HBoxContainer.L_AspectRatioContainer.L_TextureRect.Instance + .Texture = icon; + } + + /// + /// 设置文本内容 + /// + public void SetMessage(string message) + { + L_Panel.L_MarginContainer.L_CenterContainer.L_HBoxContainer.L_Label.Instance.Text = message; + } + + private IEnumerator RunAnimation(Texture2D icon, string message) + { + //还原位置 + var pos = L_Panel.Instance.Position; + pos.Y = Position.Y + Size.Y + _offsetY; + L_Panel.Instance.Position = pos; + + SetIcon(icon); + SetMessage(message); + + yield return 0; + ShowUi(); + L_Panel.Instance.ResetSize(); + yield return 0; + //重新计算中心点 + pos.X = Size.X / 2 - L_Panel.Instance.Size.X / 2; + L_Panel.Instance.Position = pos; + yield return 0; + + //向上移动 + var frame = 60 * _animationTime; + var stepPixel = _movePixel / frame; + for (var i = 0; i < frame; i++) + { + pos.X = L_Panel.Instance.Position.X; + pos.Y -= stepPixel; + L_Panel.Instance.Position = pos; + yield return 0; + } + + yield return new WaitForSeconds(3.5f); + + //向下移动 + for (var i = 0; i < frame; i++) + { + pos.X = L_Panel.Instance.Position.X; + pos.Y += stepPixel; + L_Panel.Instance.Position = pos; + yield return 0; + } + + HideUi(); + _id = -1; + } + + private static BottomTipsPanel _instance; + public static void Init() + { + _instance = UiManager.Open_BottomTips(); + _instance.HideUi(); + } + + /// + /// 打开Tips, 并设置图标和内容 + /// + /// 显示图标 + /// 显示消息 + public static void ShowTips(string icon, string message) + { + ShowTips(ResourceManager.Load(icon), message); + } + + /// + /// 打开Tips, 并设置图标和内容 + /// + /// 显示图标 + /// 显示消息 + public static void ShowTips(Texture2D icon, string message) + { + _instance.PlayInStep(icon, message); + } +} diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs b/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs index b702af5..db7ad3c 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs @@ -43,8 +43,9 @@ /// 显示互动提示ui /// /// 所在坐标 + /// 显示文本 /// 显示图标 - public void ShowBar(ActivityObject target, string icon) + public void ShowBar(ActivityObject target, string showText, string icon) { _interactiveTipBar.Instance.GlobalPosition = target.GlobalPosition; if (_currImage != icon) @@ -53,6 +54,7 @@ _interactiveTipBar.L_Icon.Instance.Texture = ResourceManager.Load(icon); } _interactiveTipBar.Instance.Visible = true; + _interactiveTipBar.L_NameLabel.Instance.Text = showText; } public void OnPlayerChangeInteractiveItem(object o) @@ -67,11 +69,12 @@ { var result = (CheckInteractiveResult)o; var interactiveItem = Player.Current.InteractiveItem; - if (interactiveItem is Weapon) + //if (interactiveItem is Weapon) + if (!string.IsNullOrEmpty(result.ShowIcon)) { _interactiveTarget = interactiveItem; //显示互动提示 - ShowBar(result.Target, result.ShowIcon); + ShowBar(result.Target, result.Target.ItemConfig.Name, result.ShowIcon); } else { diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBar.cs b/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBar.cs index 1292394..e593d8b 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBar.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBar.cs @@ -9,14 +9,14 @@ { private RoomUI.UiNode_ReloadBar _reloadBar; private int width; - private float startX; + private float startX = 1; public ReloadBar(RoomUI.UiNode_ReloadBar reloadBar) { reloadBar.Instance.Visible = false; _reloadBar = reloadBar; width = _reloadBar.L_Slot.Instance.Texture.GetWidth(); - startX = -(width - 3) / 2f; + //startX = -(width - 3) / 2f; } public void OnShow() diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs index f461396..f7e4f7e 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUI.cs @@ -6,26 +6,26 @@ public abstract partial class RoomUI : UiBase { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.InteractiveTipBar + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.InteractiveTipBar /// public UiNode_InteractiveTipBar L_InteractiveTipBar { get { - if (_L_InteractiveTipBar == null) _L_InteractiveTipBar = new UiNode_InteractiveTipBar(GetNodeOrNull("InteractiveTipBar")); + if (_L_InteractiveTipBar == null) _L_InteractiveTipBar = new UiNode_InteractiveTipBar(GetNodeOrNull("InteractiveTipBar")); return _L_InteractiveTipBar; } } private UiNode_InteractiveTipBar _L_InteractiveTipBar; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.ReloadBar + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.ReloadBar /// public UiNode_ReloadBar L_ReloadBar { get { - if (_L_ReloadBar == null) _L_ReloadBar = new UiNode_ReloadBar(GetNodeOrNull("ReloadBar")); + if (_L_ReloadBar == null) _L_ReloadBar = new UiNode_ReloadBar(GetNodeOrNull("ReloadBar")); return _L_ReloadBar; } } @@ -50,21 +50,21 @@ } /// - /// 类型: , 路径: RoomUI.InteractiveTipBar.Icon + /// 类型: , 路径: RoomUI.InteractiveTipBar.Icon /// - public class UiNode_Icon : IUiNode + public class UiNode_Icon : IUiNode { - public UiNode_Icon(Godot.Sprite2D node) : base(node) { } - public override UiNode_Icon Clone() => new ((Godot.Sprite2D)Instance.Duplicate()); + public UiNode_Icon(Godot.TextureRect node) : base(node) { } + public override UiNode_Icon Clone() => new ((Godot.TextureRect)Instance.Duplicate()); } /// - /// 类型: , 路径: RoomUI.InteractiveTipBar.InteractiveIcon + /// 类型: , 路径: RoomUI.InteractiveTipBar.InteractiveIcon /// - public class UiNode_InteractiveIcon : IUiNode + public class UiNode_InteractiveIcon : IUiNode { - public UiNode_InteractiveIcon(Godot.Sprite2D node) : base(node) { } - public override UiNode_InteractiveIcon Clone() => new ((Godot.Sprite2D)Instance.Duplicate()); + public UiNode_InteractiveIcon(Godot.TextureRect node) : base(node) { } + public override UiNode_InteractiveIcon Clone() => new ((Godot.TextureRect)Instance.Duplicate()); } /// @@ -77,31 +77,40 @@ } /// - /// 类型: , 路径: RoomUI.InteractiveTipBar + /// 类型: , 路径: RoomUI.InteractiveTipBar.NameLabel /// - public class UiNode_InteractiveTipBar : IUiNode + public class UiNode_NameLabel : IUiNode + { + public UiNode_NameLabel(Godot.Label node) : base(node) { } + public override UiNode_NameLabel Clone() => new ((Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: RoomUI.InteractiveTipBar + /// + public class UiNode_InteractiveTipBar : IUiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Icon + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Icon /// public UiNode_Icon L_Icon { get { - if (_L_Icon == null) _L_Icon = new UiNode_Icon(Instance.GetNodeOrNull("Icon")); + if (_L_Icon == null) _L_Icon = new UiNode_Icon(Instance.GetNodeOrNull("Icon")); return _L_Icon; } } private UiNode_Icon _L_Icon; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.InteractiveIcon + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.InteractiveIcon /// public UiNode_InteractiveIcon L_InteractiveIcon { get { - if (_L_InteractiveIcon == null) _L_InteractiveIcon = new UiNode_InteractiveIcon(Instance.GetNodeOrNull("InteractiveIcon")); + if (_L_InteractiveIcon == null) _L_InteractiveIcon = new UiNode_InteractiveIcon(Instance.GetNodeOrNull("InteractiveIcon")); return _L_InteractiveIcon; } } @@ -120,8 +129,21 @@ } private UiNode_Line2D _L_Line2D; - public UiNode_InteractiveTipBar(Godot.Node2D node) : base(node) { } - public override UiNode_InteractiveTipBar Clone() => new ((Godot.Node2D)Instance.Duplicate()); + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.NameLabel + /// + public UiNode_NameLabel L_NameLabel + { + get + { + if (_L_NameLabel == null) _L_NameLabel = new UiNode_NameLabel(Instance.GetNodeOrNull("NameLabel")); + return _L_NameLabel; + } + } + private UiNode_NameLabel _L_NameLabel; + + public UiNode_InteractiveTipBar(Godot.Control node) : base(node) { } + public override UiNode_InteractiveTipBar Clone() => new ((Godot.Control)Instance.Duplicate()); } /// @@ -134,9 +156,9 @@ } /// - /// 类型: , 路径: RoomUI.ReloadBar.Slot + /// 类型: , 路径: RoomUI.ReloadBar.Slot /// - public class UiNode_Slot : IUiNode + public class UiNode_Slot : IUiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.ReloadBar.Block @@ -151,30 +173,30 @@ } private UiNode_Block _L_Block; - public UiNode_Slot(Godot.Sprite2D node) : base(node) { } - public override UiNode_Slot Clone() => new ((Godot.Sprite2D)Instance.Duplicate()); + public UiNode_Slot(Godot.TextureRect node) : base(node) { } + public override UiNode_Slot Clone() => new ((Godot.TextureRect)Instance.Duplicate()); } /// - /// 类型: , 路径: RoomUI.ReloadBar + /// 类型: , 路径: RoomUI.ReloadBar /// - public class UiNode_ReloadBar : IUiNode + public class UiNode_ReloadBar : IUiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Slot + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: RoomUI.Slot /// public UiNode_Slot L_Slot { get { - if (_L_Slot == null) _L_Slot = new UiNode_Slot(Instance.GetNodeOrNull("Slot")); + if (_L_Slot == null) _L_Slot = new UiNode_Slot(Instance.GetNodeOrNull("Slot")); return _L_Slot; } } private UiNode_Slot _L_Slot; - public UiNode_ReloadBar(Godot.Node2D node) : base(node) { } - public override UiNode_ReloadBar Clone() => new ((Godot.Node2D)Instance.Duplicate()); + public UiNode_ReloadBar(Godot.Control node) : base(node) { } + public override UiNode_ReloadBar Clone() => new ((Godot.Control)Instance.Duplicate()); } /// diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs index 7401d92..26ea940 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs @@ -1,5 +1,6 @@ using Godot; +using UI.BottomTips; namespace UI.RoomUI; @@ -12,6 +13,7 @@ private InteractiveTipBar _interactiveTipBar; private GunBar _gunBar; private LifeBar _lifeBar; + private EventFactory _factory; public override void OnCreateUi() { @@ -27,6 +29,9 @@ _interactiveTipBar.OnShow(); _gunBar.OnShow(); _lifeBar.OnShow(); + + _factory = EventManager.CreateEventFactory(); + _factory.AddEventListener(EventEnum.OnPlayerPickUpProp, OnPlayerPickUpProp); } public override void OnHideUi() @@ -35,6 +40,9 @@ _interactiveTipBar.OnHide(); _gunBar.OnHide(); _lifeBar.OnHide(); + + _factory.RemoveAllEventListener(); + _factory = null; } public void InitData() @@ -47,4 +55,12 @@ _gunBar.Process(delta); _lifeBar.Process(delta); } + + //玩家拾起道具, 弹出提示 + private void OnPlayerPickUpProp(object propObj) + { + var prop = (Prop)propObj; + var message = $"{prop.ItemConfig.Name}\n{prop.ItemConfig.Remark}"; + BottomTipsPanel.ShowTips(prop.GetDefaultTexture(), message); + } } \ No newline at end of file