diff --git a/DungeonShooting_Godot/DungeonShooting.csproj b/DungeonShooting_Godot/DungeonShooting.csproj index 65ee589..97e725f 100644 --- a/DungeonShooting_Godot/DungeonShooting.csproj +++ b/DungeonShooting_Godot/DungeonShooting.csproj @@ -1,4 +1,4 @@ - + net7.0 true diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old.1 b/DungeonShooting_Godot/DungeonShooting.csproj.old.1 new file mode 100644 index 0000000..65ee589 --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.1 @@ -0,0 +1,11 @@ + + + net7.0 + true + + + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/DungeonShooting.csproj.old.2 b/DungeonShooting_Godot/DungeonShooting.csproj.old.2 new file mode 100644 index 0000000..543224c --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.2 @@ -0,0 +1,11 @@ + + + net7.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..36c02a1 --- /dev/null +++ b/DungeonShooting_Godot/DungeonShooting.csproj.old.3 @@ -0,0 +1,11 @@ + + + net7.0 + true + + + + + + + \ No newline at end of file diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityBase.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityBase.xlsx new file mode 100644 index 0000000..9ba6191 --- /dev/null +++ b/DungeonShooting_Godot/excel/excelFile/ActivityBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityMaterial.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityMaterial.xlsx new file mode 100644 index 0000000..216f7f6 --- /dev/null +++ b/DungeonShooting_Godot/excel/excelFile/ActivityMaterial.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx deleted file mode 100644 index 508bcd9..0000000 --- a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx b/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx index 152aabd..9bafc6d 100644 --- a/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/AiAttackAttr.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/BulletBase.xlsx b/DungeonShooting_Godot/excel/excelFile/BulletBase.xlsx new file mode 100644 index 0000000..9d78f08 --- /dev/null +++ b/DungeonShooting_Godot/excel/excelFile/BulletBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx index a17d8a7..63764f1 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 deleted file mode 100644 index 7602be4..0000000 --- a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/WeaponBase.xlsx b/DungeonShooting_Godot/excel/excelFile/WeaponBase.xlsx new file mode 100644 index 0000000..6a85ce0 --- /dev/null +++ b/DungeonShooting_Godot/excel/excelFile/WeaponBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn deleted file mode 100644 index 858cd81..0000000 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0001.tscn +++ /dev/null @@ -1,71 +0,0 @@ -[gd_scene load_steps=8 format=3 uid="uid://bj4kmvt8jg1cf"] - -[ext_resource type="Script" path="res://src/game/activity/bullet/Bullet.cs" id="1_82ma0"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_6wvtu"] -[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/bullet0001.png" id="3_hjgpe"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_w5w0i"] -resource_local_to_scene = true -shader = ExtResource("2_6wvtu") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_qhkgc"] -resource_local_to_scene = true -shader = ExtResource("2_6wvtu") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="SpriteFrames" id="SpriteFrames_5wvmf"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": ExtResource("3_hjgpe") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_lcqb8"] -size = Vector2(9, 4) - -[node name="Bullet0001" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 2 -script = ExtResource("1_82ma0") -CollisionArea = NodePath("CollisionArea") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_w5w0i") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_qhkgc") -sprite_frames = SubResource("SpriteFrames_5wvmf") - -[node name="CollisionArea" type="Area2D" parent="."] -visible = false -collision_layer = 0 -collision_mask = 0 -monitorable = false - -[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] -position = Vector2(2.93353, 0) -shape = SubResource("RectangleShape2D_lcqb8") - -[node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(1.5, 0) -shape = SubResource("RectangleShape2D_lcqb8") diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn deleted file mode 100644 index 7ff1c64..0000000 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0002.tscn +++ /dev/null @@ -1,63 +0,0 @@ -[gd_scene load_steps=8 format=3 uid="uid://bqkj0rn72ppge"] - -[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/bullet/Bullet0002.tres" id="3_uvuj8"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] -resource_local_to_scene = true -shader = ExtResource("2_n44pd") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] -resource_local_to_scene = true -shader = ExtResource("2_n44pd") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true - -[sub_resource type="CircleShape2D" id="CircleShape2D_0vxfv"] -radius = 3.0 - -[sub_resource type="CircleShape2D" id="CircleShape2D_e2yn3"] -radius = 3.0 - -[node name="Bullet0002" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 2 -script = ExtResource("1_hga3h") -CollisionArea = NodePath("CollisionArea") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_v77gw") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -modulate = Color(1.6, 1.6, 1.6, 1) -material = SubResource("ShaderMaterial_p0wfd") -sprite_frames = ExtResource("3_uvuj8") - -[node name="CollisionArea" type="Area2D" parent="."] -visible = false -collision_layer = 0 -collision_mask = 0 -monitorable = false - -[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] -position = Vector2(-2.38419e-07, 0) -shape = SubResource("CircleShape2D_0vxfv") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_e2yn3") diff --git a/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn b/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn deleted file mode 100644 index 605759f..0000000 --- a/DungeonShooting_Godot/prefab/bullet/Bullet0003.tscn +++ /dev/null @@ -1,58 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://ee24ocwk8snj"] - -[ext_resource type="Script" path="res://src/game/activity/bullet/Bullet.cs" id="1_h6lfm"] -[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_bteri"] -[ext_resource type="SpriteFrames" uid="uid://bcnhyin0aufl1" path="res://resource/spriteFrames/bullet/Bullet0003.tres" id="3_qvo0u"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] -resource_local_to_scene = true -shader = ExtResource("2_bteri") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 1.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] -resource_local_to_scene = true -shader = ExtResource("2_bteri") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = false -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_c0onq"] -size = Vector2(6, 3.125) - -[node name="Bullet0003" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] -collision_layer = 2 -script = ExtResource("1_h6lfm") -CollisionArea = NodePath("CollisionArea") -ShadowSprite = NodePath("ShadowSprite") -AnimatedSprite = NodePath("AnimatedSprite") -Collision = NodePath("Collision") - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_v77gw") - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -modulate = Color(1.6, 1.6, 1.6, 1) -material = SubResource("ShaderMaterial_p0wfd") -sprite_frames = ExtResource("3_qvo0u") - -[node name="CollisionArea" type="Area2D" parent="."] -visible = false -collision_layer = 0 -collision_mask = 0 -monitorable = false - -[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionArea"] -position = Vector2(1, 0) -shape = SubResource("RectangleShape2D_c0onq") - -[node name="Collision" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_c0onq") diff --git a/DungeonShooting_Godot/prefab/bullet/explode/Explode0001.tscn b/DungeonShooting_Godot/prefab/bullet/explode/Explode0001.tscn new file mode 100644 index 0000000..31cb46f --- /dev/null +++ b/DungeonShooting_Godot/prefab/bullet/explode/Explode0001.tscn @@ -0,0 +1,356 @@ +[gd_scene load_steps=26 format=3 uid="uid://cw3c600m8rv6t"] + +[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="1_ctx3v"] +[ext_resource type="Script" path="res://src/game/activity/bullet/explode/Explode.cs" id="1_qn5pu"] +[ext_resource type="Texture2D" uid="uid://ccdflg560oub6" path="res://resource/sprite/effects/explode/Explode_circle0001.png" id="2_bpdnr"] +[ext_resource type="Texture2D" uid="uid://rk73piti0qot" path="res://resource/sprite/effects/common/Smoke2.png" id="3_xt36q"] +[ext_resource type="Texture2D" uid="uid://cquv6nomd3tpf" path="res://resource/sprite/effects/explode/Explode_line0001.png" id="4_i3ry2"] + +[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_sk5lv"] +particles_animation = true +particles_anim_h_frames = 3 +particles_anim_v_frames = 1 +particles_anim_loop = false + +[sub_resource type="Gradient" id="Gradient_r2jo0"] +offsets = PackedFloat32Array(0.196911, 0.787645) +colors = PackedColorArray(0.862745, 0.862745, 0.862745, 0.741176, 0.34902, 0.34902, 0.34902, 0.933333) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_1neuh"] +gradient = SubResource("Gradient_r2jo0") + +[sub_resource type="Curve" id="Curve_2xqp4"] +_data = [Vector2(0, 0.516483), 0.0, 2.31551, 0, 0, Vector2(0.602787, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.274725), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_lbho4"] +curve = SubResource("Curve_2xqp4") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_8sxfm"] +particle_flag_disable_z = true +emission_shape = 3 +emission_box_extents = Vector3(5, 5, 5) +spread = 180.0 +initial_velocity_max = 30.0 +gravity = Vector3(0, 0, 0) +damping_max = 3.0 +scale_min = 0.5 +scale_curve = SubResource("CurveTexture_lbho4") +color_ramp = SubResource("GradientTexture1D_1neuh") +anim_offset_max = 1.0 + +[sub_resource type="Gradient" id="Gradient_36yod"] +offsets = PackedFloat32Array(0.196911, 0.791506) +colors = PackedColorArray(0.215686, 0.215686, 0.215686, 0.709804, 0.0196078, 0.0196078, 0.0196078, 0.537255) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_d3vr4"] +gradient = SubResource("Gradient_36yod") + +[sub_resource type="Curve" id="Curve_dvd5q"] +_data = [Vector2(0, 0.516483), 0.0, 2.31551, 0, 0, Vector2(0.602787, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.274725), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_anl6y"] +curve = SubResource("Curve_dvd5q") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_h3c43"] +particle_flag_disable_z = true +emission_shape = 3 +emission_box_extents = Vector3(4, 4, 4) +spread = 180.0 +initial_velocity_max = 25.0 +gravity = Vector3(0, 0, 0) +damping_max = 3.0 +scale_min = 1.3 +scale_max = 2.5 +scale_curve = SubResource("CurveTexture_anl6y") +color_ramp = SubResource("GradientTexture1D_d3vr4") +anim_offset_max = 1.0 + +[sub_resource type="Gradient" id="Gradient_wcvi2"] +offsets = PackedFloat32Array(0, 0.135135, 0.498069, 0.72973, 0.888031) +colors = PackedColorArray(1, 1, 1, 1, 0.976471, 0.862745, 0.34902, 0.843137, 1, 0.501961, 0.101961, 0.839216, 1, 0, 0, 0.690196, 0, 0, 0, 0.490196) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_ftewy"] +gradient = SubResource("Gradient_wcvi2") + +[sub_resource type="Curve" id="Curve_d4xab"] +_data = [Vector2(0, 0.318681), 0.0, 0.0, 0, 0, Vector2(0.146341, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.120879), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_pdvs3"] +curve = SubResource("Curve_d4xab") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_j41d3"] +lifetime_randomness = 0.5 +particle_flag_disable_z = true +spread = 180.0 +initial_velocity_max = 30.0 +gravity = Vector3(0, 0, 0) +damping_min = 0.5 +damping_max = 3.0 +scale_max = 2.0 +scale_curve = SubResource("CurveTexture_pdvs3") +color_ramp = SubResource("GradientTexture1D_ftewy") +anim_offset_max = 1.0 + +[sub_resource type="CircleShape2D" id="CircleShape2D_isein"] +resource_local_to_scene = true + +[sub_resource type="Animation" id="Animation_20asn"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Circle:visible") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Circle:frame") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Line:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Line:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("ParticlesSmoke2:emitting") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("ParticlesFire:emitting") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("ParticlesSmoke:emitting") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("CollisionShape2D:disabled") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} + +[sub_resource type="Animation" id="Animation_j6a2s"] +resource_name = "play" +length = 4.0 +step = 0.05 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Circle:visible") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.55), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Circle:frame") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.5), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0, 6] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Line:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0.15, 0.45), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Line:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0.15, 0.4), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0, 5] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("ParticlesSmoke2:emitting") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0.15), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("ParticlesFire:emitting") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("ParticlesSmoke:emitting") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0.15), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("CollisionShape2D:disabled") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0, 0.2), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [false, true] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_p6l6x"] +_data = { +"RESET": SubResource("Animation_20asn"), +"play": SubResource("Animation_j6a2s") +} + +[node name="Explode0001" type="Area2D"] +modulate = Color(1.3, 1.3, 1.3, 1) +z_index = 1 +collision_layer = 0 +monitorable = false +script = ExtResource("1_qn5pu") + +[node name="ParticlesSmoke" type="GPUParticles2D" parent="."] +material = SubResource("CanvasItemMaterial_sk5lv") +emitting = false +process_material = SubResource("ParticleProcessMaterial_8sxfm") +texture = ExtResource("3_xt36q") +one_shot = true +explosiveness = 0.6 +randomness = 1.0 + +[node name="ParticlesSmoke2" type="GPUParticles2D" parent="."] +material = SubResource("CanvasItemMaterial_sk5lv") +emitting = false +amount = 10 +process_material = SubResource("ParticleProcessMaterial_h3c43") +texture = ExtResource("1_ctx3v") +one_shot = true +explosiveness = 0.6 +randomness = 1.0 + +[node name="ParticlesFire" type="GPUParticles2D" parent="."] +material = SubResource("CanvasItemMaterial_sk5lv") +emitting = false +amount = 25 +process_material = SubResource("ParticleProcessMaterial_j41d3") +texture = ExtResource("1_ctx3v") +one_shot = true +explosiveness = 0.7 +randomness = 1.0 + +[node name="Circle" type="Sprite2D" parent="."] +texture = ExtResource("2_bpdnr") +hframes = 7 + +[node name="Line" type="Sprite2D" parent="."] +texture = ExtResource("4_i3ry2") +hframes = 6 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_isein") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_p6l6x") +} diff --git a/DungeonShooting_Godot/prefab/bullet/laser/Laser0001.tscn b/DungeonShooting_Godot/prefab/bullet/laser/Laser0001.tscn new file mode 100644 index 0000000..5117e12 --- /dev/null +++ b/DungeonShooting_Godot/prefab/bullet/laser/Laser0001.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=4 format=3 uid="uid://d1q8jjtgi2wpu"] + +[ext_resource type="Script" path="res://src/game/activity/bullet/laser/Laser.cs" id="1_3w0rp"] +[ext_resource type="Texture2D" uid="uid://clfpbq1c1ilp1" path="res://resource/sprite/bullet/laser/Laser0001.png" id="2_uqalj"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_l4vuk"] +resource_local_to_scene = true + +[node name="Laser0001" type="Area2D"] +collision_layer = 2 +monitorable = false +script = ExtResource("1_3w0rp") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_l4vuk") + +[node name="LineSprite" type="Sprite2D" parent="."] +modulate = Color(1.5, 1.5, 1.5, 1) +position = Vector2(0, 1.19209e-07) +texture = ExtResource("2_uqalj") +centered = false +offset = Vector2(0, -8) diff --git a/DungeonShooting_Godot/prefab/bullet/normal/Bullet0001.tscn b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0001.tscn new file mode 100644 index 0000000..740c1cd --- /dev/null +++ b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0001.tscn @@ -0,0 +1,71 @@ +[gd_scene load_steps=8 format=3 uid="uid://bj4kmvt8jg1cf"] + +[ext_resource type="Script" path="res://src/game/activity/bullet/normal/Bullet.cs" id="1_3d3df"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_mxa72"] +[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/normal/bullet0001.png" id="3_pm4pr"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_w5w0i"] +resource_local_to_scene = true +shader = ExtResource("2_mxa72") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_qhkgc"] +resource_local_to_scene = true +shader = ExtResource("2_mxa72") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="SpriteFrames" id="SpriteFrames_5wvmf"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3_pm4pr") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_lcqb8"] +size = Vector2(9, 4) + +[node name="Bullet0001" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +script = ExtResource("1_3d3df") +CollisionArea = NodePath("AnimatedSprite/CollisionArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_w5w0i") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) +material = SubResource("ShaderMaterial_qhkgc") +sprite_frames = SubResource("SpriteFrames_5wvmf") + +[node name="CollisionArea" type="Area2D" parent="AnimatedSprite"] +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="AnimatedSprite/CollisionArea"] +position = Vector2(2.93353, 0) +shape = SubResource("RectangleShape2D_lcqb8") + +[node name="Collision" type="CollisionShape2D" parent="."] +position = Vector2(1.5, 0) +shape = SubResource("RectangleShape2D_lcqb8") diff --git a/DungeonShooting_Godot/prefab/bullet/normal/Bullet0002.tscn b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0002.tscn new file mode 100644 index 0000000..b1a1813 --- /dev/null +++ b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0002.tscn @@ -0,0 +1,63 @@ +[gd_scene load_steps=8 format=3 uid="uid://bqkj0rn72ppge"] + +[ext_resource type="Script" path="res://src/game/activity/bullet/normal/Bullet.cs" id="1_hepay"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_0n2yg"] +[ext_resource type="SpriteFrames" uid="uid://bpeodjqiy3mil" path="res://resource/spriteFrames/bullet/Bullet0002.tres" id="3_ldd0h"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] +resource_local_to_scene = true +shader = ExtResource("2_0n2yg") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] +resource_local_to_scene = true +shader = ExtResource("2_0n2yg") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="CircleShape2D" id="CircleShape2D_0vxfv"] +radius = 3.0 + +[sub_resource type="CircleShape2D" id="CircleShape2D_e2yn3"] +radius = 3.0 + +[node name="Bullet0002" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +script = ExtResource("1_hepay") +CollisionArea = NodePath("AnimatedSprite/CollisionArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_v77gw") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) +material = SubResource("ShaderMaterial_p0wfd") +sprite_frames = ExtResource("3_ldd0h") + +[node name="CollisionArea" type="Area2D" parent="AnimatedSprite"] +visible = false +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="AnimatedSprite/CollisionArea"] +position = Vector2(-2.38419e-07, 0) +shape = SubResource("CircleShape2D_0vxfv") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_e2yn3") diff --git a/DungeonShooting_Godot/prefab/bullet/normal/Bullet0003.tscn b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0003.tscn new file mode 100644 index 0000000..65b9e2a --- /dev/null +++ b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0003.tscn @@ -0,0 +1,60 @@ +[gd_scene load_steps=7 format=3 uid="uid://ee24ocwk8snj"] + +[ext_resource type="Script" path="res://src/game/activity/bullet/normal/Bullet.cs" id="1_h6lfm"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_bteri"] +[ext_resource type="SpriteFrames" uid="uid://bcnhyin0aufl1" path="res://resource/spriteFrames/bullet/Bullet0003.tres" id="3_qvo0u"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] +resource_local_to_scene = true +shader = ExtResource("2_bteri") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] +resource_local_to_scene = true +shader = ExtResource("2_bteri") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_c0onq"] +size = Vector2(6, 3.125) + +[node name="Bullet0003" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +script = ExtResource("1_h6lfm") +CollisionArea = NodePath("AnimatedSprite/CollisionArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_v77gw") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.6, 1.6, 1.6, 1) +material = SubResource("ShaderMaterial_p0wfd") +sprite_frames = ExtResource("3_qvo0u") + +[node name="CollisionArea" type="Area2D" parent="AnimatedSprite"] +visible = false +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="AnimatedSprite/CollisionArea"] +position = Vector2(1, 0) +shape = SubResource("RectangleShape2D_c0onq") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_c0onq") diff --git a/DungeonShooting_Godot/prefab/bullet/normal/Bullet0004.tscn b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0004.tscn new file mode 100644 index 0000000..df7551b --- /dev/null +++ b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0004.tscn @@ -0,0 +1,97 @@ +[gd_scene load_steps=12 format=3 uid="uid://d0h4xfi1oqf1l"] + +[ext_resource type="Script" path="res://src/game/activity/bullet/normal/BoomBullet.cs" id="1_1jbgr"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_w1qob"] +[ext_resource type="SpriteFrames" uid="uid://d3vma1qjo478l" path="res://resource/spriteFrames/bullet/Bullet0004.tres" id="3_bttus"] +[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="3_ofn8c"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] +resource_local_to_scene = true +shader = ExtResource("2_w1qob") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0wfd"] +resource_local_to_scene = true +shader = ExtResource("2_w1qob") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_c0onq"] +size = Vector2(4, 4) + +[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_chi2i"] +particles_animation = true +particles_anim_h_frames = 3 +particles_anim_v_frames = 1 +particles_anim_loop = false + +[sub_resource type="Curve" id="Curve_dt320"] +_data = [Vector2(0, 0.730415), 0.0, 0.0, 0, 0, Vector2(0.245238, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.0235023), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_uftx4"] +curve = SubResource("Curve_dt320") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_kelfq"] +lifetime_randomness = 0.7 +particle_flag_disable_z = true +angle_max = 360.0 +spread = 180.0 +initial_velocity_min = 5.0 +initial_velocity_max = 15.0 +angular_velocity_max = 45.0 +gravity = Vector3(0, 0, 0) +scale_min = 0.15 +scale_max = 0.6 +scale_curve = SubResource("CurveTexture_uftx4") +color = Color(0.619608, 0.619608, 0.619608, 1) +anim_offset_max = 1.0 + +[node name="Bullet0003" type="CharacterBody2D" node_paths=PackedStringArray("Particles", "CollisionArea", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +script = ExtResource("1_1jbgr") +Particles = NodePath("AnimatedSprite/GPUParticles2D") +CollisionArea = NodePath("AnimatedSprite/CollisionArea") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_v77gw") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_p0wfd") +sprite_frames = ExtResource("3_bttus") +animation = &"move" +frame_progress = 0.0471243 + +[node name="CollisionArea" type="Area2D" parent="AnimatedSprite"] +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="AnimatedSprite/CollisionArea"] +position = Vector2(1, 0) +shape = SubResource("RectangleShape2D_c0onq") + +[node name="GPUParticles2D" type="GPUParticles2D" parent="AnimatedSprite"] +material = SubResource("CanvasItemMaterial_chi2i") +amount = 10 +process_material = SubResource("ParticleProcessMaterial_kelfq") +texture = ExtResource("3_ofn8c") +lifetime = 0.5 + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_c0onq") diff --git a/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn b/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn index 9f4e524..9159fe4 100644 --- a/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn +++ b/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn @@ -2,9 +2,9 @@ [ext_resource type="Material" uid="uid://c1chld6lkpgji" path="res://resource/material/SmokeParticleMaterial.tres" id="1_dxavj"] [ext_resource type="Texture2D" uid="uid://bs1lan5uwxyfg" path="res://resource/curve/Curve1.tres" id="1_s60r7"] -[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/Smoke.png" id="2_3kyig"] -[ext_resource type="Texture2D" uid="uid://csud4e6kc3iku" path="res://resource/sprite/effects/Effect1.png" id="3_1mceu"] -[ext_resource type="Script" path="res://src/game/effects/Effect1.cs" id="3_ax5u4"] +[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="2_3kyig"] +[ext_resource type="Texture2D" uid="uid://csud4e6kc3iku" path="res://resource/sprite/effects/common/Effect1.png" id="3_1mceu"] +[ext_resource type="Script" path="res://src/game/effects/AutoDestroyParticles.cs" id="3_2tlhx"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_ipadv"] particles_animation = true @@ -16,16 +16,14 @@ particle_flag_align_y = true particle_flag_disable_z = true spread = 180.0 -gravity = Vector3(0, 0, 0) initial_velocity_min = 40.0 initial_velocity_max = 70.0 -orbit_velocity_min = 0.0 -orbit_velocity_max = 0.0 +gravity = Vector3(0, 0, 0) scale_min = 0.2 scale_max = 0.3 scale_curve = ExtResource("1_s60r7") -[node name="Effect1" type="GPUParticles2D"] +[node name="Effect1" type="GPUParticles2D" node_paths=PackedStringArray("Particles2D")] modulate = Color(0.760784, 0.760784, 0.760784, 0.533333) z_index = 5 material = SubResource("CanvasItemMaterial_ipadv") @@ -37,10 +35,13 @@ one_shot = true explosiveness = 1.0 fixed_fps = 20 -script = ExtResource("3_ax5u4") +script = ExtResource("3_2tlhx") +Particles2D = [NodePath("GPUParticles2D")] [node name="GPUParticles2D" type="GPUParticles2D" parent="."] emitting = false +amount = 6 +amount_ratio = 0.8 process_material = SubResource("ParticleProcessMaterial_p8jst") texture = ExtResource("3_1mceu") lifetime = 0.5 diff --git a/DungeonShooting_Godot/prefab/effect/enemy/Effect0001.tscn b/DungeonShooting_Godot/prefab/effect/enemy/Effect0001.tscn index 6b7176e..1dcd443 100644 --- a/DungeonShooting_Godot/prefab/effect/enemy/Effect0001.tscn +++ b/DungeonShooting_Godot/prefab/effect/enemy/Effect0001.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=30 format=3 uid="uid://pr88a1phtxgb"] +[gd_scene load_steps=31 format=3 uid="uid://pr88a1phtxgb"] -[ext_resource type="Script" path="res://src/game/effects/EnemyDebris.cs" id="1_ttosm"] +[ext_resource type="Script" path="res://src/game/effects/enemy/EnemyDebris.cs" id="1_ttosm"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_h62s7"] [ext_resource type="Texture2D" uid="uid://cn64eauvwx1uj" path="res://resource/sprite/role/enemy0001/enemy0001_Debris.png" id="3_6ewaj"] [ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="4_wu0t6"] @@ -14,6 +14,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_08fn3"] shader = ExtResource("2_h62s7") @@ -23,6 +24,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="AtlasTexture" id="AtlasTexture_cldwb"] atlas = ExtResource("3_6ewaj") @@ -144,6 +146,9 @@ "speed": 5.0 }] +[sub_resource type="CircleShape2D" id="CircleShape2D_0xl2q"] +radius = 4.0 + [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_p3lv8"] particles_animation = true particles_anim_h_frames = 3 @@ -165,10 +170,8 @@ [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ku1mm"] particle_flag_disable_z = true -gravity = Vector3(0, 0, 0) -orbit_velocity_min = 0.0 -orbit_velocity_max = 0.0 angle_max = 360.0 +gravity = Vector3(0, 0, 0) scale_min = 0.4 scale_max = 1.5 scale_curve = SubResource("CurveTexture_rutlp") @@ -177,6 +180,7 @@ anim_offset_max = 1.0 [node name="Effect0001" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 128 script = ExtResource("1_ttosm") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") @@ -191,6 +195,7 @@ sprite_frames = SubResource("SpriteFrames_15g84") [node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_0xl2q") [node name="GPUParticles2D" type="GPUParticles2D" parent="."] material = SubResource("CanvasItemMaterial_p3lv8") diff --git a/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn b/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn index 8b4aa0a..94e488c 100644 --- a/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn +++ b/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn @@ -10,7 +10,7 @@ particles_anim_v_frames = 1 particles_anim_loop = false -[node name="EnemyBloodEffect" type="GPUParticles2D"] +[node name="EnemyBloodEffect" type="GPUParticles2D" node_paths=PackedStringArray("Particles2D")] modulate = Color(0.811765, 0.0980392, 0.0980392, 0.627451) material = SubResource("CanvasItemMaterial_emuda") emitting = false @@ -22,4 +22,5 @@ explosiveness = 1.0 fixed_fps = 20 script = ExtResource("3_5cpi6") -DelayTime = 1.5 +DelayTime = 2.0 +Particles2D = [] diff --git a/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn b/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn index 6572e0c..0f40391 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/BulletDisappear.tscn @@ -56,13 +56,11 @@ [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_r1yeu"] lifetime_randomness = 0.3 particle_flag_disable_z = true +angle_max = 360.0 spread = 180.0 -gravity = Vector3(0, 0, 0) initial_velocity_min = 45.0 initial_velocity_max = 65.0 -orbit_velocity_min = 0.0 -orbit_velocity_max = 0.0 -angle_max = 360.0 +gravity = Vector3(0, 0, 0) scale_min = 0.3 scale_max = 0.6 scale_curve = SubResource("CurveTexture_j77i6") @@ -74,7 +72,6 @@ z_index = -4 scale = Vector2(0.5, 0.5) sprite_frames = SubResource("SpriteFrames_ub3cw") -autoplay = "default" script = ExtResource("2_l2qlq") DelayTime = 0.3 Particles2D = [NodePath("GPUParticles2D")] diff --git a/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn b/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn index d13cf17..a6c4f6b 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/BulletSmoke.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=9 format=3 uid="uid://b8ogu2l8pa70y"] +[gd_scene load_steps=7 format=3 uid="uid://b8ogu2l8pa70y"] [ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="1"] [ext_resource type="Texture2D" uid="uid://bs1lan5uwxyfg" path="res://resource/curve/Curve1.tres" id="1_8pe88"] -[ext_resource type="Texture2D" uid="uid://dwa4chrugc6b1" path="res://resource/sprite/effects/weapon/Collision1.png" id="2"] +[ext_resource type="SpriteFrames" uid="uid://pwg2tx7dmcvp" path="res://resource/spriteFrames/effect/weapon/Collision1.tres" id="1_r62v8"] +[ext_resource type="Script" path="res://src/game/effects/AutoDestroySprite.cs" id="2_r547d"] [sub_resource type="CanvasItemMaterial" id="1"] particles_animation = true @@ -13,116 +14,22 @@ [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_gpp81"] lifetime_randomness = 0.5 particle_flag_disable_z = true -spread = 25.0 -gravity = Vector3(0, 0, 0) -initial_velocity_max = 90.0 -orbit_velocity_min = 0.0 -orbit_velocity_max = 0.0 angle_max = 360.0 +spread = 25.0 +initial_velocity_max = 90.0 +gravity = Vector3(0, 0, 0) scale_curve = ExtResource("1_8pe88") color = Color(0.75, 0.75, 0.75, 0.470588) anim_offset_max = 1.0 -[sub_resource type="Animation" id="5"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:emitting") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [false] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D:frame") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D:visible") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [true] -} +[node name="BulletSmoke" type="AnimatedSprite2D" node_paths=PackedStringArray("Particles2D")] +sprite_frames = ExtResource("1_r62v8") +offset = Vector2(8, 0) +script = ExtResource("2_r547d") +Particles2D = [NodePath("GpuParticles2D")] -[sub_resource type="Animation" id="6"] -resource_name = "Smoke" -step = 0.05 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:emitting") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.05), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [true, false] -} -tracks/1/type = "method" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath(".") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(1), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"queue_free" -}] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D:frame") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 0.05, 0.1, 0.15), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 1, -"values": [0, 1, 2, 3] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Sprite2D:visible") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0, 0.2), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [true, false] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_uuiu7"] -_data = { -"RESET": SubResource("5"), -"Smoke": SubResource("6") -} - -[node name="BulletSmoke" type="GPUParticles2D"] +[node name="GpuParticles2D" type="GPUParticles2D" parent="."] +show_behind_parent = true material = SubResource("1") emitting = false process_material = SubResource("ParticleProcessMaterial_gpp81") @@ -131,15 +38,3 @@ one_shot = true explosiveness = 0.9 fixed_fps = 20 - -[node name="Sprite2D" type="Sprite2D" parent="."] -modulate = Color(1.6, 1.6, 1.6, 1) -texture = ExtResource("2") -offset = Vector2(8, 0) -hframes = 4 - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_uuiu7") -} -autoplay = "Smoke" diff --git a/DungeonShooting_Godot/prefab/effect/weapon/FirePart.tscn b/DungeonShooting_Godot/prefab/effect/weapon/FirePart.tscn deleted file mode 100644 index 629586a..0000000 --- a/DungeonShooting_Godot/prefab/effect/weapon/FirePart.tscn +++ /dev/null @@ -1,13 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://bh6vo2i6x7lmj"] - -[sub_resource type="ParticleProcessMaterial" id="1"] -spread = 60.0 -gravity = Vector3(0, 0, 0) - -[node name="FirePart" type="GPUParticles2D"] -emitting = false -amount = 10 -process_material = SubResource("1") -lifetime = 0.2 -one_shot = true -explosiveness = 1.0 diff --git a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn index 9d50730..b8b60dc 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn @@ -39,8 +39,8 @@ "speed": 20.0 }] -[node name="MeleeAttack1" type="AnimatedSprite2D"] +[node name="MeleeAttack1" type="AnimatedSprite2D" node_paths=PackedStringArray("Particles2D")] sprite_frames = SubResource("SpriteFrames_hkcv6") -autoplay = "default" script = ExtResource("2_bjagc") DelayTime = 0.2 +Particles2D = [] diff --git a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack2.tscn b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack2.tscn index 3796f4a..307a111 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack2.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack2.tscn @@ -3,8 +3,8 @@ [ext_resource type="SpriteFrames" uid="uid://dj8o7ws03bik4" path="res://resource/spriteFrames/effect/KnifeHit1.tres" id="1_ds7pw"] [ext_resource type="Script" path="res://src/game/effects/AutoDestroySprite.cs" id="2_hl3gp"] -[node name="MeleeAttack2" type="AnimatedSprite2D"] +[node name="MeleeAttack2" type="AnimatedSprite2D" node_paths=PackedStringArray("Particles2D")] sprite_frames = ExtResource("1_ds7pw") -autoplay = "default" script = ExtResource("2_hl3gp") DelayTime = 0.12 +Particles2D = [] diff --git a/DungeonShooting_Godot/prefab/effect/weapon/ShotFire.tscn b/DungeonShooting_Godot/prefab/effect/weapon/ShotFire.tscn index b0161a5..2e53592 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/ShotFire.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/ShotFire.tscn @@ -39,10 +39,10 @@ "speed": 20.0 }] -[node name="ShotFire" type="AnimatedSprite2D"] +[node name="ShotFire" type="AnimatedSprite2D" node_paths=PackedStringArray("Particles2D")] modulate = Color(1.6, 1.6, 1.6, 1) sprite_frames = SubResource("SpriteFrames_73j16") -autoplay = "default" offset = Vector2(8, 0) script = ExtResource("2_lnwju") DelayTime = 0.2 +Particles2D = [] diff --git a/DungeonShooting_Godot/prefab/effect/weapon/ShotFire2.tscn b/DungeonShooting_Godot/prefab/effect/weapon/ShotFire2.tscn new file mode 100644 index 0000000..7073dc9 --- /dev/null +++ b/DungeonShooting_Godot/prefab/effect/weapon/ShotFire2.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=8 format=3 uid="uid://drcvbo0xam6q"] + +[ext_resource type="Texture2D" uid="uid://cj8gb5dxnk8ov" path="res://resource/sprite/effects/weapon/ShotFire2.png" id="1_ljjfn"] +[ext_resource type="Script" path="res://src/game/effects/AutoDestroySprite.cs" id="2_4ecjw"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_2nk6j"] +atlas = ExtResource("1_ljjfn") +region = Rect2(0, 0, 9, 11) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ht7ag"] +atlas = ExtResource("1_ljjfn") +region = Rect2(9, 0, 9, 11) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jwqy0"] +atlas = ExtResource("1_ljjfn") +region = Rect2(18, 0, 9, 11) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ud7n7"] +atlas = ExtResource("1_ljjfn") +region = Rect2(27, 0, 9, 11) + +[sub_resource type="SpriteFrames" id="SpriteFrames_rry1m"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_2nk6j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ht7ag") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jwqy0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ud7n7") +}], +"loop": false, +"name": &"default", +"speed": 20.0 +}] + +[node name="ShotFire2" type="AnimatedSprite2D" node_paths=PackedStringArray("Particles2D")] +modulate = Color(1.6, 1.6, 1.6, 1) +sprite_frames = SubResource("SpriteFrames_rry1m") +offset = Vector2(5.5, 0) +script = ExtResource("2_4ecjw") +DelayTime = 0.2 +Particles2D = [] diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn index 3a07eb2..2631c7c 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_E.tscn @@ -14,6 +14,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_t4ayq"] resource_local_to_scene = true @@ -24,6 +25,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_opsb6"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn index 52a7d64..0c6565e 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn @@ -13,6 +13,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_t4ayq"] resource_local_to_scene = true @@ -23,6 +24,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_opsb6"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn index 6c07aba..a2996d7 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn @@ -13,6 +13,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_t4ayq"] resource_local_to_scene = true @@ -23,6 +24,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_opsb6"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn index d3c5a08..727c632 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_W.tscn @@ -14,6 +14,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_t4ayq"] resource_local_to_scene = true @@ -24,6 +25,7 @@ shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_2ko2r"] resource_local_to_scene = true diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0001.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0001.tscn index ebbb22c..831a585 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0001.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0001.tscn @@ -1,9 +1,10 @@ [gd_scene load_steps=7 format=3 uid="uid://tdc6flkvlfbd"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0001.cs" id="1_exxhd"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0001.cs" id="1_exxhd"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_x6ey2"] [ext_resource type="SpriteFrames" uid="uid://wtvfyprel72y" path="res://resource/spriteFrames/prop/buff/BuffProp0001.tres" id="3_hfyao"] + [sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] resource_local_to_scene = true shader = ExtResource("2_x6ey2") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0002.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0002.tscn index 7ef2c07..72073ce 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0002.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0002.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=7 format=3 uid="uid://da131v16ct8c4"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_2qy1s"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0002.cs" id="1_5ouvd"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0002.cs" id="1_5ouvd"] [ext_resource type="SpriteFrames" uid="uid://7t57gsyff470" path="res://resource/spriteFrames/prop/buff/BuffProp0002.tres" id="3_v4alm"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] @@ -9,20 +9,22 @@ shader = ExtResource("1_2qy1s") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_2qy1s") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0003.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0003.tscn index 46f564b..d7b5f4a 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0003.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0003.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://ds21gbw4wyvn6"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0003.cs" id="1_h8d6p"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0003.cs" id="1_h8d6p"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_udh4b"] [ext_resource type="SpriteFrames" uid="uid://nqoieett75t3" path="res://resource/spriteFrames/prop/buff/BuffProp0003.tres" id="3_h72sh"] @@ -9,20 +9,22 @@ shader = ExtResource("1_udh4b") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_udh4b") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0004.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0004.tscn index 58d9d29..d4a225f 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0004.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0004.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://cq8edil51uccc"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0004.cs" id="1_7bt71"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0004.cs" id="1_7bt71"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_j7hva"] [ext_resource type="SpriteFrames" uid="uid://bj0k3pipwp46x" path="res://resource/spriteFrames/prop/buff/BuffProp0004.tres" id="3_pdaqp"] @@ -9,20 +9,22 @@ shader = ExtResource("1_j7hva") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_j7hva") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0005.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0005.tscn index 741717b..8996076 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0005.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0005.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://3xtqrx17y14p"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0005.cs" id="1_6dlc2"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0005.cs" id="1_6dlc2"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_qa4yg"] [ext_resource type="SpriteFrames" uid="uid://bvqp46degt1rg" path="res://resource/spriteFrames/prop/buff/BuffProp0005.tres" id="3_1mcnn"] @@ -9,20 +9,22 @@ shader = ExtResource("1_qa4yg") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_qa4yg") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0006.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0006.tscn index 41ecf02..bfd6bbc 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0006.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0006.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://bfc03e4aftg21"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0006.cs" id="1_2cooj"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0006.cs" id="1_2cooj"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_c1mo1"] [ext_resource type="SpriteFrames" uid="uid://bxn65oovekw6k" path="res://resource/spriteFrames/prop/buff/BuffProp0006.tres" id="3_nd6lq"] @@ -9,20 +9,22 @@ shader = ExtResource("1_c1mo1") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_c1mo1") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0007.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0007.tscn index 6598520..480eb36 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0007.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0007.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://cwfuv68ijkmfg"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0007.cs" id="1_71c3m"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0007.cs" id="1_71c3m"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_ofs5v"] [ext_resource type="SpriteFrames" uid="uid://et840sb4d1g3" path="res://resource/spriteFrames/prop/buff/BuffProp0007.tres" id="3_xxla0"] @@ -9,20 +9,22 @@ shader = ExtResource("1_ofs5v") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_ofs5v") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0008.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0008.tscn index a29d7cd..9bf79ea 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0008.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0008.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://cn1tmegrfgr8h"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0008.cs" id="1_b5ys1"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0008.cs" id="1_b5ys1"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_tdrqb"] [ext_resource type="SpriteFrames" uid="uid://bs41p1hpkpucb" path="res://resource/spriteFrames/prop/buff/BuffProp0008.tres" id="3_5noil"] @@ -9,20 +9,22 @@ shader = ExtResource("1_tdrqb") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_tdrqb") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0009.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0009.tscn index 7955262..d9d0e97 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0009.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0009.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=7 format=3 uid="uid://gh0dxgvshwpm"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0009.cs" id="1_e1yrg"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0009.cs" id="1_e1yrg"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_eq0bc"] [ext_resource type="SpriteFrames" uid="uid://sqcibio78nwc" path="res://resource/spriteFrames/prop/buff/BuffProp0009.tres" id="3_qrjbu"] @@ -9,20 +9,22 @@ shader = ExtResource("1_eq0bc") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_eq0bc") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0010.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0010.tscn index 49eb575..cc67fe2 100644 --- a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0010.tscn +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0010.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=7 format=3 uid="uid://do5mmmapnyxg4"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_5yy3i"] -[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffPropProp0010.cs" id="1_q6g7l"] +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0010.cs" id="1_q6g7l"] [ext_resource type="SpriteFrames" uid="uid://dxqtm7xgn2wms" path="res://resource/spriteFrames/prop/buff/BuffProp0010.tres" id="3_i5q7j"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] @@ -9,20 +9,22 @@ shader = ExtResource("1_5yy3i") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] resource_local_to_scene = true shader = ExtResource("1_5yy3i") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] size = Vector2(12, 10) diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0011.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0011.tscn new file mode 100644 index 0000000..7b64167 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0011.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=7 format=3 uid="uid://bs3ysp1587xqe"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0011.cs" id="1_dnyh3"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_d5gcm"] +[ext_resource type="SpriteFrames" uid="uid://bq7t8ruav5g41" path="res://resource/spriteFrames/prop/buff/BuffProp0011.tres" id="3_hrxu3"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_d5gcm") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_d5gcm") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="BuffProp0011" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_dnyh3") +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_hrxu3") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0012.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0012.tscn new file mode 100644 index 0000000..66f64ca --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0012.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=7 format=3 uid="uid://ph6x3vmkp11j"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0012.cs" id="1_w2r3p"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_kwnd5"] +[ext_resource type="SpriteFrames" uid="uid://rksmm8jwex7l" path="res://resource/spriteFrames/prop/buff/BuffProp0012.tres" id="3_fijh4"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_kwnd5") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_kwnd5") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="BuffProp0012" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_w2r3p") +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_fijh4") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0013.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0013.tscn new file mode 100644 index 0000000..8adb67b --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0013.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=7 format=3 uid="uid://di6874mbwbpkd"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0013.cs" id="1_iy1yu"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_n5bm6"] +[ext_resource type="SpriteFrames" uid="uid://cdnrqfy0vfyu5" path="res://resource/spriteFrames/prop/buff/BuffProp0013.tres" id="3_4qjjr"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_n5bm6") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_n5bm6") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="BuffProp0013" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_iy1yu") +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_4qjjr") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_cpqup") diff --git a/DungeonShooting_Godot/prefab/prop/buff/BuffProp0014.tscn b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0014.tscn new file mode 100644 index 0000000..757b675 --- /dev/null +++ b/DungeonShooting_Godot/prefab/prop/buff/BuffProp0014.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=7 format=3 uid="uid://dw2tt5urcxtxe"] + +[ext_resource type="Script" path="res://src/game/activity/prop/buff/BuffProp0014.cs" id="1_3n5b4"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_ts4j6"] +[ext_resource type="SpriteFrames" uid="uid://ux70kddi6wwy" path="res://resource/spriteFrames/prop/buff/BuffProp0014.tres" id="3_byb1t"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mrkt4"] +resource_local_to_scene = true +shader = ExtResource("2_ts4j6") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_b6ii6"] +resource_local_to_scene = true +shader = ExtResource("2_ts4j6") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_cpqup"] +size = Vector2(12, 10) + +[node name="BuffProp0014" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_3n5b4") +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_byb1t") + +[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 866f829..7326d5a 100644 --- a/DungeonShooting_Godot/prefab/role/Enemy0001.tscn +++ b/DungeonShooting_Godot/prefab/role/Enemy0001.tscn @@ -1,11 +1,11 @@ -[gd_scene load_steps=7 format=3 uid="uid://dbrig6dq441wo"] +[gd_scene load_steps=7 format=3 uid="uid://b8s1dgu63fddf"] -[ext_resource type="PackedScene" uid="uid://cyrcv2jdgr8cf" path="res://prefab/role/RoleTemplate.tscn" id="1_5po38"] -[ext_resource type="Script" path="res://src/game/activity/role/enemy/Enemy.cs" id="2_1plrq"] +[ext_resource type="PackedScene" uid="uid://dbrig6dq441wo" path="res://prefab/role/template/AdvancedEnemyTemplate.tscn" id="1_2vqwe"] +[ext_resource type="Script" path="res://src/game/activity/role/enemy/AdvancedEnemy.cs" id="2_thbey"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_x8agd"] -[ext_resource type="SpriteFrames" uid="uid://cnctpyrn02rhd" path="res://resource/spriteFrames/role/Role1001.tres" id="4_qv8w5"] +[ext_resource type="SpriteFrames" uid="uid://cnctpyrn02rhd" path="res://resource/spriteFrames/role/Enemy0001.tres" id="4_qv8w5"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_8vxx6"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_f7y56"] resource_local_to_scene = true shader = ExtResource("3_x8agd") shader_parameter/blend = Color(0, 0, 0, 0.470588) @@ -16,7 +16,7 @@ shader_parameter/outline_rainbow = false shader_parameter/outline_use_blend = true -[sub_resource type="ShaderMaterial" id="ShaderMaterial_k8mt5"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2kup1"] resource_local_to_scene = true shader = ExtResource("3_x8agd") shader_parameter/blend = Color(1, 1, 1, 1) @@ -27,38 +27,26 @@ shader_parameter/outline_rainbow = false shader_parameter/outline_use_blend = true -[node name="Enemy0001" node_paths=PackedStringArray("HurtArea", "HurtCollision", "MountPoint", "BackMountPoint", "InteractiveArea", "InteractiveCollision", "MeleeAttackArea", "MeleeAttackCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_5po38")] -collision_layer = 16 -collision_mask = 25 -script = ExtResource("2_1plrq") -HurtArea = NodePath("HurtArea") -HurtCollision = NodePath("HurtArea/HurtCollision") +[node name="Enemy0001" node_paths=PackedStringArray("ViewRay", "NavigationAgent2D", "NavigationPoint", "MountPoint", "BackMountPoint", "MeleeAttackArea", "MeleeAttackCollision", "HurtArea", "HurtCollision", "InteractiveArea", "InteractiveCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_2vqwe")] +script = ExtResource("2_thbey") +ViewRay = NodePath("ViewRay") +NavigationAgent2D = NodePath("NavigationPoint/NavigationAgent2D") +NavigationPoint = NodePath("NavigationPoint") MountPoint = NodePath("MountPoint") BackMountPoint = NodePath("BackMountPoint") -InteractiveArea = NodePath("InteractiveArea") -InteractiveCollision = NodePath("InteractiveArea/InteractiveCollision") MeleeAttackArea = NodePath("MountPoint/MeleeAttackArea") MeleeAttackCollision = NodePath("MountPoint/MeleeAttackArea/MeleeAttackCollision") +HurtArea = NodePath("HurtArea") +HurtCollision = NodePath("HurtArea/HurtCollision") +InteractiveArea = NodePath("InteractiveArea") +InteractiveCollision = NodePath("InteractiveArea/InteractiveCollision") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") [node name="ShadowSprite" parent="." index="0"] -material = SubResource("ShaderMaterial_8vxx6") +material = SubResource("ShaderMaterial_f7y56") [node name="AnimatedSprite" parent="." index="2"] -material = SubResource("ShaderMaterial_k8mt5") +material = SubResource("ShaderMaterial_2kup1") sprite_frames = ExtResource("4_qv8w5") -animation = &"run" - -[node name="ViewRay" type="RayCast2D" parent="." index="6"] -position = Vector2(0, -8) -enabled = false - -[node name="NavigationPoint" type="Marker2D" parent="." index="8"] -position = Vector2(0, -5) - -[node name="NavigationAgent2D" type="NavigationAgent2D" parent="NavigationPoint" index="0"] -path_desired_distance = 3.0 -target_desired_distance = 3.0 -radius = 20.0 diff --git a/DungeonShooting_Godot/prefab/role/Enemy0002.tscn b/DungeonShooting_Godot/prefab/role/Enemy0002.tscn new file mode 100644 index 0000000..c9fd918 --- /dev/null +++ b/DungeonShooting_Godot/prefab/role/Enemy0002.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=7 format=3 uid="uid://b5r3hd8kv2wmd"] + +[ext_resource type="PackedScene" uid="uid://dxeqcssparqoo" path="res://prefab/role/template/EnemyTemplate.tscn" id="1_rikvp"] +[ext_resource type="Script" path="res://src/game/activity/role/enemy/Enemy.cs" id="2_wjtfl"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_gr4gs"] +[ext_resource type="SpriteFrames" uid="uid://ctpkpxgcwb583" path="res://resource/spriteFrames/role/Enemy0002.tres" id="4_ehtyi"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7theg"] +resource_local_to_scene = true +shader = ExtResource("3_gr4gs") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ntjmx"] +resource_local_to_scene = true +shader = ExtResource("3_gr4gs") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[node name="Enemy0002" node_paths=PackedStringArray("ViewRay", "NavigationAgent2D", "NavigationPoint", "HurtArea", "HurtCollision", "InteractiveArea", "InteractiveCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_rikvp")] +script = ExtResource("2_wjtfl") +ViewRay = NodePath("ViewRay") +NavigationAgent2D = NodePath("NavigationPoint/NavigationAgent2D") +NavigationPoint = NodePath("NavigationPoint") +HurtArea = NodePath("HurtArea") +HurtCollision = NodePath("HurtArea/HurtCollision") +InteractiveArea = NodePath("InteractiveArea") +InteractiveCollision = NodePath("InteractiveArea/InteractiveCollision") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_7theg") + +[node name="AnimatedSprite" parent="." index="1"] +material = SubResource("ShaderMaterial_ntjmx") +position = Vector2(0, -10) +sprite_frames = ExtResource("4_ehtyi") diff --git a/DungeonShooting_Godot/prefab/role/Role0001.tscn b/DungeonShooting_Godot/prefab/role/Role0001.tscn index 3da3053..97d017d 100644 --- a/DungeonShooting_Godot/prefab/role/Role0001.tscn +++ b/DungeonShooting_Godot/prefab/role/Role0001.tscn @@ -1,6 +1,6 @@ [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="PackedScene" uid="uid://cyrcv2jdgr8cf" path="res://prefab/role/template/AdvancedRoleTemplate.tscn" id="1_10c2n"] [ext_resource type="Script" path="res://src/game/activity/role/player/Player.cs" id="2_6xwnt"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_rk4gg"] [ext_resource type="SpriteFrames" uid="uid://n11thtali6es" path="res://resource/spriteFrames/role/Role0001.tres" id="4_galcc"] @@ -14,6 +14,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_8hgu2"] resource_local_to_scene = true @@ -24,18 +25,19 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true -[node name="Role0001" node_paths=PackedStringArray("HurtArea", "HurtCollision", "MountPoint", "BackMountPoint", "InteractiveArea", "InteractiveCollision", "MeleeAttackArea", "MeleeAttackCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_10c2n")] +[node name="Role0001" node_paths=PackedStringArray("MountPoint", "BackMountPoint", "MeleeAttackArea", "MeleeAttackCollision", "HurtArea", "HurtCollision", "InteractiveArea", "InteractiveCollision", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_10c2n")] collision_layer = 8 script = ExtResource("2_6xwnt") -HurtArea = NodePath("HurtArea") -HurtCollision = NodePath("HurtArea/HurtCollision") MountPoint = NodePath("MountPoint") BackMountPoint = NodePath("BackMountPoint") -InteractiveArea = NodePath("InteractiveArea") -InteractiveCollision = NodePath("InteractiveArea/InteractiveCollision") MeleeAttackArea = NodePath("MountPoint/MeleeAttackArea") MeleeAttackCollision = NodePath("MountPoint/MeleeAttackArea/MeleeAttackCollision") +HurtArea = NodePath("HurtArea") +HurtCollision = NodePath("HurtArea/HurtCollision") +InteractiveArea = NodePath("InteractiveArea") +InteractiveCollision = NodePath("InteractiveArea/InteractiveCollision") ShadowSprite = NodePath("ShadowSprite") AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") @@ -46,3 +48,4 @@ [node name="AnimatedSprite" parent="." index="2"] material = SubResource("ShaderMaterial_8hgu2") sprite_frames = ExtResource("4_galcc") +frame_progress = 0.658799 diff --git a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn b/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn deleted file mode 100644 index 559a842..0000000 --- a/DungeonShooting_Godot/prefab/role/RoleTemplate.tscn +++ /dev/null @@ -1,80 +0,0 @@ -[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/activity/role/MountRotation.cs" id="2_5ddpw"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_v2kfw"] -resource_local_to_scene = true -shader = ExtResource("1_xk5yk") -shader_parameter/blend = Color(0, 0, 0, 0.470588) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_yif6x"] -resource_local_to_scene = true -shader = ExtResource("1_xk5yk") -shader_parameter/blend = Color(1, 1, 1, 1) -shader_parameter/schedule = 0.0 -shader_parameter/modulate = Color(1, 1, 1, 1) -shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0, 0, 0, 1) -shader_parameter/outline_rainbow = false - -[sub_resource type="CircleShape2D" id="CircleShape2D_5pj80"] -radius = 4.0 - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_1eja2"] -size = Vector2(12, 18) - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_n68nu"] -size = Vector2(10, 16.5) - -[node name="RoleTemplate" type="CharacterBody2D"] - -[node name="ShadowSprite" type="Sprite2D" parent="."] -z_index = -1 -material = SubResource("ShaderMaterial_v2kfw") - -[node name="BackMountPoint" type="Marker2D" parent="."] -position = Vector2(0, -12) - -[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] -material = SubResource("ShaderMaterial_yif6x") -position = Vector2(0, -12) - -[node name="Collision" type="CollisionShape2D" parent="."] -position = Vector2(0, -4) -shape = SubResource("CircleShape2D_5pj80") - -[node name="HurtArea" type="Area2D" parent="."] -collision_layer = 0 -collision_mask = 0 -monitoring = false - -[node name="HurtCollision" type="CollisionShape2D" parent="HurtArea"] -position = Vector2(0, -9) -shape = SubResource("RectangleShape2D_1eja2") - -[node name="InteractiveArea" type="Area2D" parent="."] -visible = false -collision_layer = 0 -collision_mask = 4 -monitorable = false - -[node name="InteractiveCollision" type="CollisionShape2D" parent="InteractiveArea"] -position = Vector2(0, -5) -shape = SubResource("RectangleShape2D_n68nu") - -[node name="MountPoint" type="Marker2D" parent="."] -position = Vector2(2, -8) -script = ExtResource("2_5ddpw") - -[node name="MeleeAttackArea" type="Area2D" parent="MountPoint"] -collision_layer = 0 -collision_mask = 0 -monitorable = false - -[node name="MeleeAttackCollision" type="CollisionPolygon2D" parent="MountPoint/MeleeAttackArea"] diff --git a/DungeonShooting_Godot/prefab/role/template/AdvancedEnemyTemplate.tscn b/DungeonShooting_Godot/prefab/role/template/AdvancedEnemyTemplate.tscn new file mode 100644 index 0000000..b02e44a --- /dev/null +++ b/DungeonShooting_Godot/prefab/role/template/AdvancedEnemyTemplate.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=5 format=3 uid="uid://dbrig6dq441wo"] + +[ext_resource type="PackedScene" uid="uid://cyrcv2jdgr8cf" path="res://prefab/role/template/AdvancedRoleTemplate.tscn" id="1_5po38"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_x8agd"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_8vxx6"] +resource_local_to_scene = true +shader = ExtResource("3_x8agd") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_k8mt5"] +resource_local_to_scene = true +shader = ExtResource("3_x8agd") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[node name="AdvancedEnemyTemplate" instance=ExtResource("1_5po38")] +collision_layer = 16 +collision_mask = 25 + +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_8vxx6") + +[node name="AnimatedSprite" parent="." index="2"] +material = SubResource("ShaderMaterial_k8mt5") + +[node name="ViewRay" type="RayCast2D" parent="." index="6"] +position = Vector2(0, -8) +enabled = false + +[node name="NavigationPoint" type="Marker2D" parent="." index="8"] +position = Vector2(0, -5) + +[node name="NavigationAgent2D" type="NavigationAgent2D" parent="NavigationPoint" index="0"] +path_desired_distance = 3.0 +target_desired_distance = 3.0 +radius = 20.0 diff --git a/DungeonShooting_Godot/prefab/role/template/AdvancedRoleTemplate.tscn b/DungeonShooting_Godot/prefab/role/template/AdvancedRoleTemplate.tscn new file mode 100644 index 0000000..2394511 --- /dev/null +++ b/DungeonShooting_Godot/prefab/role/template/AdvancedRoleTemplate.tscn @@ -0,0 +1,83 @@ +[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/activity/role/MountRotation.cs" id="2_5ddpw"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v2kfw"] +resource_local_to_scene = true +shader = ExtResource("1_xk5yk") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_yif6x"] +resource_local_to_scene = true +shader = ExtResource("1_xk5yk") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="CircleShape2D" id="CircleShape2D_5pj80"] +radius = 4.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1eja2"] +size = Vector2(12, 18) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_n68nu"] +size = Vector2(10, 16.5) + +[node name="AdvancedRoleTemplate" type="CharacterBody2D"] +collision_layer = 0 + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_v2kfw") + +[node name="BackMountPoint" type="Marker2D" parent="."] +position = Vector2(0, -12) + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_yif6x") +position = Vector2(0, -12) + +[node name="Collision" type="CollisionShape2D" parent="."] +position = Vector2(0, -4) +shape = SubResource("CircleShape2D_5pj80") + +[node name="HurtArea" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 0 +monitoring = false + +[node name="HurtCollision" type="CollisionShape2D" parent="HurtArea"] +position = Vector2(0, -9) +shape = SubResource("RectangleShape2D_1eja2") + +[node name="InteractiveArea" type="Area2D" parent="."] +visible = false +collision_layer = 0 +collision_mask = 4 +monitorable = false + +[node name="InteractiveCollision" type="CollisionShape2D" parent="InteractiveArea"] +position = Vector2(0, -5) +shape = SubResource("RectangleShape2D_n68nu") + +[node name="MountPoint" type="Marker2D" parent="."] +position = Vector2(2, -8) +script = ExtResource("2_5ddpw") + +[node name="MeleeAttackArea" type="Area2D" parent="MountPoint"] +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="MeleeAttackCollision" type="CollisionPolygon2D" parent="MountPoint/MeleeAttackArea"] diff --git a/DungeonShooting_Godot/prefab/role/template/EnemyTemplate.tscn b/DungeonShooting_Godot/prefab/role/template/EnemyTemplate.tscn new file mode 100644 index 0000000..8d83646 --- /dev/null +++ b/DungeonShooting_Godot/prefab/role/template/EnemyTemplate.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=5 format=3 uid="uid://dxeqcssparqoo"] + +[ext_resource type="PackedScene" uid="uid://0uc4naitjprl" path="res://prefab/role/template/RoleTemplate.tscn" id="1_u04qy"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_tedjs"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_fhls5"] +resource_local_to_scene = true +shader = ExtResource("2_tedjs") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_lnent"] +resource_local_to_scene = true +shader = ExtResource("2_tedjs") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[node name="EnemyTemplate" instance=ExtResource("1_u04qy")] +collision_layer = 16 +collision_mask = 25 + +[node name="ShadowSprite" parent="." index="0"] +material = SubResource("ShaderMaterial_fhls5") + +[node name="AnimatedSprite" parent="." index="1"] +material = SubResource("ShaderMaterial_lnent") + +[node name="ViewRay" type="RayCast2D" parent="." index="5"] +position = Vector2(0, -8) +enabled = false + +[node name="NavigationPoint" type="Marker2D" parent="." index="6"] +position = Vector2(0, -5) + +[node name="NavigationAgent2D" type="NavigationAgent2D" parent="NavigationPoint" index="0"] +path_desired_distance = 3.0 +target_desired_distance = 3.0 +radius = 20.0 diff --git a/DungeonShooting_Godot/prefab/role/template/RoleTemplate.tscn b/DungeonShooting_Godot/prefab/role/template/RoleTemplate.tscn new file mode 100644 index 0000000..ad986de --- /dev/null +++ b/DungeonShooting_Godot/prefab/role/template/RoleTemplate.tscn @@ -0,0 +1,68 @@ +[gd_scene load_steps=7 format=3 uid="uid://0uc4naitjprl"] + +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_xk5yk"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v2kfw"] +resource_local_to_scene = true +shader = ExtResource("1_xk5yk") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_yif6x"] +resource_local_to_scene = true +shader = ExtResource("1_xk5yk") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="CircleShape2D" id="CircleShape2D_5pj80"] +radius = 4.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1eja2"] +size = Vector2(12, 18) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_n68nu"] +size = Vector2(10, 16.5) + +[node name="RoleTemplate" type="CharacterBody2D"] +collision_layer = 0 + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_v2kfw") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_yif6x") +position = Vector2(0, -12) + +[node name="Collision" type="CollisionShape2D" parent="."] +position = Vector2(0, -4) +shape = SubResource("CircleShape2D_5pj80") + +[node name="HurtArea" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 0 +monitoring = false + +[node name="HurtCollision" type="CollisionShape2D" parent="HurtArea"] +position = Vector2(0, -9) +shape = SubResource("RectangleShape2D_1eja2") + +[node name="InteractiveArea" type="Area2D" parent="."] +visible = false +collision_layer = 0 +collision_mask = 4 +monitorable = false + +[node name="InteractiveCollision" type="CollisionShape2D" parent="InteractiveArea"] +position = Vector2(0, -5) +shape = SubResource("RectangleShape2D_n68nu") diff --git a/DungeonShooting_Godot/prefab/shell/Shell0001.tscn b/DungeonShooting_Godot/prefab/shell/Shell0001.tscn index b798a43..eceaf5d 100644 --- a/DungeonShooting_Godot/prefab/shell/Shell0001.tscn +++ b/DungeonShooting_Godot/prefab/shell/Shell0001.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=6 format=3 uid="uid://bj4yr6ru8nhwr"] +[gd_scene load_steps=7 format=3 uid="uid://bj4yr6ru8nhwr"] [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"] @@ -9,20 +9,25 @@ shader = ExtResource("2_tdny6") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_7e6fo"] resource_local_to_scene = true shader = ExtResource("2_tdny6") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_fidao"] +size = Vector2(3.75, 1.25) [node name="Shell0001" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] collision_layer = 128 @@ -40,3 +45,4 @@ sprite_frames = ExtResource("3_ujn5y") [node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_fidao") diff --git a/DungeonShooting_Godot/prefab/shell/Shell0002.tscn b/DungeonShooting_Godot/prefab/shell/Shell0002.tscn index 1f8893e..7fc2e03 100644 --- a/DungeonShooting_Godot/prefab/shell/Shell0002.tscn +++ b/DungeonShooting_Godot/prefab/shell/Shell0002.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=6 format=3 uid="uid://cdhinm8rnppxt"] +[gd_scene load_steps=7 format=3 uid="uid://cdhinm8rnppxt"] [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"] @@ -9,20 +9,25 @@ shader = ExtResource("2_s28nu") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_7e6fo"] resource_local_to_scene = true shader = ExtResource("2_s28nu") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_3ib07"] +size = Vector2(4, 2) [node name="Shell0002" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] collision_layer = 128 @@ -40,3 +45,4 @@ sprite_frames = ExtResource("3_r560h") [node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_3ib07") diff --git a/DungeonShooting_Godot/prefab/shell/Shell0003.tscn b/DungeonShooting_Godot/prefab/shell/Shell0003.tscn index 4d85f05..fecfbcb 100644 --- a/DungeonShooting_Godot/prefab/shell/Shell0003.tscn +++ b/DungeonShooting_Godot/prefab/shell/Shell0003.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=6 format=3 uid="uid://ba5sxxjaappbj"] +[gd_scene load_steps=7 format=3 uid="uid://ba5sxxjaappbj"] [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"] @@ -9,20 +9,25 @@ shader = ExtResource("2_586dn") shader_parameter/blend = Color(0, 0, 0, 0.470588) shader_parameter/schedule = 1.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_7e6fo"] resource_local_to_scene = true shader = ExtResource("2_586dn") shader_parameter/blend = Color(1, 1, 1, 1) shader_parameter/schedule = 0.0 -shader_parameter/alpha = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = false shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r7wle"] +size = Vector2(4, 2) [node name="Shell0003" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] collision_layer = 128 @@ -40,3 +45,4 @@ sprite_frames = ExtResource("3_j2kre") [node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_r7wle") diff --git a/DungeonShooting_Godot/prefab/shell/Shell0004.tscn b/DungeonShooting_Godot/prefab/shell/Shell0004.tscn new file mode 100644 index 0000000..42d8fd0 --- /dev/null +++ b/DungeonShooting_Godot/prefab/shell/Shell0004.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=7 format=3 uid="uid://ycr5mjr25302"] + +[ext_resource type="Script" path="res://src/game/activity/shell/Shell.cs" id="1_ridlp"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_guwkk"] +[ext_resource type="SpriteFrames" uid="uid://b8b0ye3iv1vwp" path="res://resource/spriteFrames/shell/Shell0004.tres" id="3_1s5f3"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_px12l"] +resource_local_to_scene = true +shader = ExtResource("2_guwkk") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7e6fo"] +resource_local_to_scene = true +shader = ExtResource("2_guwkk") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = false +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ighya"] +size = Vector2(4, 3) + +[node name="Shell0004" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 128 +script = ExtResource("1_ridlp") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_px12l") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_7e6fo") +sprite_frames = ExtResource("3_1s5f3") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_ighya") diff --git a/DungeonShooting_Godot/prefab/ui/Debugger.tscn b/DungeonShooting_Godot/prefab/ui/Debugger.tscn index cf76f5b..fcd8420 100644 --- a/DungeonShooting_Godot/prefab/ui/Debugger.tscn +++ b/DungeonShooting_Godot/prefab/ui/Debugger.tscn @@ -68,3 +68,14 @@ icon = ExtResource("2_acjpv") flat = true icon_alignment = 1 + +[node name="Fps" type="Label" parent="."] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -4.5 +offset_right = 4.5 +offset_bottom = 40.0 +grow_horizontal = 2 +text = "FPS:60" diff --git a/DungeonShooting_Godot/prefab/ui/EditorTools.tscn b/DungeonShooting_Godot/prefab/ui/EditorTools.tscn index 1089ea7..cea4982 100644 --- a/DungeonShooting_Godot/prefab/ui/EditorTools.tscn +++ b/DungeonShooting_Godot/prefab/ui/EditorTools.tscn @@ -88,70 +88,6 @@ layout_mode = 2 text = "运行" -[node name="HBoxContainer6" type="HBoxContainer" parent="ScrollContainer/MarginContainer/VBoxContainer"] -layout_mode = 2 -theme_override_constants/separation = 5 - -[node name="Label" type="Label" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] -layout_mode = 2 -text = "创建地牢房间" - -[node name="RoomNameInput" type="LineEdit" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] -custom_minimum_size = Vector2(250, 0) -layout_mode = 2 -placeholder_text = "请输入房间名称" - -[node name="Label2" type="Label" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] -layout_mode = 2 -text = "房间所属分组" - -[node name="RoomGroupSelect" type="OptionButton" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] -layout_mode = 2 -item_count = 1 -selected = 0 -popup/item_0/text = "testGroup" -popup/item_0/id = 0 - -[node name="Label3" type="Label" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] -layout_mode = 2 -text = "房间类型" - -[node name="RoomTypeSelect" type="OptionButton" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] -layout_mode = 2 -item_count = 7 -selected = 0 -popup/item_0/text = "battle (战斗房间)" -popup/item_0/id = 0 -popup/item_1/text = "inlet (起始房间)" -popup/item_1/id = 1 -popup/item_2/text = "outlet (结束房间)" -popup/item_2/id = 2 -popup/item_3/text = "boss (boss战房间)" -popup/item_3/id = 3 -popup/item_4/text = "reward (奖励房间)" -popup/item_4/id = 4 -popup/item_5/text = "shop (商店房间)" -popup/item_5/id = 5 -popup/item_6/text = "event (事件房间)" -popup/item_6/id = 6 - -[node name="Button" type="Button" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer6"] -layout_mode = 2 -text = "创建 -" - -[node name="HBoxContainer2" type="HBoxContainer" parent="ScrollContainer/MarginContainer/VBoxContainer"] -layout_mode = 2 -theme_override_constants/separation = 5 - -[node name="Label" type="Label" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer2"] -layout_mode = 2 -text = "重新打包地牢房间配置" - -[node name="Button" type="Button" parent="ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer2"] -layout_mode = 2 -text = "运行" - [node name="HBoxContainer7" type="HBoxContainer" parent="ScrollContainer/MarginContainer/VBoxContainer"] layout_mode = 2 theme_override_constants/separation = 5 diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn index 0467857..b4a5c1c 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0007.tscn @@ -14,6 +14,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="ShaderMaterial" id="ShaderMaterial_277ni"] resource_local_to_scene = true @@ -24,6 +25,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true [sub_resource type="RectangleShape2D" id="RectangleShape2D_4pn1i"] size = Vector2(20, 6) diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0008.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0008.tscn new file mode 100644 index 0000000..d43a8bc --- /dev/null +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0008.tscn @@ -0,0 +1,136 @@ +[gd_scene load_steps=11 format=3 uid="uid://yt10i80hs3gt"] + +[ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_l63x2"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_mhoa7"] +[ext_resource type="SpriteFrames" uid="uid://b2wpy40adyjs6" path="res://resource/spriteFrames/weapon/Weapon0008.tres" id="2_s0xbw"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +resource_local_to_scene = true +shader = ExtResource("1_mhoa7") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +resource_local_to_scene = true +shader = ExtResource("1_mhoa7") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_evjpf"] +size = Vector2(12, 6) + +[sub_resource type="Animation" id="Animation_x136i"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} + +[sub_resource type="Animation" id="Animation_3piau"] +resource_name = "floodlight" +length = 3.0 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 0, +"values": [0, 0, 0.5, 0.5, 0] +} + +[sub_resource type="Animation" id="Animation_8xqs8"] +resource_name = "reloading" +length = 1.3 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.2, 1.1, 1.3), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [0.0, -0.436332, -0.436332, 0.0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] +_data = { +"RESET": SubResource("Animation_x136i"), +"floodlight": SubResource("Animation_3piau"), +"reloading": SubResource("Animation_8xqs8") +} + +[node name="Weapon0008" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_l63x2") +FirePoint = NodePath("AnimatedSprite/FirePoint") +ShellPoint = NodePath("AnimatedSprite/ShellPoint") +GripPoint = NodePath("GripPoint") +AnimationPlayer = NodePath("AnimationPlayer") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_cbiyh") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +modulate = Color(1.9, 1.9, 1.9, 1) +material = SubResource("ShaderMaterial_o36tv") +sprite_frames = ExtResource("2_s0xbw") +animation = &"reloading" + +[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(-2, -3) + +[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(7, -1.5) + +[node name="GripPoint" type="Marker2D" parent="."] +position = Vector2(-5, 0) + +[node name="Collision" type="CollisionShape2D" parent="."] +position = Vector2(1, 0) +shape = SubResource("RectangleShape2D_evjpf") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_trkjd") +} diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn new file mode 100644 index 0000000..e8a8c26 --- /dev/null +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0009.tscn @@ -0,0 +1,185 @@ +[gd_scene load_steps=11 format=3 uid="uid://2lb2h8qunqyu"] + +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="1_6fbtx"] +[ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_eprgt"] +[ext_resource type="SpriteFrames" uid="uid://c0xwj3kpk02ua" path="res://resource/spriteFrames/weapon/Weapon0009.tres" id="2_4kxpd"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"] +resource_local_to_scene = true +shader = ExtResource("1_6fbtx") +shader_parameter/blend = Color(0, 0, 0, 0.470588) +shader_parameter/schedule = 1.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"] +resource_local_to_scene = true +shader = ExtResource("1_6fbtx") +shader_parameter/blend = Color(1, 1, 1, 1) +shader_parameter/schedule = 0.0 +shader_parameter/modulate = Color(1, 1, 1, 1) +shader_parameter/show_outline = true +shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_jbuu3"] +size = Vector2(18, 6) + +[sub_resource type="Animation" id="Animation_x136i"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("AnimatedSprite:animation") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"reloading_frame"] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("AnimatedSprite:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="Animation" id="Animation_3piau"] +resource_name = "floodlight" +length = 3.0 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 0, +"values": [0, 0, 0.5, 0.5, 0] +} + +[sub_resource type="Animation" id="Animation_juv2q"] +resource_name = "reloading" +length = 1.5 +step = 0.02 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.14, 0.2, 1.14, 1.2, 1.36, 1.5), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 0, +"values": [0.0, -0.523599, 0.0, 0.0, -0.349066, -0.349066, 0.0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("AnimatedSprite:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"reloading_frame"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("AnimatedSprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.22, 0.24, 1.22, 1.24), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] +_data = { +"RESET": SubResource("Animation_x136i"), +"floodlight": SubResource("Animation_3piau"), +"reloading": SubResource("Animation_juv2q") +} + +[node name="Weapon0009" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_eprgt") +FirePoint = NodePath("AnimatedSprite/FirePoint") +ShellPoint = NodePath("AnimatedSprite/ShellPoint") +GripPoint = NodePath("GripPoint") +AnimationPlayer = NodePath("AnimationPlayer") +ShadowSprite = NodePath("ShadowSprite") +AnimatedSprite = NodePath("AnimatedSprite") +Collision = NodePath("Collision") + +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_cbiyh") + +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_o36tv") +sprite_frames = ExtResource("2_4kxpd") +animation = &"reloading_frame" + +[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(-2, -2) + +[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(13, -0.5) + +[node name="GripPoint" type="Marker2D" parent="."] +position = Vector2(-6, 1) + +[node name="Collision" type="CollisionShape2D" parent="."] +visible = false +position = Vector2(0, 1) +shape = SubResource("RectangleShape2D_jbuu3") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_trkjd") +} diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index a14b877..5382858 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -192,7 +192,7 @@ 2d_physics/layer_5="enemy" 2d_physics/layer_6="affiliation" 2d_physics/layer_7="onHead" -2d_physics/layer_8="shell" +2d_physics/layer_8="debris" 2d_physics/layer_9="throwing" [mono] diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json new file mode 100644 index 0000000..c9bb74b --- /dev/null +++ b/DungeonShooting_Godot/resource/config/ActivityBase.json @@ -0,0 +1,494 @@ +[ + { + "Id": "role0001", + "Type": 3, + "Name": "\u73A9\u5BB6", + "Intro": "\u73A9\u5BB6", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/role/Role0001.tscn", + "Icon": "res://resource/sprite/role/role0001/Role0001_Icon.png", + "ShowInMapEditor": false + }, + { + "Id": "enemy0001", + "Type": 4, + "Name": "\u654C\u4EBA", + "Intro": "\u654C\u4EBA", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/role/Enemy0001.tscn", + "Icon": "res://resource/sprite/role/enemy0001/enemy0001_Icon.png", + "ShowInMapEditor": true + }, + { + "Id": "enemy0002", + "Type": 4, + "Name": "\u654C\u4EBA2", + "Intro": "\u654C\u4EBA2", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/role/Enemy0002.tscn", + "Icon": "res://resource/sprite/role/enemy0002/Enemy0002.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0001", + "Type": 5, + "Name": "\u6B65\u67AA", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0001.tscn", + "Icon": "res://resource/sprite/weapon/weapon0001/Weapon0001.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0002", + "Type": 5, + "Name": "\u9730\u5F39\u67AA", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0002.tscn", + "Icon": "res://resource/sprite/weapon/weapon0002/Weapon0002.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0003", + "Type": 5, + "Name": "\u624B\u67AA", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0003.tscn", + "Icon": "res://resource/sprite/weapon/weapon0003/Weapon0003.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0004", + "Type": 5, + "Name": "\u5200", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0004.tscn", + "Icon": "res://resource/sprite/weapon/knife1.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0005", + "Type": 5, + "Name": "\u72D9\u51FB\u67AA", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0005.tscn", + "Icon": "res://resource/sprite/weapon/weapon0005/Weapon0005.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0006", + "Type": 5, + "Name": "\u51B2\u950B\u67AA", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0006.tscn", + "Icon": "res://resource/sprite/weapon/weapon0006/Weapon0006.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0007", + "Type": 5, + "Name": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0007.tscn", + "Icon": "res://resource/sprite/weapon/weapon0007/Weapon0007.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0008", + "Type": 5, + "Name": "\u6FC0\u5149\u624B\u67AA", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0008.tscn", + "Icon": "res://resource/sprite/weapon/weapon0008/Weapon0008.png", + "ShowInMapEditor": true + }, + { + "Id": "weapon0009", + "Type": 5, + "Name": "\u69B4\u5F39\u53D1\u5C04\u5668", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0009.tscn", + "Icon": "res://resource/sprite/weapon/weapon0009/Weapon0009.png", + "ShowInMapEditor": true + }, + { + "Id": "bullet0001", + "Type": 6, + "Name": "", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "0003", + "Prefab": "res://prefab/bullet/normal/Bullet0001.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "bullet0002", + "Type": 6, + "Name": "", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "0003", + "Prefab": "res://prefab/bullet/normal/Bullet0002.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "bullet0003", + "Type": 6, + "Name": "", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "0003", + "Prefab": "res://prefab/bullet/normal/Bullet0003.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "bullet0004", + "Type": 6, + "Name": "\u69B4\u5F39\u70AE", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "0002", + "Prefab": "res://prefab/bullet/normal/Bullet0004.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "shell0001", + "Type": 7, + "Name": "", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/shell/Shell0001.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "shell0002", + "Type": 7, + "Name": "", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/shell/Shell0002.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "shell0003", + "Type": 7, + "Name": "", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/shell/Shell0003.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "shell0004", + "Type": 7, + "Name": "", + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/shell/Shell0004.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "effect0001", + "Type": 8, + "Name": "", + "Intro": "\u654C\u4EBA\u6B7B\u4EA1\u788E\u7247", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/effect/enemy/Effect0001.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "prop0001", + "Type": 9, + "Name": "\u978B\u5B50", + "Intro": "\u63D0\u9AD8\u79FB\u52A8\u901F\u5EA6", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/effect/enemy/Effect0001.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0001.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0002", + "Type": 9, + "Name": "\u5FC3\u4E4B\u5BB9\u5668", + "Intro": "\u63D0\u9AD8\u8840\u91CF\u4E0A\u9650", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0002.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0002.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0003", + "Type": 9, + "Name": "\u62A4\u76FE", + "Intro": "\u53EF\u4EE5\u62B5\u6321\u5B50\u5F39\uFF0C\u968F\u65F6\u95F4\u63A8\u79FB\u81EA\u52A8\u6062\u590D", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0003.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0003.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0004", + "Type": 9, + "Name": "\u62A4\u76FE\u8BA1\u65F6\u5668", + "Intro": "\u63D0\u9AD8\u62A4\u76FE\u6062\u590D\u901F\u5EA6", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0004.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0004.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0005", + "Type": 9, + "Name": "\u6740\u4F24\u5F39", + "Intro": "\u63D0\u9AD8\u5B50\u5F39\u4F24\u5BB3", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0005.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0005.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0006", + "Type": 9, + "Name": "\u7EA2\u5B9D\u77F3\u6212\u6307", + "Intro": "\u53D7\u4F24\u540E\u5EF6\u957F\u65E0\u654C\u65F6\u95F4", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0006.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0006.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0007", + "Type": 9, + "Name": "\u5907\u7528\u62A4\u76FE", + "Intro": "\u53D7\u4F24\u65F6\u6709\u4E00\u5B9A\u6982\u7387\u62B5\u6D88\u4F24\u5BB3", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0007.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0007.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0008", + "Type": 9, + "Name": "\u773C\u955C", + "Intro": "\u63D0\u9AD8\u6B66\u5668\u7CBE\u51C6\u5EA6", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0008.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0008.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0009", + "Type": 9, + "Name": "\u9AD8\u901F\u5B50\u5F39", + "Intro": "\u63D0\u9AD8\u5B50\u5F39\u901F\u5EA6\u548C\u5C04\u7A0B", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0009.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0009.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0010", + "Type": 9, + "Name": "\u5206\u88C2\u5B50\u5F39", + "Intro": "\u5B50\u5F39\u6570\u91CF\u7FFB\u500D, \u4F46\u662F\u7CBE\u51C6\u5EA6, \u51FB\u9000\u548C\u4F24\u5BB3\u964D\u4F4E", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0010.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0010.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0011", + "Type": 9, + "Name": "\u5F39\u5C04\u5B50\u5F39", + "Intro": "\u5B50\u5F39\u53CD\u5F39\u6B21\u6570\u002B2", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0011.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0011.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0012", + "Type": 9, + "Name": "\u7A7F\u900F\u5B50\u5F39", + "Intro": "\u5B50\u5F39\u7A7F\u900F\u002B1", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0012.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0012.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0013", + "Type": 9, + "Name": "\u6B66\u5668\u80CC\u5305", + "Intro": "\u6B66\u5668\u5BB9\u91CF\u002B1", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0013.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0013.png", + "ShowInMapEditor": true + }, + { + "Id": "prop0014", + "Type": 9, + "Name": "\u9053\u5177\u80CC\u5305", + "Intro": "\u9053\u5177\u5BB9\u91CF\u002B1", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/buff/BuffProp0014.tscn", + "Icon": "res://resource/sprite/prop/buff/BuffProp0014.png", + "ShowInMapEditor": true + }, + { + "Id": "prop5000", + "Type": 9, + "Name": "\u533B\u836F\u7BB1", + "Intro": "\u4F7F\u7528\u540E\u56DE\u590D\u4E00\u9897\u7EA2\u5FC3", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/active/ActiveProp5000.tscn", + "Icon": "res://resource/sprite/prop/active/ActiveProp5000.png", + "ShowInMapEditor": true + }, + { + "Id": "prop5001", + "Type": 9, + "Name": "\u5F39\u836F\u7BB1", + "Intro": "\u4F7F\u7528\u540E\u8865\u5145\u5F53\u524D\u6B66\u5668\u5907\u7528\u5F39\u836F", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/prop/active/ActiveProp5001.tscn", + "Icon": "res://resource/sprite/prop/active/ActiveProp5001.png", + "ShowInMapEditor": true + }, + { + "Id": "other_door_e", + "Type": 99, + "Name": "", + "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u4E1C\u4FA7)", + "Details": "", + "IsStatic": true, + "__Material": "", + "Prefab": "res://prefab/map/RoomDoor_E.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "other_door_w", + "Type": 99, + "Name": "", + "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u897F\u4FA7)", + "Details": "", + "IsStatic": true, + "__Material": "", + "Prefab": "res://prefab/map/RoomDoor_W.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "other_door_s", + "Type": 99, + "Name": "", + "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5357\u4FA7)", + "Details": "", + "IsStatic": true, + "__Material": "", + "Prefab": "res://prefab/map/RoomDoor_S.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { + "Id": "other_door_n", + "Type": 99, + "Name": "", + "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5317\u4FA7)", + "Details": "", + "IsStatic": true, + "__Material": "", + "Prefab": "res://prefab/map/RoomDoor_N.tscn", + "Icon": "", + "ShowInMapEditor": false + } +] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/ActivityMaterial.json b/DungeonShooting_Godot/resource/config/ActivityMaterial.json new file mode 100644 index 0000000..56f528a --- /dev/null +++ b/DungeonShooting_Godot/resource/config/ActivityMaterial.json @@ -0,0 +1,35 @@ +[ + { + "Id": "0001", + "Remark": "\u9ED8\u8BA4\u6750\u8D28\u5C5E\u6027", + "Friction": 140, + "RotationFriction": 140, + "Bounce": true, + "BounceStrength": 0.5, + "FallBounceStrength": 0.5, + "FallBounceSpeed": 0.75, + "FallBounceRotation": 0.5 + }, + { + "Id": "0002", + "Remark": "\u7403\u4F53\u6750\u8D28\uFF0C\u6469\u64E6\u529B\u8F83\u4F4E", + "Friction": 40, + "RotationFriction": 40, + "Bounce": true, + "BounceStrength": 0.7, + "FallBounceStrength": 0.7, + "FallBounceSpeed": 0.85, + "FallBounceRotation": 0.85 + }, + { + "Id": "0003", + "Remark": "\u5B50\u5F39,\u53CD\u5F39\u6D88\u8017\u4F4E", + "Friction": 140, + "RotationFriction": 140, + "Bounce": true, + "BounceStrength": 1, + "FallBounceStrength": 0.5, + "FallBounceSpeed": 0.75, + "FallBounceRotation": 0.5 + } +] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/ActivityObject.json b/DungeonShooting_Godot/resource/config/ActivityObject.json deleted file mode 100644 index 49cb525..0000000 --- a/DungeonShooting_Godot/resource/config/ActivityObject.json +++ /dev/null @@ -1,322 +0,0 @@ -[ - { - "Id": "role0001", - "Type": 3, - "Name": "\u73A9\u5BB6", - "Intro": "\u73A9\u5BB6", - "Details": "", - "Prefab": "res://prefab/role/Role0001.tscn", - "Icon": "res://resource/sprite/role/role0001/Role0001_Icon.png", - "ShowInMapEditor": false - }, - { - "Id": "enemy0001", - "Type": 4, - "Name": "\u654C\u4EBA", - "Intro": "\u654C\u4EBA", - "Details": "", - "Prefab": "res://prefab/role/Enemy0001.tscn", - "Icon": "res://resource/sprite/role/enemy0001/enemy0001_Icon.png", - "ShowInMapEditor": true - }, - { - "Id": "weapon0001", - "Type": 5, - "Name": "\u6B65\u67AA", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/weapon/Weapon0001.tscn", - "Icon": "res://resource/sprite/weapon/weapon0001/Weapon0001.png", - "ShowInMapEditor": true - }, - { - "Id": "weapon0002", - "Type": 5, - "Name": "\u9730\u5F39\u67AA", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/weapon/Weapon0002.tscn", - "Icon": "res://resource/sprite/weapon/weapon0002/Weapon0002.png", - "ShowInMapEditor": true - }, - { - "Id": "weapon0003", - "Type": 5, - "Name": "\u624B\u67AA", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/weapon/Weapon0003.tscn", - "Icon": "res://resource/sprite/weapon/weapon0003/Weapon0003.png", - "ShowInMapEditor": true - }, - { - "Id": "weapon0004", - "Type": 5, - "Name": "\u5200", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/weapon/Weapon0004.tscn", - "Icon": "res://resource/sprite/weapon/knife1.png", - "ShowInMapEditor": true - }, - { - "Id": "weapon0005", - "Type": 5, - "Name": "\u72D9\u51FB\u67AA", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/weapon/Weapon0005.tscn", - "Icon": "res://resource/sprite/weapon/weapon0005/Weapon0005.png", - "ShowInMapEditor": true - }, - { - "Id": "weapon0006", - "Type": 5, - "Name": "\u51B2\u950B\u67AA", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/weapon/Weapon0006.tscn", - "Icon": "res://resource/sprite/weapon/weapon0006/Weapon0006.png", - "ShowInMapEditor": true - }, - { - "Id": "weapon0007", - "Type": 5, - "Name": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/weapon/Weapon0007.tscn", - "Icon": "res://resource/sprite/weapon/weapon0007/Weapon0007.png", - "ShowInMapEditor": true - }, - { - "Id": "bullet0001", - "Type": 6, - "Name": "", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/bullet/Bullet0001.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "bullet0002", - "Type": 6, - "Name": "", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/bullet/Bullet0002.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "bullet0003", - "Type": 6, - "Name": "", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/bullet/Bullet0003.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "shell0001", - "Type": 7, - "Name": "", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/shell/Shell0001.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "shell0002", - "Type": 7, - "Name": "", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/shell/Shell0002.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "shell0003", - "Type": 7, - "Name": "", - "Intro": "", - "Details": "", - "Prefab": "res://prefab/shell/Shell0003.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "effect0001", - "Type": 8, - "Name": "", - "Intro": "\u654C\u4EBA\u6B7B\u4EA1\u788E\u7247", - "Details": "", - "Prefab": "res://prefab/effect/enemy/Effect0001.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "prop0001", - "Type": 9, - "Name": "\u978B\u5B50", - "Intro": "\u63D0\u9AD8\u79FB\u52A8\u901F\u5EA6", - "Details": "", - "Prefab": "res://prefab/effect/enemy/Effect0001.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0001.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0002", - "Type": 9, - "Name": "\u5FC3\u4E4B\u5BB9\u5668", - "Intro": "\u63D0\u9AD8\u8840\u91CF\u4E0A\u9650", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0002.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0002.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0003", - "Type": 9, - "Name": "\u62A4\u76FE", - "Intro": "\u53EF\u4EE5\u62B5\u6321\u5B50\u5F39\uFF0C\u968F\u65F6\u95F4\u63A8\u79FB\u81EA\u52A8\u6062\u590D", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0003.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0003.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0004", - "Type": 9, - "Name": "\u62A4\u76FE\u8BA1\u65F6\u5668", - "Intro": "\u63D0\u9AD8\u62A4\u76FE\u6062\u590D\u901F\u5EA6", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0004.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0004.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0005", - "Type": 9, - "Name": "\u6740\u4F24\u5F39", - "Intro": "\u63D0\u9AD8\u5B50\u5F39\u4F24\u5BB3", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0005.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0005.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0006", - "Type": 9, - "Name": "\u7EA2\u5B9D\u77F3\u6212\u6307", - "Intro": "\u53D7\u4F24\u540E\u5EF6\u957F\u65E0\u654C\u65F6\u95F4", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0006.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0006.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0007", - "Type": 9, - "Name": "\u5907\u7528\u62A4\u76FE", - "Intro": "\u53D7\u4F24\u65F6\u6709\u4E00\u5B9A\u6982\u7387\u62B5\u6D88\u4F24\u5BB3", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0007.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0007.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0008", - "Type": 9, - "Name": "\u773C\u955C", - "Intro": "\u63D0\u9AD8\u6B66\u5668\u7CBE\u51C6\u5EA6", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0008.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0008.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0009", - "Type": 9, - "Name": "\u9AD8\u901F\u5B50\u5F39", - "Intro": "\u63D0\u9AD8\u5B50\u5F39\u901F\u5EA6\u548C\u5C04\u7A0B", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0009.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0009.png", - "ShowInMapEditor": true - }, - { - "Id": "prop0010", - "Type": 9, - "Name": "\u5206\u88C2\u5B50\u5F39", - "Intro": "\u5B50\u5F39\u6570\u91CF\u7FFB\u500D, \u4F46\u662F\u7CBE\u51C6\u5EA6\u548C\u4F24\u5BB3\u964D\u4F4E", - "Details": "", - "Prefab": "res://prefab/prop/buff/BuffProp0010.tscn", - "Icon": "res://resource/sprite/prop/buff/BuffProp0010.png", - "ShowInMapEditor": true - }, - { - "Id": "prop5000", - "Type": 9, - "Name": "\u533B\u836F\u7BB1", - "Intro": "\u4F7F\u7528\u540E\u56DE\u590D\u4E00\u9897\u7EA2\u5FC3", - "Details": "", - "Prefab": "res://prefab/prop/active/ActiveProp5000.tscn", - "Icon": "res://resource/sprite/prop/active/ActiveProp5000.png", - "ShowInMapEditor": true - }, - { - "Id": "prop5001", - "Type": 9, - "Name": "\u5F39\u836F\u7BB1", - "Intro": "\u4F7F\u7528\u540E\u8865\u5145\u5F53\u524D\u6B66\u5668\u5907\u7528\u5F39\u836F", - "Details": "", - "Prefab": "res://prefab/prop/active/ActiveProp5001.tscn", - "Icon": "res://resource/sprite/prop/active/ActiveProp5001.png", - "ShowInMapEditor": true - }, - { - "Id": "other_door_e", - "Type": 99, - "Name": "", - "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u4E1C\u4FA7)", - "Details": "", - "Prefab": "res://prefab/map/RoomDoor_E.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "other_door_w", - "Type": 99, - "Name": "", - "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u897F\u4FA7)", - "Details": "", - "Prefab": "res://prefab/map/RoomDoor_W.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "other_door_s", - "Type": 99, - "Name": "", - "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5357\u4FA7)", - "Details": "", - "Prefab": "res://prefab/map/RoomDoor_S.tscn", - "Icon": "", - "ShowInMapEditor": false - }, - { - "Id": "other_door_n", - "Type": 99, - "Name": "", - "Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5317\u4FA7)", - "Details": "", - "Prefab": "res://prefab/map/RoomDoor_N.tscn", - "Icon": "", - "ShowInMapEditor": false - } -] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/AiAttackAttr.json b/DungeonShooting_Godot/resource/config/AiAttackAttr.json index 010c512..3d27a46 100644 --- a/DungeonShooting_Godot/resource/config/AiAttackAttr.json +++ b/DungeonShooting_Godot/resource/config/AiAttackAttr.json @@ -64,5 +64,27 @@ "AttackLockAngle": false, "BulletSpeedScale": 0.35, "AmmoConsumptionProbability": 0 + }, + { + "Id": "0007", + "Remark": "\u6FC0\u5149\u6B66\u5668", + "FiringStand": true, + "ShowSubline": true, + "LockingTime": 1.5, + "LockAngleTime": 0.5, + "AttackLockAngle": true, + "BulletSpeedScale": 1, + "AmmoConsumptionProbability": 0 + }, + { + "Id": "0008", + "Remark": "\u69B4\u5F39\u70AE", + "FiringStand": true, + "ShowSubline": false, + "LockingTime": 1.5, + "LockAngleTime": 0.5, + "AttackLockAngle": true, + "BulletSpeedScale": 0.8, + "AmmoConsumptionProbability": 0 } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/BulletBase.json b/DungeonShooting_Godot/resource/config/BulletBase.json new file mode 100644 index 0000000..6ce1a2e --- /dev/null +++ b/DungeonShooting_Godot/resource/config/BulletBase.json @@ -0,0 +1,243 @@ +[ + { + "Id": "0001", + "Name": "\u5B50\u5F391", + "Type": 1, + "Prefab": "bullet0001", + "HarmRange": [ + 4 + ], + "RepelRange": [ + 20 + ], + "DeviationAngleRange": [ + 0 + ], + "SpeedRange": [ + 320, + 350 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 300, + 400 + ], + "UseGravity": false, + "VerticalSpeed": [ + 0 + ], + "BounceCount": [ + 0 + ], + "Penetration": [ + 0 + ] + }, + { + "Id": "0002", + "Name": "\u5B50\u5F392", + "Type": 1, + "Prefab": "bullet0002", + "HarmRange": [ + 4 + ], + "RepelRange": [ + 30 + ], + "DeviationAngleRange": [ + -10, + 10 + ], + "SpeedRange": [ + 280, + 380 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 200, + 250 + ], + "UseGravity": false, + "VerticalSpeed": [ + 0 + ], + "BounceCount": [ + 0 + ], + "Penetration": [ + 0 + ] + }, + { + "Id": "0003", + "Name": "\u5B50\u5F393", + "Type": 1, + "Prefab": "bullet0003", + "HarmRange": [ + 3 + ], + "RepelRange": [ + 10 + ], + "DeviationAngleRange": [ + 0 + ], + "SpeedRange": [ + 320, + 340 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 300, + 400 + ], + "UseGravity": false, + "VerticalSpeed": [ + 0 + ], + "BounceCount": [ + 0 + ], + "Penetration": [ + 0 + ] + }, + { + "Id": "0004", + "Name": "\u72D9\u51FB\u67AA\u5B50\u5F39", + "Type": 1, + "Prefab": "bullet0001", + "HarmRange": [ + 20 + ], + "RepelRange": [ + 200 + ], + "DeviationAngleRange": [ + 0 + ], + "SpeedRange": [ + 600, + 600 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 600, + 600 + ], + "UseGravity": false, + "VerticalSpeed": [ + 0 + ], + "BounceCount": [ + 0 + ], + "Penetration": [ + 0 + ] + }, + { + "Id": "0005", + "Name": "\u69B4\u5F39\u70AE", + "Type": 1, + "Prefab": "bullet0004", + "HarmRange": [ + 30 + ], + "RepelRange": [ + 150 + ], + "DeviationAngleRange": [ + 0 + ], + "SpeedRange": [ + 180, + 180 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 270, + 360 + ], + "UseGravity": true, + "VerticalSpeed": [ + 70 + ], + "BounceCount": [ + 999 + ], + "Penetration": [ + 1 + ] + }, + { + "Id": "1001", + "Name": "\u6FC0\u51491", + "Type": 2, + "Prefab": "res://prefab/bullet/laser/Laser0001.tscn", + "HarmRange": [ + 5 + ], + "RepelRange": [ + 40 + ], + "DeviationAngleRange": [ + 0 + ], + "SpeedRange": [ + 300, + 330 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 600, + 600 + ], + "UseGravity": false, + "VerticalSpeed": null, + "BounceCount": [ + 0 + ], + "Penetration": null + }, + { + "Id": "2001", + "Name": "\u5200\u4F24\u5BB3", + "Type": 3, + "Prefab": "", + "HarmRange": [ + 25 + ], + "RepelRange": [ + 150 + ], + "DeviationAngleRange": [ + 0 + ], + "SpeedRange": [ + 350 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 35 + ], + "UseGravity": false, + "VerticalSpeed": null, + "BounceCount": null, + "Penetration": null + } +] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/Sound.json b/DungeonShooting_Godot/resource/config/Sound.json index 9d7050d..73d3cb1 100644 --- a/DungeonShooting_Godot/resource/config/Sound.json +++ b/DungeonShooting_Godot/resource/config/Sound.json @@ -14,7 +14,7 @@ { "Id": "shooting0003", "Path": "res://resource/sound/sfx/shooting/Shooting0003.ogg", - "Volume": 0.8, + "Volume": 0.7, "Remark": "\u9730\u5F39\u67AA" }, { @@ -48,6 +48,24 @@ "Remark": "\u72D9\u51FB\u67AA" }, { + "Id": "shooting0009", + "Path": "res://resource/sound/sfx/shooting/Shooting0009.ogg", + "Volume": 1, + "Remark": "\u6FC0\u5149\u6B66\u5668" + }, + { + "Id": "shooting0010", + "Path": "res://resource/sound/sfx/shooting/Shooting0010.ogg", + "Volume": 1.2, + "Remark": "\u6FC0\u5149\u6B66\u5668" + }, + { + "Id": "shooting0011", + "Path": "res://resource/sound/sfx/shooting/Shooting0011.ogg", + "Volume": 1.8, + "Remark": "\u69B4\u5F39\u53D1\u5C04\u5668" + }, + { "Id": "reloading0001", "Path": "res://resource/sound/sfx/reloading/Reloading0001.ogg", "Volume": 1, @@ -60,6 +78,12 @@ "Remark": "\u9730\u5F39\u67AA\u5355\u72EC\u88C5\u5F39" }, { + "Id": "reloading0003", + "Path": "res://resource/sound/sfx/reloading/Reloading0003.ogg", + "Volume": 1.2, + "Remark": "\u69B4\u5F39\u53D1\u5C04\u5668\u88C5\u5F39" + }, + { "Id": "reloadBegin0002", "Path": "res://resource/sound/sfx/reloading/Reloading_begin0002.ogg", "Volume": 1, @@ -102,12 +126,36 @@ "Remark": "" }, { + "Id": "reloadBegin0011", + "Path": "res://resource/sound/sfx/reloading/Reloading_begin0011.ogg", + "Volume": 1, + "Remark": "\u6FC0\u5149\u6B66\u5668" + }, + { + "Id": "reloadBegin0012", + "Path": "res://resource/sound/sfx/reloading/Reloading_begin0012.ogg", + "Volume": 1.2, + "Remark": "" + }, + { "Id": "reloadFinish0002", "Path": "res://resource/sound/sfx/reloading/Reloading_finish0002.ogg", "Volume": 1, "Remark": "\u9730\u5F39\u67AA" }, { + "Id": "reloadFinish0003", + "Path": "res://resource/sound/sfx/reloading/Reloading_finish0003.ogg", + "Volume": 1, + "Remark": "\u6FC0\u5149\u6B66\u5668" + }, + { + "Id": "reloadFinish0004", + "Path": "res://resource/sound/sfx/reloading/Reloading_finish0004.ogg", + "Volume": 1.2, + "Remark": "" + }, + { "Id": "beLoaded0001", "Path": "res://resource/sound/sfx/beLoaded/BeLoaded0001.ogg", "Volume": 1, @@ -208,5 +256,29 @@ "Path": "res://resource/sound/sfx/beLoaded/BeLoaded0017.ogg", "Volume": 1, "Remark": "" + }, + { + "Id": "explosion0001", + "Path": "res://resource/sound/sfx/explosion/Explosion0001.ogg", + "Volume": 1.2, + "Remark": "\u7206\u70B8" + }, + { + "Id": "explosion0002", + "Path": "res://resource/sound/sfx/explosion/Explosion0002.ogg", + "Volume": 1.2, + "Remark": "\u7206\u70B8" + }, + { + "Id": "explosion0003", + "Path": "res://resource/sound/sfx/explosion/Explosion0003.ogg", + "Volume": 1.2, + "Remark": "\u7206\u70B8" + }, + { + "Id": "collision0001", + "Path": "res://resource/sound/sfx/collision/Collision0001.ogg", + "Volume": 0.7, + "Remark": "\u78B0\u649E" } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/Weapon.json b/DungeonShooting_Godot/resource/config/Weapon.json deleted file mode 100644 index 11a4daf..0000000 --- a/DungeonShooting_Godot/resource/config/Weapon.json +++ /dev/null @@ -1,1272 +0,0 @@ -[ - { - "Id": "0001", - "WeaponId": "weapon0001", - "Remark": "\u6B65\u67AA", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": true, - "AmmoCapacity": 30, - "MaxAmmoCapacity": 420, - "StandbyAmmoCapacity": 390, - "ReloadTime": 2.2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 0, - "StartFiringSpeed": 480, - "FinalFiringSpeed": 480, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 5, - "FinalScatteringRange": 45, - "ScatteringRangeAddValue": 3, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.5, - "CameraShake": 2, - "BacklashRange": [ - 2, - 4 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 10, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 4 - ], - "RepelRnage": [ - 20 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 320, - 350 - ], - "BulletDistanceRange": [ - 300, - 400 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0005", - "__BeginReloadSound": "reloadBegin0004", - "BeginReloadSoundDelayTime": 0.2, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0011", - "ReloadFinishSoundAdvanceTime": 0.4, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "0002", - "__AiAttackAttr": "" - }, - { - "Id": "0002", - "WeaponId": "", - "Remark": "\u6B65\u67AA", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 30, - "MaxAmmoCapacity": 420, - "StandbyAmmoCapacity": 390, - "ReloadTime": 2.2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 3 - ], - "TriggerInterval": 3, - "StartFiringSpeed": 480, - "FinalFiringSpeed": 480, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 5, - "FinalScatteringRange": 45, - "ScatteringRangeAddValue": 3, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.5, - "CameraShake": 2, - "BacklashRange": [ - 2, - 4 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 10, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 4 - ], - "RepelRnage": [ - 20 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 320, - 350 - ], - "BulletDistanceRange": [ - 300, - 400 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0005", - "__BeginReloadSound": "reloadBegin0004", - "BeginReloadSoundDelayTime": 0.2, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0011", - "ReloadFinishSoundAdvanceTime": 0.4, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "", - "__AiAttackAttr": "0001" - }, - { - "Id": "0003", - "WeaponId": "weapon0002", - "Remark": "\u9730\u5F39\u67AA", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 7, - "MaxAmmoCapacity": 140, - "StandbyAmmoCapacity": 133, - "ReloadTime": 0.4, - "AloneReload": true, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0.6, - "AloneReloadFinishIntervalTime": 0.6, - "AloneReloadCanShoot": true, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": true, - "AutoManualBeLoaded": true, - "BeLoadedTime": 0.6, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 0, - "StartFiringSpeed": 120, - "FinalFiringSpeed": 120, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 5 - ], - "DelayedTime": 0, - "StartScatteringRange": 12, - "FinalScatteringRange": 30, - "ScatteringRangeAddValue": 20, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.5, - "CameraShake": 4, - "BacklashRange": [ - 5, - 6 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 15, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0002", - "HarmRange": [ - 4 - ], - "RepelRnage": [ - 30 - ], - "BulletDeviationAngleRange": [ - -10, - 10 - ], - "BulletSpeedRange": [ - 280, - 380 - ], - "BulletDistanceRange": [ - 200, - 250 - ], - "ShellId": "shell0002", - "ThrowShellDelayTime": 0.2, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0003", - "__BeginReloadSound": "reloadBegin0002", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "reloading0002", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "reloadFinish0002", - "ReloadFinishSoundAdvanceTime": 0.3, - "__BeLoadedSound": "beLoaded0005", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "0004", - "__AiAttackAttr": "" - }, - { - "Id": "0004", - "WeaponId": "", - "Remark": "\u9730\u5F39\u67AA", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 7, - "MaxAmmoCapacity": 140, - "StandbyAmmoCapacity": 133, - "ReloadTime": 0.4, - "AloneReload": true, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0.6, - "AloneReloadFinishIntervalTime": 0.6, - "AloneReloadCanShoot": true, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": true, - "AutoManualBeLoaded": true, - "BeLoadedTime": 0.6, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 3.5, - "StartFiringSpeed": 120, - "FinalFiringSpeed": 120, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 5 - ], - "DelayedTime": 0, - "StartScatteringRange": 12, - "FinalScatteringRange": 30, - "ScatteringRangeAddValue": 20, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.5, - "CameraShake": 4, - "BacklashRange": [ - 5, - 6 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 15, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0002", - "HarmRange": [ - 4 - ], - "RepelRnage": [ - 30 - ], - "BulletDeviationAngleRange": [ - -10, - 10 - ], - "BulletSpeedRange": [ - 280, - 380 - ], - "BulletDistanceRange": [ - 200, - 250 - ], - "ShellId": "shell0002", - "ThrowShellDelayTime": 0.2, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0003", - "__BeginReloadSound": "reloadBegin0002", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "reloading0002", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "reloadFinish0002", - "ReloadFinishSoundAdvanceTime": 0.3, - "__BeLoadedSound": "beLoaded0005", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "", - "__AiAttackAttr": "0002" - }, - { - "Id": "0005", - "WeaponId": "weapon0003", - "Remark": "\u624B\u67AA", - "Weight": 20, - "WeightType": 1, - "ContinuousShoot": false, - "AmmoCapacity": 12, - "MaxAmmoCapacity": 180, - "StandbyAmmoCapacity": 168, - "ReloadTime": 1.5, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0.05, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 0, - "StartFiringSpeed": 460, - "FinalFiringSpeed": 460, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 5, - "FinalScatteringRange": 25, - "ScatteringRangeAddValue": 4, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.5, - "CameraShake": 4, - "BacklashRange": [ - 3, - 5 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 20, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 4 - ], - "RepelRnage": [ - 20 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 320, - 350 - ], - "BulletDistanceRange": [ - 250, - 300 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0004", - "__BeginReloadSound": "reloading0001", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0015", - "ReloadFinishSoundAdvanceTime": 0.43, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "0006", - "__AiAttackAttr": "" - }, - { - "Id": "0006", - "WeaponId": "", - "Remark": "\u624B\u67AA", - "Weight": 20, - "WeightType": 1, - "ContinuousShoot": false, - "AmmoCapacity": 12, - "MaxAmmoCapacity": 180, - "StandbyAmmoCapacity": 168, - "ReloadTime": 1.5, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0.05, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 2, - "StartFiringSpeed": 300, - "FinalFiringSpeed": 300, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 5, - "FinalScatteringRange": 25, - "ScatteringRangeAddValue": 4, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.5, - "CameraShake": 4, - "BacklashRange": [ - 3, - 5 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 20, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 4 - ], - "RepelRnage": [ - 20 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 320, - 350 - ], - "BulletDistanceRange": [ - 250, - 300 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0004", - "__BeginReloadSound": "reloading0001", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0015", - "ReloadFinishSoundAdvanceTime": 0.43, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "", - "__AiAttackAttr": "0003" - }, - { - "Id": "0007", - "WeaponId": "weapon0004", - "Remark": "\u5200", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 180, - "MaxAmmoCapacity": 180, - "StandbyAmmoCapacity": 180, - "ReloadTime": 2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": true, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 0, - "StartFiringSpeed": 180, - "FinalFiringSpeed": 180, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 0, - "FinalScatteringRange": 0, - "ScatteringRangeAddValue": 0, - "ScatteringRangeBackSpeed": 0, - "ScatteringRangeBackDelayTime": 0, - "CameraShake": 7, - "BacklashRange": [ - -8 - ], - "BacklashRegressionSpeed": 24, - "UpliftAngle": -95, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 25 - ], - "RepelRnage": [ - 150 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 350 - ], - "BulletDistanceRange": [ - 35 - ], - "ShellId": "", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "", - "__BeginReloadSound": "", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "", - "ReloadFinishSoundAdvanceTime": 0, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "0008", - "__AiAttackAttr": "" - }, - { - "Id": "0008", - "WeaponId": "", - "Remark": "\u5200", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 180, - "MaxAmmoCapacity": 180, - "StandbyAmmoCapacity": 180, - "ReloadTime": 2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": true, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 3, - "StartFiringSpeed": 180, - "FinalFiringSpeed": 180, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 0, - "FinalScatteringRange": 0, - "ScatteringRangeAddValue": 0, - "ScatteringRangeBackSpeed": 0, - "ScatteringRangeBackDelayTime": 0, - "CameraShake": 7, - "BacklashRange": [ - -8 - ], - "BacklashRegressionSpeed": 24, - "UpliftAngle": -95, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 25 - ], - "RepelRnage": [ - 150 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 350 - ], - "BulletDistanceRange": [ - 35 - ], - "ShellId": "", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "", - "__BeginReloadSound": "", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "", - "ReloadFinishSoundAdvanceTime": 0, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "", - "__AiAttackAttr": "0004" - }, - { - "Id": "0009", - "WeaponId": "weapon0005", - "Remark": "\u72D9\u51FB\u67AA", - "Weight": 50, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 10, - "MaxAmmoCapacity": 80, - "StandbyAmmoCapacity": 70, - "ReloadTime": 3, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": true, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0.9, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 0, - "StartFiringSpeed": 150, - "FinalFiringSpeed": 150, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 3, - "FinalScatteringRange": 60, - "ScatteringRangeAddValue": 40, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.8, - "CameraShake": 5, - "BacklashRange": [ - 5, - 7 - ], - "BacklashRegressionSpeed": 20, - "UpliftAngle": 15, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 30 - ], - "RepelRnage": [ - 250 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 600, - 620 - ], - "BulletDistanceRange": [ - 700, - 900 - ], - "ShellId": "shell0003", - "ThrowShellDelayTime": 0.2, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0008", - "__BeginReloadSound": "reloadBegin0009", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0007", - "ReloadFinishSoundAdvanceTime": 1, - "__BeLoadedSound": "beLoaded0007", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "0010", - "__AiAttackAttr": "" - }, - { - "Id": "0010", - "WeaponId": "", - "Remark": "\u72D9\u51FB\u67AA", - "Weight": 50, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 10, - "MaxAmmoCapacity": 80, - "StandbyAmmoCapacity": 70, - "ReloadTime": 3, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": true, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0.9, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 5, - "StartFiringSpeed": 150, - "FinalFiringSpeed": 150, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 3, - "FinalScatteringRange": 60, - "ScatteringRangeAddValue": 40, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.8, - "CameraShake": 5, - "BacklashRange": [ - 5, - 7 - ], - "BacklashRegressionSpeed": 20, - "UpliftAngle": 15, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0001", - "HarmRange": [ - 30 - ], - "RepelRnage": [ - 250 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 600, - 620 - ], - "BulletDistanceRange": [ - 700, - 900 - ], - "ShellId": "shell0003", - "ThrowShellDelayTime": 0.2, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0008", - "__BeginReloadSound": "reloadBegin0009", - "BeginReloadSoundDelayTime": 0, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0007", - "ReloadFinishSoundAdvanceTime": 1, - "__BeLoadedSound": "beLoaded0007", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "", - "__AiAttackAttr": "0005" - }, - { - "Id": "0011", - "WeaponId": "weapon0006", - "Remark": "\u51B2\u950B\u67AA", - "Weight": 30, - "WeightType": 2, - "ContinuousShoot": true, - "AmmoCapacity": 20, - "MaxAmmoCapacity": 600, - "StandbyAmmoCapacity": 580, - "ReloadTime": 2.2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 0, - "StartFiringSpeed": 700, - "FinalFiringSpeed": 700, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 3, - "FinalScatteringRange": 30, - "ScatteringRangeAddValue": 2, - "ScatteringRangeBackSpeed": 40, - "ScatteringRangeBackDelayTime": 0.3, - "CameraShake": 2, - "BacklashRange": [ - 1, - 2 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 5, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0002", - "HarmRange": [ - 3 - ], - "RepelRnage": [ - 10 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 320, - 340 - ], - "BulletDistanceRange": [ - 300, - 400 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0002", - "__BeginReloadSound": "reloadBegin0005", - "BeginReloadSoundDelayTime": 0.2, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0016", - "ReloadFinishSoundAdvanceTime": 0.5, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "0012", - "__AiAttackAttr": "" - }, - { - "Id": "0012", - "WeaponId": "", - "Remark": "\u51B2\u950B\u67AA", - "Weight": 30, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 20, - "MaxAmmoCapacity": 600, - "StandbyAmmoCapacity": 580, - "ReloadTime": 2.2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 5 - ], - "TriggerInterval": 3.5, - "StartFiringSpeed": 700, - "FinalFiringSpeed": 700, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 3, - "FinalScatteringRange": 30, - "ScatteringRangeAddValue": 2, - "ScatteringRangeBackSpeed": 30, - "ScatteringRangeBackDelayTime": 0.3, - "CameraShake": 2, - "BacklashRange": [ - 1, - 2 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 5, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0002", - "HarmRange": [ - 3 - ], - "RepelRnage": [ - 10 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 320, - 340 - ], - "BulletDistanceRange": [ - 300, - 400 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0002", - "__BeginReloadSound": "reloadBegin0005", - "BeginReloadSoundDelayTime": 0.2, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0016", - "ReloadFinishSoundAdvanceTime": 0.5, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "", - "__AiAttackAttr": "0004" - }, - { - "Id": "0013", - "WeaponId": "weapon0007", - "Remark": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": true, - "AmmoCapacity": 60, - "MaxAmmoCapacity": 600, - "StandbyAmmoCapacity": 540, - "ReloadTime": 2.2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 1 - ], - "TriggerInterval": 0, - "StartFiringSpeed": 700, - "FinalFiringSpeed": 700, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 6, - "FinalScatteringRange": 60, - "ScatteringRangeAddValue": 3, - "ScatteringRangeBackSpeed": 50, - "ScatteringRangeBackDelayTime": 0.3, - "CameraShake": 2, - "BacklashRange": [ - 1, - 2 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 5, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0003", - "HarmRange": [ - 3 - ], - "RepelRnage": [ - 15 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 300, - 330 - ], - "BulletDistanceRange": [ - 270, - 360 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0007", - "__BeginReloadSound": "reloadBegin0006", - "BeginReloadSoundDelayTime": 0.2, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0017", - "ReloadFinishSoundAdvanceTime": 0.65, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "0014", - "__AiAttackAttr": "" - }, - { - "Id": "0014", - "WeaponId": "", - "Remark": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA", - "Weight": 40, - "WeightType": 2, - "ContinuousShoot": false, - "AmmoCapacity": 60, - "MaxAmmoCapacity": 600, - "StandbyAmmoCapacity": 540, - "ReloadTime": 2.2, - "AloneReload": false, - "AloneReloadCount": 1, - "AloneReloadBeginIntervalTime": 0, - "AloneReloadFinishIntervalTime": 0, - "AloneReloadCanShoot": false, - "LooseShoot": false, - "MinChargeTime": 0, - "ManualBeLoaded": false, - "AutoManualBeLoaded": false, - "BeLoadedTime": 0, - "ContinuousCountRange": [ - 10 - ], - "TriggerInterval": 5, - "StartFiringSpeed": 200, - "FinalFiringSpeed": 200, - "FiringSpeedAddSpeed": 0, - "FiringSpeedBackSpeed": 0, - "FireBulletCountRange": [ - 1 - ], - "DelayedTime": 0, - "StartScatteringRange": 10, - "FinalScatteringRange": 30, - "ScatteringRangeAddValue": 3, - "ScatteringRangeBackSpeed": 50, - "ScatteringRangeBackDelayTime": 0.3, - "CameraShake": 2, - "BacklashRange": [ - 1, - 2 - ], - "BacklashRegressionSpeed": 35, - "UpliftAngle": 5, - "DefaultAngle": 0, - "UpliftAngleRestore": 1, - "BulletId": "bullet0003", - "HarmRange": [ - 3 - ], - "RepelRnage": [ - 15 - ], - "BulletDeviationAngleRange": [ - 0 - ], - "BulletSpeedRange": [ - 300, - 330 - ], - "BulletDistanceRange": [ - 270, - 360 - ], - "ShellId": "shell0001", - "ThrowShellDelayTime": 0, - "ThrowCollisionSize": { - "X": 20, - "Y": 15 - }, - "CanMeleeAttack": true, - "MeleeAttackHarmRange": [ - 10 - ], - "MeleeAttackRepelRnage": [ - 100 - ], - "__ShootSound": "shooting0007", - "__BeginReloadSound": "reloadBegin0006", - "BeginReloadSoundDelayTime": 0.2, - "__ReloadSound": "", - "ReloadSoundDelayTime": 0, - "__ReloadFinishSound": "beLoaded0017", - "ReloadFinishSoundAdvanceTime": 0.65, - "__BeLoadedSound": "", - "BeLoadedSoundDelayTime": 0, - "__OtherSoundMap": null, - "__AiUseAttribute": "", - "__AiAttackAttr": "0006" - } -] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/config/WeaponBase.json b/DungeonShooting_Godot/resource/config/WeaponBase.json new file mode 100644 index 0000000..8f0b579 --- /dev/null +++ b/DungeonShooting_Godot/resource/config/WeaponBase.json @@ -0,0 +1,1386 @@ +[ + { + "Id": "0001", + "__Activity": "weapon0001", + "Remark": "\u6B65\u67AA", + "Weight": 40, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": true, + "AmmoCapacity": 30, + "MaxAmmoCapacity": 420, + "StandbyAmmoCapacity": 390, + "ReloadTime": 2.2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 480, + "FinalFiringSpeed": 480, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 5, + "FinalScatteringRange": 45, + "ScatteringRangeAddValue": 3, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, + "BacklashRange": [ + 2, + 4 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 10, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0001", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0005", + "__BeginReloadSound": "reloadBegin0004", + "BeginReloadSoundDelayTime": 0.2, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0011", + "ReloadFinishSoundAdvanceTime": 0.4, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0002", + "__AiAttackAttr": "" + }, + { + "Id": "0002", + "__Activity": "", + "Remark": "\u6B65\u67AA", + "Weight": 40, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 30, + "MaxAmmoCapacity": 420, + "StandbyAmmoCapacity": 390, + "ReloadTime": 2.2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 3 + ], + "TriggerInterval": 3, + "StartFiringSpeed": 480, + "FinalFiringSpeed": 480, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 5, + "FinalScatteringRange": 45, + "ScatteringRangeAddValue": 3, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, + "BacklashRange": [ + 2, + 4 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 10, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0001", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0005", + "__BeginReloadSound": "reloadBegin0004", + "BeginReloadSoundDelayTime": 0.2, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0011", + "ReloadFinishSoundAdvanceTime": 0.4, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0001" + }, + { + "Id": "0003", + "__Activity": "weapon0002", + "Remark": "\u9730\u5F39\u67AA", + "Weight": 40, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 7, + "MaxAmmoCapacity": 140, + "StandbyAmmoCapacity": 133, + "ReloadTime": 0.4, + "AloneReload": true, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0.6, + "AloneReloadFinishIntervalTime": 0.6, + "AloneReloadCanShoot": true, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": true, + "AutoManualBeLoaded": true, + "BeLoadedTime": 0.6, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 120, + "FinalFiringSpeed": 120, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 5 + ], + "DelayedTime": 0, + "StartScatteringRange": 12, + "FinalScatteringRange": 30, + "ScatteringRangeAddValue": 20, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, + "BacklashRange": [ + 5, + 6 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 15, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0002", + "__Shell": "shell0002", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0.2, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0003", + "__BeginReloadSound": "reloadBegin0002", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "reloading0002", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "reloadFinish0002", + "ReloadFinishSoundAdvanceTime": 0.3, + "__BeLoadedSound": "beLoaded0005", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0004", + "__AiAttackAttr": "" + }, + { + "Id": "0004", + "__Activity": "", + "Remark": "\u9730\u5F39\u67AA", + "Weight": 40, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 7, + "MaxAmmoCapacity": 140, + "StandbyAmmoCapacity": 133, + "ReloadTime": 0.4, + "AloneReload": true, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0.6, + "AloneReloadFinishIntervalTime": 0.6, + "AloneReloadCanShoot": true, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": true, + "AutoManualBeLoaded": true, + "BeLoadedTime": 0.6, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 3.5, + "StartFiringSpeed": 120, + "FinalFiringSpeed": 120, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 5 + ], + "DelayedTime": 0, + "StartScatteringRange": 12, + "FinalScatteringRange": 30, + "ScatteringRangeAddValue": 20, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, + "BacklashRange": [ + 5, + 6 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 15, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0002", + "__Shell": "shell0002", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0.2, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0003", + "__BeginReloadSound": "reloadBegin0002", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "reloading0002", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "reloadFinish0002", + "ReloadFinishSoundAdvanceTime": 0.3, + "__BeLoadedSound": "beLoaded0005", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0002" + }, + { + "Id": "0005", + "__Activity": "weapon0003", + "Remark": "\u624B\u67AA", + "Weight": 20, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 12, + "MaxAmmoCapacity": 180, + "StandbyAmmoCapacity": 168, + "ReloadTime": 1.5, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0.05, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 460, + "FinalFiringSpeed": 460, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 5, + "FinalScatteringRange": 25, + "ScatteringRangeAddValue": 4, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, + "BacklashRange": [ + 3, + 5 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 20, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0001", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0004", + "__BeginReloadSound": "reloading0001", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0015", + "ReloadFinishSoundAdvanceTime": 0.43, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0006", + "__AiAttackAttr": "" + }, + { + "Id": "0006", + "__Activity": "", + "Remark": "\u624B\u67AA", + "Weight": 20, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 12, + "MaxAmmoCapacity": 180, + "StandbyAmmoCapacity": 168, + "ReloadTime": 1.5, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0.05, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 1.3, + "StartFiringSpeed": 300, + "FinalFiringSpeed": 300, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 5, + "FinalScatteringRange": 25, + "ScatteringRangeAddValue": 4, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 4, + "BacklashRange": [ + 3, + 5 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 20, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0001", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0004", + "__BeginReloadSound": "reloading0001", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0015", + "ReloadFinishSoundAdvanceTime": 0.43, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0003" + }, + { + "Id": "0007", + "__Activity": "weapon0004", + "Remark": "\u5200", + "Weight": 40, + "WeightType": 2, + "IsMelee": true, + "ContinuousShoot": false, + "AmmoCapacity": 180, + "MaxAmmoCapacity": 180, + "StandbyAmmoCapacity": 180, + "ReloadTime": 2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": true, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 180, + "FinalFiringSpeed": 180, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 0, + "FinalScatteringRange": 0, + "ScatteringRangeAddValue": 0, + "ScatteringRangeBackSpeed": 0, + "ScatteringRangeBackDelayTime": 0, + "CameraShake": 7, + "BacklashRange": [ + -8 + ], + "BacklashRegressionSpeed": 24, + "UpliftAngle": -95, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "", + "__Bullet": "2001", + "__Shell": "", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "", + "__BeginReloadSound": "", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "", + "ReloadFinishSoundAdvanceTime": 0, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0008", + "__AiAttackAttr": "" + }, + { + "Id": "0008", + "__Activity": "", + "Remark": "\u5200", + "Weight": 40, + "WeightType": 2, + "IsMelee": true, + "ContinuousShoot": false, + "AmmoCapacity": 180, + "MaxAmmoCapacity": 180, + "StandbyAmmoCapacity": 180, + "ReloadTime": 2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": true, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 3, + "StartFiringSpeed": 180, + "FinalFiringSpeed": 180, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 0, + "FinalScatteringRange": 0, + "ScatteringRangeAddValue": 0, + "ScatteringRangeBackSpeed": 0, + "ScatteringRangeBackDelayTime": 0, + "CameraShake": 7, + "BacklashRange": [ + -8 + ], + "BacklashRegressionSpeed": 24, + "UpliftAngle": -95, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "", + "__Bullet": "2001", + "__Shell": "", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "", + "__BeginReloadSound": "", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "", + "ReloadFinishSoundAdvanceTime": 0, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0004" + }, + { + "Id": "0009", + "__Activity": "weapon0005", + "Remark": "\u72D9\u51FB\u67AA", + "Weight": 50, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 10, + "MaxAmmoCapacity": 80, + "StandbyAmmoCapacity": 70, + "ReloadTime": 3, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": true, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0.9, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 150, + "FinalFiringSpeed": 150, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 3, + "FinalScatteringRange": 60, + "ScatteringRangeAddValue": 40, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.8, + "CameraShake": 5, + "BacklashRange": [ + 5, + 7 + ], + "BacklashRegressionSpeed": 20, + "UpliftAngle": 15, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0004", + "__Shell": "shell0003", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0.2, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0008", + "__BeginReloadSound": "reloadBegin0009", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0007", + "ReloadFinishSoundAdvanceTime": 1, + "__BeLoadedSound": "beLoaded0007", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0010", + "__AiAttackAttr": "" + }, + { + "Id": "0010", + "__Activity": "", + "Remark": "\u72D9\u51FB\u67AA", + "Weight": 50, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 10, + "MaxAmmoCapacity": 80, + "StandbyAmmoCapacity": 70, + "ReloadTime": 3, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": true, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0.9, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 5, + "StartFiringSpeed": 150, + "FinalFiringSpeed": 150, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 3, + "FinalScatteringRange": 60, + "ScatteringRangeAddValue": 40, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.8, + "CameraShake": 5, + "BacklashRange": [ + 5, + 7 + ], + "BacklashRegressionSpeed": 20, + "UpliftAngle": 15, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0004", + "__Shell": "shell0003", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0.2, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0008", + "__BeginReloadSound": "reloadBegin0009", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0007", + "ReloadFinishSoundAdvanceTime": 1, + "__BeLoadedSound": "beLoaded0007", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0005" + }, + { + "Id": "0011", + "__Activity": "weapon0006", + "Remark": "\u51B2\u950B\u67AA", + "Weight": 30, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": true, + "AmmoCapacity": 20, + "MaxAmmoCapacity": 600, + "StandbyAmmoCapacity": 580, + "ReloadTime": 2.2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 700, + "FinalFiringSpeed": 700, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 3, + "FinalScatteringRange": 30, + "ScatteringRangeAddValue": 2, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, + "BacklashRange": [ + 1, + 2 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 5, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0002", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0002", + "__BeginReloadSound": "reloadBegin0005", + "BeginReloadSoundDelayTime": 0.2, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0016", + "ReloadFinishSoundAdvanceTime": 0.5, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0012", + "__AiAttackAttr": "" + }, + { + "Id": "0012", + "__Activity": "", + "Remark": "\u51B2\u950B\u67AA", + "Weight": 30, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 20, + "MaxAmmoCapacity": 600, + "StandbyAmmoCapacity": 580, + "ReloadTime": 2.2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 5 + ], + "TriggerInterval": 3.5, + "StartFiringSpeed": 700, + "FinalFiringSpeed": 700, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 3, + "FinalScatteringRange": 30, + "ScatteringRangeAddValue": 2, + "ScatteringRangeBackSpeed": 30, + "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, + "BacklashRange": [ + 1, + 2 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 5, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0002", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0002", + "__BeginReloadSound": "reloadBegin0005", + "BeginReloadSoundDelayTime": 0.2, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0016", + "ReloadFinishSoundAdvanceTime": 0.5, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0004" + }, + { + "Id": "0013", + "__Activity": "weapon0007", + "Remark": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA", + "Weight": 40, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": true, + "AmmoCapacity": 60, + "MaxAmmoCapacity": 600, + "StandbyAmmoCapacity": 540, + "ReloadTime": 2.2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 700, + "FinalFiringSpeed": 700, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 6, + "FinalScatteringRange": 60, + "ScatteringRangeAddValue": 3, + "ScatteringRangeBackSpeed": 50, + "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, + "BacklashRange": [ + 1, + 2 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 5, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0003", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0007", + "__BeginReloadSound": "reloadBegin0006", + "BeginReloadSoundDelayTime": 0.2, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0017", + "ReloadFinishSoundAdvanceTime": 0.65, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0014", + "__AiAttackAttr": "" + }, + { + "Id": "0014", + "__Activity": "", + "Remark": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA", + "Weight": 40, + "WeightType": 2, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 60, + "MaxAmmoCapacity": 600, + "StandbyAmmoCapacity": 540, + "ReloadTime": 2.2, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 10 + ], + "TriggerInterval": 4.5, + "StartFiringSpeed": 200, + "FinalFiringSpeed": 200, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 10, + "FinalScatteringRange": 30, + "ScatteringRangeAddValue": 3, + "ScatteringRangeBackSpeed": 50, + "ScatteringRangeBackDelayTime": 0.3, + "CameraShake": 2, + "BacklashRange": [ + 1, + 2 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 5, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0003", + "__Shell": "shell0001", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0007", + "__BeginReloadSound": "reloadBegin0006", + "BeginReloadSoundDelayTime": 0.2, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "beLoaded0017", + "ReloadFinishSoundAdvanceTime": 0.65, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0006" + }, + { + "Id": "0015", + "__Activity": "weapon0008", + "Remark": "\u6FC0\u5149\u624B\u67AA", + "Weight": 40, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 10, + "MaxAmmoCapacity": 240, + "StandbyAmmoCapacity": 120, + "ReloadTime": 1.8, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 300, + "FinalFiringSpeed": 300, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 0, + "FinalScatteringRange": 20, + "ScatteringRangeAddValue": 4, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, + "BacklashRange": [ + 2, + 3 + ], + "BacklashRegressionSpeed": 25, + "UpliftAngle": 13, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire2.tscn", + "__Bullet": "1001", + "__Shell": "", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0010", + "__BeginReloadSound": "reloadBegin0011", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "reloadFinish0003", + "ReloadFinishSoundAdvanceTime": 0.8, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0016", + "__AiAttackAttr": "" + }, + { + "Id": "0016", + "__Activity": "", + "Remark": "\u6FC0\u5149\u624B\u67AA", + "Weight": 40, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 10, + "MaxAmmoCapacity": 240, + "StandbyAmmoCapacity": 120, + "ReloadTime": 1.8, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 4, + "StartFiringSpeed": 300, + "FinalFiringSpeed": 300, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 0, + "FinalScatteringRange": 20, + "ScatteringRangeAddValue": 4, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, + "BacklashRange": [ + 2, + 3 + ], + "BacklashRegressionSpeed": 25, + "UpliftAngle": 13, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "res://prefab/effect/weapon/ShotFire2.tscn", + "__Bullet": "1001", + "__Shell": "", + "ReloadThrowShell": false, + "ThrowShellDelayTime": 0, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0010", + "__BeginReloadSound": "reloadBegin0011", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "reloadFinish0003", + "ReloadFinishSoundAdvanceTime": 0.8, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0007" + }, + { + "Id": "0017", + "__Activity": "weapon0009", + "Remark": "\u69B4\u5F39\u53D1\u5C04\u5668", + "Weight": 40, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 1, + "MaxAmmoCapacity": 50, + "StandbyAmmoCapacity": 25, + "ReloadTime": 1.5, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 60, + "FinalFiringSpeed": 60, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 3, + "FinalScatteringRange": 8, + "ScatteringRangeAddValue": 5, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, + "BacklashRange": [ + 2, + 3 + ], + "BacklashRegressionSpeed": 20, + "UpliftAngle": 16, + "DefaultAngle": 0, + "UpliftAngleRestore": 3, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0005", + "__Shell": "shell0004", + "ReloadThrowShell": true, + "ThrowShellDelayTime": 0.46, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0011", + "__BeginReloadSound": "reloadBegin0012", + "BeginReloadSoundDelayTime": 0.24, + "__ReloadSound": "reloading0003", + "ReloadSoundDelayTime": 0.8, + "__ReloadFinishSound": "reloadFinish0004", + "ReloadFinishSoundAdvanceTime": 0.26, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "0018", + "__AiAttackAttr": "" + }, + { + "Id": "0018", + "__Activity": "", + "Remark": "\u69B4\u5F39\u53D1\u5C04\u5668", + "Weight": 40, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 1, + "MaxAmmoCapacity": 50, + "StandbyAmmoCapacity": 25, + "ReloadTime": 1.5, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": false, + "MinChargeTime": 0, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 5, + "StartFiringSpeed": 60, + "FinalFiringSpeed": 60, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 3, + "FinalScatteringRange": 8, + "ScatteringRangeAddValue": 5, + "ScatteringRangeBackSpeed": 40, + "ScatteringRangeBackDelayTime": 0.5, + "CameraShake": 2, + "BacklashRange": [ + 2, + 3 + ], + "BacklashRegressionSpeed": 20, + "UpliftAngle": 16, + "DefaultAngle": 0, + "UpliftAngleRestore": 3, + "FireEffect": "res://prefab/effect/weapon/ShotFire.tscn", + "__Bullet": "0005", + "__Shell": "shell0004", + "ReloadThrowShell": true, + "ThrowShellDelayTime": 0.46, + "ThrowCollisionSize": { + "X": 20, + "Y": 15 + }, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "shooting0011", + "__BeginReloadSound": "reloadBegin0012", + "BeginReloadSoundDelayTime": 0.24, + "__ReloadSound": "reloading0003", + "ReloadSoundDelayTime": 0.8, + "__ReloadFinishSound": "reloadFinish0004", + "ReloadFinishSoundAdvanceTime": 0.26, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiUseAttribute": "", + "__AiAttackAttr": "0008" + } +] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index d9e69c2..d515189 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -13,6 +13,14 @@ { "ErrorType": 0, "Path": "resource/map/tileMaps/TestGroup1/battle/Battle3" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/battle/Battle4" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/battle/Battle5" } ], "InletList": [ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preinstall.json new file mode 100644 index 0000000..3ca0692 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"Test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":-138,"Y":82},"Size":{"X":36,"Y":48},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":60,"Y":145},"Size":{"X":40,"Y":51},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0008","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-66,"Y":-6},"Size":{"X":51,"Y":49},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0008","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-2,"Y":-54},"Size":{"X":75,"Y":37},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0008","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]}],[{"Position":{"X":-182,"Y":105},"Size":{"X":59,"Y":26},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0005","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-162,"Y":27},"Size":{"X":42,"Y":37},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0003","CurrAmmon":"12","ResidueAmmo":"12"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":48,"Y":21},"Size":{"X":16,"Y":91},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0005","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-52,"Y":155},"Size":{"X":106,"Y":41},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0008","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preview.png new file mode 100644 index 0000000..952d28b --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preview.png.import new file mode 100644 index 0000000..9e4ef59 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://x2ytkmtkn53s" +path="res://.godot/imported/Preview.png-8f3c76ec034bcd9156b51bf3b67fca71.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/TestGroup1/battle/Battle4/Preview.png" +dest_files=["res://.godot/imported/Preview.png-8f3c76ec034bcd9156b51bf3b67fca71.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/RoomInfo.json new file mode 100644 index 0000000..a698207 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-16,"Y":-15},"Size":{"X":26,"Y":31},"DoorAreaInfos":[{"Direction":0,"Start":128,"End":272},{"Direction":2,"Start":144,"End":304},{"Direction":1,"Start":208,"End":368},{"Direction":3,"Start":80,"End":192}],"GroupName":"TestGroup1","RoomType":0,"RoomName":"Battle4","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/TileInfo.json new file mode 100644 index 0000000..859f5fd --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle4/TileInfo.json @@ -0,0 +1 @@ +{"NavigationList":[{"Type":0,"Points":[-152,-216,-56,-216,-56,-88,136,-88,136,48,104,48,104,208,56,208,56,240,-88,240,-88,192,-136,192,-136,144,-232,144,-232,-8,-120,-8,-120,-48,-152,-48]},{"Type":1,"Points":[-24,-16,24,-16,24,88,8,88,8,104,-8,104,-8,120,-88,120,-88,32,-40,32,-40,48,-24,48]}],"Floor":[-2,-2,0,0,8,-1,-2,0,0,8,0,-2,0,0,8,1,-2,0,0,8,2,-2,0,0,8,3,-2,0,0,8,4,-2,0,0,8,5,-2,0,0,8,6,-2,0,0,8,7,-2,0,0,8,-8,-6,0,0,8,-8,-5,0,0,8,-8,-4,0,0,8,-8,-3,0,0,8,-8,-2,0,0,8,-8,-1,0,0,8,-8,0,0,0,8,-8,1,0,0,8,-8,2,0,0,8,-7,-6,0,0,8,-7,-5,0,0,8,-7,-4,0,0,8,-7,-3,0,0,8,-7,-2,0,0,8,-7,-1,0,0,8,-7,0,0,0,8,-7,1,0,0,8,-7,2,0,0,8,-6,-6,0,0,8,-6,-5,0,0,8,-6,-4,0,0,8,-6,-3,0,0,8,-6,-2,0,0,8,-6,-1,0,0,8,-6,0,0,0,8,-6,1,0,0,8,-6,2,0,0,8,-5,-6,0,0,8,-5,-5,0,0,8,-5,-4,0,0,8,-5,-3,0,0,8,-5,-2,0,0,8,-5,-1,0,0,8,-5,0,0,0,8,-5,1,0,0,8,-4,-6,0,0,8,-4,-5,0,0,8,-4,-4,0,0,8,-4,-3,0,0,8,-4,-2,0,0,8,-4,-1,0,0,8,-4,0,0,0,8,-4,1,0,0,8,-3,-6,0,0,8,-3,-5,0,0,8,-3,-4,0,0,8,-3,-3,0,0,8,-3,-2,0,0,8,-3,-1,0,0,8,-3,0,0,0,8,-3,1,0,0,8,-2,-6,0,0,8,-2,-5,0,0,8,-2,-4,0,0,8,-2,-3,0,0,8,-2,-1,0,0,8,-2,0,0,0,8,-2,1,0,0,8,-2,2,0,0,8,-1,-6,0,0,8,-1,-5,0,0,8,-1,-4,0,0,8,-1,-3,0,0,8,0,-6,0,0,8,0,-5,0,0,8,0,-4,0,0,8,0,-3,0,0,8,1,-6,0,0,8,1,-5,0,0,8,1,-4,0,0,8,1,-3,0,0,8,1,-1,0,0,8,1,0,0,0,8,1,1,0,0,8,1,2,0,0,8,2,-6,0,0,8,2,-5,0,0,8,2,-4,0,0,8,2,-3,0,0,8,2,-1,0,0,8,2,0,0,0,8,2,1,0,0,8,2,2,0,0,8,3,-6,0,0,8,3,-5,0,0,8,3,-4,0,0,8,3,-3,0,0,8,3,-1,0,0,8,3,0,0,0,8,3,1,0,0,8,3,2,0,0,8,4,-6,0,0,8,4,-5,0,0,8,4,-4,0,0,8,4,-3,0,0,8,4,-1,0,0,8,4,0,0,0,8,4,1,0,0,8,4,2,0,0,8,5,-6,0,0,8,5,-5,0,0,8,5,-4,0,0,8,5,-3,0,0,8,5,-1,0,0,8,5,0,0,0,8,5,1,0,0,8,5,2,0,0,8,6,-6,0,0,8,6,-5,0,0,8,6,-4,0,0,8,6,-3,0,0,8,6,-1,0,0,8,6,0,0,0,8,6,1,0,0,8,6,2,0,0,8,7,-6,0,0,8,7,-5,0,0,8,7,-4,0,0,8,7,-3,0,0,8,7,-1,0,0,8,7,0,0,0,8,7,1,0,0,8,7,2,0,0,8,8,-6,0,0,8,8,-5,0,0,8,8,-4,0,0,8,8,-3,0,0,8,8,-2,0,0,8,8,-1,0,0,8,8,0,0,0,8,8,1,0,0,8,8,2,0,0,8,0,5,0,0,8,0,6,0,0,8,0,7,0,0,8,0,8,0,0,8,1,3,0,0,8,1,4,0,0,8,1,5,0,0,8,1,6,0,0,8,1,7,0,0,8,1,8,0,0,8,2,3,0,0,8,2,4,0,0,8,2,5,0,0,8,2,6,0,0,8,2,7,0,0,8,2,8,0,0,8,3,3,0,0,8,3,4,0,0,8,3,5,0,0,8,3,6,0,0,8,3,7,0,0,8,3,8,0,0,8,4,3,0,0,8,4,4,0,0,8,4,5,0,0,8,4,6,0,0,8,4,7,0,0,8,4,8,0,0,8,5,3,0,0,8,5,4,0,0,8,5,5,0,0,8,5,6,0,0,8,5,7,0,0,8,5,8,0,0,8,6,3,0,0,8,6,4,0,0,8,6,5,0,0,8,6,6,0,0,8,6,7,0,0,8,6,8,0,0,8,-10,-14,0,0,8,-10,-13,0,0,8,-10,-12,0,0,8,-10,-11,0,0,8,-10,-10,0,0,8,-10,-9,0,0,8,-10,-8,0,0,8,-10,-7,0,0,8,-10,-6,0,0,8,-10,-5,0,0,8,-10,-4,0,0,8,-9,-14,0,0,8,-9,-13,0,0,8,-9,-12,0,0,8,-9,-11,0,0,8,-9,-10,0,0,8,-9,-9,0,0,8,-9,-8,0,0,8,-9,-7,0,0,8,-9,-6,0,0,8,-9,-5,0,0,8,-9,-4,0,0,8,-8,-14,0,0,8,-8,-13,0,0,8,-8,-12,0,0,8,-8,-11,0,0,8,-8,-10,0,0,8,-8,-9,0,0,8,-8,-8,0,0,8,-8,-7,0,0,8,-7,-14,0,0,8,-7,-13,0,0,8,-7,-12,0,0,8,-7,-11,0,0,8,-7,-10,0,0,8,-7,-9,0,0,8,-7,-8,0,0,8,-7,-7,0,0,8,-6,-14,0,0,8,-6,-13,0,0,8,-6,-12,0,0,8,-6,-11,0,0,8,-6,-10,0,0,8,-6,-9,0,0,8,-6,-8,0,0,8,-6,-7,0,0,8,-5,-14,0,0,8,-5,-13,0,0,8,-5,-12,0,0,8,-5,-11,0,0,8,-5,-10,0,0,8,-5,-9,0,0,8,-5,-8,0,0,8,-5,-7,0,0,8,-4,-14,0,0,8,-4,-13,0,0,8,-4,-12,0,0,8,-4,-11,0,0,8,-4,-10,0,0,8,-4,-9,0,0,8,-4,-8,0,0,8,-4,-7,0,0,8,-15,-1,0,0,8,-15,0,0,0,8,-15,1,0,0,8,-15,2,0,0,8,-15,3,0,0,8,-15,4,0,0,8,-15,5,0,0,8,-15,6,0,0,8,-15,7,0,0,8,-15,8,0,0,8,-14,-1,0,0,8,-14,0,0,0,8,-14,1,0,0,8,-14,2,0,0,8,-14,3,0,0,8,-14,4,0,0,8,-14,5,0,0,8,-14,6,0,0,8,-14,7,0,0,8,-14,8,0,0,8,-13,-1,0,0,8,-13,0,0,0,8,-13,1,0,0,8,-13,2,0,0,8,-13,3,0,0,8,-13,4,0,0,8,-13,5,0,0,8,-13,6,0,0,8,-13,7,0,0,8,-13,8,0,0,8,-12,-1,0,0,8,-12,0,0,0,8,-12,1,0,0,8,-12,2,0,0,8,-12,3,0,0,8,-12,4,0,0,8,-12,5,0,0,8,-12,6,0,0,8,-12,7,0,0,8,-12,8,0,0,8,-11,-1,0,0,8,-11,0,0,0,8,-11,1,0,0,8,-11,2,0,0,8,-11,3,0,0,8,-11,4,0,0,8,-11,5,0,0,8,-11,6,0,0,8,-11,7,0,0,8,-11,8,0,0,8,-10,-1,0,0,8,-10,0,0,0,8,-10,1,0,0,8,-10,2,0,0,8,-10,3,0,0,8,-10,4,0,0,8,-10,5,0,0,8,-10,6,0,0,8,-10,7,0,0,8,-10,8,0,0,8,-9,-1,0,0,8,-9,0,0,0,8,-9,1,0,0,8,-9,2,0,0,8,-9,3,0,0,8,-9,4,0,0,8,-9,5,0,0,8,-9,6,0,0,8,-9,7,0,0,8,-9,8,0,0,8,-8,3,0,0,8,-8,4,0,0,8,-8,5,0,0,8,-8,6,0,0,8,-8,7,0,0,8,-8,8,0,0,8,-7,3,0,0,8,-7,4,0,0,8,-7,5,0,0,8,-7,6,0,0,8,-7,7,0,0,8,-7,8,0,0,8,-6,3,0,0,8,-6,4,0,0,8,-6,5,0,0,8,-6,6,0,0,8,-6,7,0,0,8,-6,8,0,0,8,-5,7,0,0,8,-5,8,0,0,8,-4,7,0,0,8,-4,8,0,0,8,-4,9,0,0,8,-4,10,0,0,8,-4,11,0,0,8,-4,12,0,0,8,-3,7,0,0,8,-3,8,0,0,8,-3,9,0,0,8,-3,10,0,0,8,-3,11,0,0,8,-3,12,0,0,8,-2,7,0,0,8,-2,8,0,0,8,-2,9,0,0,8,-2,10,0,0,8,-2,11,0,0,8,-2,12,0,0,8,-1,6,0,0,8,-1,7,0,0,8,-1,8,0,0,8,-1,9,0,0,8,-1,10,0,0,8,-1,11,0,0,8,-1,12,0,0,8,0,9,0,0,8,0,10,0,0,8,0,11,0,0,8,0,12,0,0,8,1,9,0,0,8,1,10,0,0,8,1,11,0,0,8,1,12,0,0,8,2,9,0,0,8,2,10,0,0,8,2,11,0,0,8,2,12,0,0,8,-6,9,0,0,8,-6,10,0,0,8,-6,11,0,0,8,-6,12,0,0,8,-6,13,0,0,8,-6,14,0,0,8,-5,9,0,0,8,-5,10,0,0,8,-5,11,0,0,8,-5,12,0,0,8,-5,13,0,0,8,-5,14,0,0,8,-4,13,0,0,8,-4,14,0,0,8,-9,9,0,0,8,-9,10,0,0,8,-9,11,0,0,8,-8,9,0,0,8,-8,10,0,0,8,-8,11,0,0,8,-7,9,0,0,8,-7,10,0,0,8,-7,11,0,0,8,3,9,0,0,8,3,10,0,0,8,3,11,0,0,8,3,12,0,0,8,4,9,0,0,8,4,10,0,0,8,4,11,0,0,8,4,12,0,0,8,5,9,0,0,8,5,10,0,0,8,5,11,0,0,8,5,12,0,0,8,6,9,0,0,8,6,10,0,0,8,6,11,0,0,8,6,12,0,0,8,-3,13,0,0,8,-3,14,0,0,8,-2,13,0,0,8,-2,14,0,0,8,-1,13,0,0,8,-1,14,0,0,8,0,13,0,0,8,0,14,0,0,8,1,13,0,0,8,1,14,0,0,8,2,13,0,0,8,2,14,0,0,8,3,13,0,0,8,3,14,0,0,8,-3,2,0,0,8],"Middle":[-15,-2,0,2,7,-14,-2,0,2,7,-13,-2,0,2,7,-12,-2,0,2,7,-11,-2,0,2,7,-10,-15,0,2,7,-10,-2,0,2,7,-9,-15,0,2,7,-9,-2,0,3,7,-8,-15,0,2,7,-7,-15,0,2,7,-6,-15,0,2,7,-5,-15,0,2,7,-5,6,0,1,7,-4,-15,0,2,7,-4,6,0,2,7,-3,-7,0,1,7,-3,6,0,2,7,-2,-7,0,2,7,-2,6,0,3,7,-1,-7,0,2,7,-1,5,0,3,7,0,-7,0,2,7,0,4,0,3,7,1,-7,0,2,7,2,-7,0,2,7,3,-7,0,2,7,4,-7,0,2,7,5,-7,0,2,7,6,-7,0,2,7,7,-7,0,2,7,8,-7,0,2,7],"Top":[-16,-2,0,3,4,-16,-1,0,3,3,-16,0,0,3,3,-16,1,0,3,3,-16,2,0,3,3,-16,3,0,3,3,-16,4,0,3,3,-16,5,0,3,3,-16,6,0,3,3,-16,7,0,3,3,-16,8,0,3,3,-16,9,0,11,2,-15,9,0,2,2,-14,9,0,2,2,-13,9,0,2,2,-12,9,0,2,2,-11,-15,0,3,4,-11,-14,0,3,3,-11,-13,0,3,3,-11,-12,0,3,3,-11,-11,0,3,3,-11,-10,0,3,3,-11,-9,0,3,3,-11,-8,0,3,3,-11,-7,0,3,3,-11,-6,0,3,3,-11,-5,0,3,3,-11,-4,0,3,3,-11,-3,0,11,2,-11,9,0,2,2,-10,-3,0,2,2,-10,9,0,3,2,-10,10,0,3,3,-10,11,0,3,3,-10,12,0,11,2,-9,-3,0,3,2,-9,12,0,2,2,-8,12,0,2,2,-7,12,0,3,2,-7,13,0,3,3,-7,14,0,3,3,-7,15,0,11,2,-6,15,0,2,2,-5,2,0,1,2,-5,3,0,1,3,-5,4,0,1,3,-5,5,0,1,3,-5,15,0,2,2,-4,2,0,3,2,-4,3,0,11,2,-4,15,0,2,2,-3,-15,0,1,4,-3,-14,0,1,3,-3,-13,0,1,3,-3,-12,0,1,3,-3,-11,0,1,3,-3,-10,0,1,3,-3,-9,0,1,3,-3,-8,0,1,3,-3,3,0,2,2,-3,15,0,2,2,-2,3,0,2,2,-2,5,0,3,4,-2,15,0,2,2,-1,-1,0,1,2,-1,0,0,1,3,-1,1,0,1,3,-1,2,0,1,3,-1,3,0,13,2,-1,4,0,3,4,-1,15,0,2,2,0,-1,0,3,2,0,0,0,3,3,0,1,0,3,3,0,2,0,3,3,0,3,0,3,3,0,15,0,2,2,1,15,0,2,2,2,15,0,2,2,3,15,0,2,2,4,13,0,1,2,4,14,0,1,3,4,15,0,13,2,5,13,0,2,2,6,13,0,2,2,7,3,0,1,2,7,4,0,1,3,7,5,0,1,3,7,6,0,1,3,7,7,0,1,3,7,8,0,1,3,7,9,0,1,3,7,10,0,1,3,7,11,0,1,3,7,12,0,1,3,7,13,0,13,2,8,3,0,2,2,9,-7,0,1,4,9,-6,0,1,3,9,-5,0,1,3,9,-4,0,1,3,9,-3,0,1,3,9,-2,0,1,3,9,-1,0,1,3,9,0,0,1,3,9,1,0,1,3,9,2,0,1,3,9,3,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preinstall.json new file mode 100644 index 0000000..ddd7807 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":51,"Y":90},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0009","CurrAmmon":"1","ResidueAmmo":"5"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":11,"Y":228},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0002","CurrAmmon":"7","ResidueAmmo":"7"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":103,"Y":173},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0009","CurrAmmon":"1","ResidueAmmo":"5"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":-4},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0007","CurrAmmon":"60","ResidueAmmo":"60"},"Altitude":0,"VerticalSpeed":0}]}],[{"Position":{"X":-1,"Y":119},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":185,"Y":110},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-44,"Y":-39},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0008","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":116,"Y":229},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0008","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-73,"Y":226},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0009","CurrAmmon":"1","ResidueAmmo":"5"},"Altitude":0,"VerticalSpeed":0}]}],[{"Position":{"X":65,"Y":208},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":71,"Y":33},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-65,"Y":102},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0002","CurrAmmon":"7","ResidueAmmo":"7"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":119,"Y":115},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0002","CurrAmmon":"7","ResidueAmmo":"7"},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preview.png new file mode 100644 index 0000000..d263705 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preview.png.import new file mode 100644 index 0000000..41fdf86 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://w8enumbscx08" +path="res://.godot/imported/Preview.png-57faf91d48bfaedc5b04c411842f9580.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/TestGroup1/battle/Battle5/Preview.png" +dest_files=["res://.godot/imported/Preview.png-57faf91d48bfaedc5b04c411842f9580.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/RoomInfo.json new file mode 100644 index 0000000..1fba846 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-10,"Y":-8},"Size":{"X":28,"Y":30},"DoorAreaInfos":[{"Direction":3,"Start":0,"End":192},{"Direction":3,"Start":272,"End":400},{"Direction":0,"Start":128,"End":384},{"Direction":2,"Start":144,"End":336},{"Direction":1,"Start":288,"End":400},{"Direction":1,"Start":0,"End":160}],"GroupName":"TestGroup1","RoomType":0,"RoomName":"Battle5","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/TileInfo.json new file mode 100644 index 0000000..be4573e --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle5/TileInfo.json @@ -0,0 +1 @@ +{"NavigationList":[{"Type":0,"Points":[-136,-104,40,-104,40,-40,136,-40,136,-104,248,-104,248,24,264,24,264,272,184,272,184,336,8,336,8,272,-40,272,-40,288,-136,288,-136,184,-88,184,-88,128,-120,128,-120,48,-136,48]},{"Type":1,"Points":[-40,16,24,16,24,72,-40,72]},{"Type":1,"Points":[104,16,168,16,168,72,104,72]},{"Type":1,"Points":[-24,144,40,144,40,200,-24,200]},{"Type":1,"Points":[136,160,200,160,200,216,136,216]}],"Floor":[-9,-7,0,0,8,-9,-6,0,0,8,-9,-5,0,0,8,-9,-4,0,0,8,-9,-3,0,0,8,-9,-2,0,0,8,-9,-1,0,0,8,-9,0,0,0,8,-9,1,0,0,8,-9,2,0,0,8,-8,-7,0,0,8,-8,-6,0,0,8,-8,-5,0,0,8,-8,-4,0,0,8,-8,-3,0,0,8,-8,-2,0,0,8,-8,-1,0,0,8,-8,0,0,0,8,-8,1,0,0,8,-8,2,0,0,8,-7,-7,0,0,8,-7,-6,0,0,8,-7,-5,0,0,8,-7,-4,0,0,8,-7,-3,0,0,8,-7,-2,0,0,8,-7,-1,0,0,8,-7,0,0,0,8,-7,1,0,0,8,-7,2,0,0,8,-6,-7,0,0,8,-6,-6,0,0,8,-6,-5,0,0,8,-6,-4,0,0,8,-6,-3,0,0,8,-6,-2,0,0,8,-6,-1,0,0,8,-6,0,0,0,8,-6,1,0,0,8,-6,2,0,0,8,-5,-7,0,0,8,-5,-6,0,0,8,-5,-5,0,0,8,-5,-4,0,0,8,-5,-3,0,0,8,-5,-2,0,0,8,-5,-1,0,0,8,-5,0,0,0,8,-5,1,0,0,8,-5,2,0,0,8,-4,-7,0,0,8,-4,-6,0,0,8,-4,-5,0,0,8,-4,-4,0,0,8,-4,-3,0,0,8,-4,-2,0,0,8,-4,-1,0,0,8,-4,0,0,0,8,-4,1,0,0,8,-4,2,0,0,8,-3,-7,0,0,8,-3,-6,0,0,8,-3,-5,0,0,8,-3,-4,0,0,8,-3,-3,0,0,8,-3,-2,0,0,8,-3,-1,0,0,8,-3,0,0,0,8,-3,1,0,0,8,-3,2,0,0,8,-2,-7,0,0,8,-2,-6,0,0,8,-2,-5,0,0,8,-2,-4,0,0,8,-2,-3,0,0,8,-2,-2,0,0,8,-2,-1,0,0,8,-2,0,0,0,8,-1,-7,0,0,8,-1,-6,0,0,8,-1,-5,0,0,8,-1,-4,0,0,8,-1,-3,0,0,8,-1,-2,0,0,8,-1,-1,0,0,8,-1,0,0,0,8,0,-7,0,0,8,0,-6,0,0,8,0,-5,0,0,8,0,-4,0,0,8,0,-3,0,0,8,0,-2,0,0,8,0,-1,0,0,8,0,0,0,0,8,1,-7,0,0,8,1,-6,0,0,8,1,-5,0,0,8,1,-4,0,0,8,1,-3,0,0,8,1,-2,0,0,8,1,-1,0,0,8,1,0,0,0,8,1,1,0,0,8,1,2,0,0,8,2,-7,0,0,8,2,-6,0,0,8,2,-5,0,0,8,2,-4,0,0,8,2,-3,0,0,8,2,-2,0,0,8,2,-1,0,0,8,2,0,0,0,8,2,1,0,0,8,2,2,0,0,8,1,3,0,0,8,1,4,0,0,8,1,5,0,0,8,1,6,0,0,8,1,7,0,0,8,1,8,0,0,8,2,3,0,0,8,2,4,0,0,8,2,5,0,0,8,2,6,0,0,8,2,7,0,0,8,2,8,0,0,8,2,9,0,0,8,2,10,0,0,8,2,11,0,0,8,3,1,0,0,8,3,2,0,0,8,3,3,0,0,8,3,4,0,0,8,3,5,0,0,8,3,6,0,0,8,3,7,0,0,8,3,8,0,0,8,3,9,0,0,8,3,10,0,0,8,3,11,0,0,8,4,1,0,0,8,4,2,0,0,8,4,3,0,0,8,4,4,0,0,8,4,5,0,0,8,4,6,0,0,8,4,7,0,0,8,4,8,0,0,8,4,9,0,0,8,4,10,0,0,8,4,11,0,0,8,5,1,0,0,8,5,2,0,0,8,5,3,0,0,8,5,4,0,0,8,5,5,0,0,8,5,6,0,0,8,5,7,0,0,8,5,8,0,0,8,5,9,0,0,8,5,10,0,0,8,5,11,0,0,8,6,1,0,0,8,6,2,0,0,8,6,3,0,0,8,6,4,0,0,8,6,5,0,0,8,6,6,0,0,8,6,7,0,0,8,6,8,0,0,8,6,9,0,0,8,6,10,0,0,8,6,11,0,0,8,7,4,0,0,8,7,5,0,0,8,7,6,0,0,8,7,7,0,0,8,7,8,0,0,8,7,9,0,0,8,7,10,0,0,8,7,11,0,0,8,8,4,0,0,8,8,5,0,0,8,8,6,0,0,8,8,7,0,0,8,8,8,0,0,8,8,9,0,0,8,8,10,0,0,8,8,11,0,0,8,9,4,0,0,8,9,5,0,0,8,9,6,0,0,8,9,7,0,0,8,9,8,0,0,8,9,9,0,0,8,10,1,0,0,8,10,2,0,0,8,10,3,0,0,8,10,4,0,0,8,10,5,0,0,8,10,6,0,0,8,10,7,0,0,8,10,8,0,0,8,10,9,0,0,8,11,1,0,0,8,11,2,0,0,8,11,3,0,0,8,11,4,0,0,8,11,5,0,0,8,11,6,0,0,8,11,7,0,0,8,11,8,0,0,8,11,9,0,0,8,12,1,0,0,8,12,2,0,0,8,12,3,0,0,8,12,4,0,0,8,12,5,0,0,8,12,6,0,0,8,12,7,0,0,8,12,8,0,0,8,12,9,0,0,8,12,10,0,0,8,12,11,0,0,8,13,1,0,0,8,13,2,0,0,8,13,3,0,0,8,13,4,0,0,8,13,5,0,0,8,13,6,0,0,8,13,7,0,0,8,13,8,0,0,8,13,9,0,0,8,13,10,0,0,8,13,11,0,0,8,14,1,0,0,8,14,2,0,0,8,14,3,0,0,8,14,4,0,0,8,14,5,0,0,8,14,6,0,0,8,14,7,0,0,8,14,8,0,0,8,14,9,0,0,8,14,10,0,0,8,14,11,0,0,8,15,1,0,0,8,15,2,0,0,8,15,3,0,0,8,15,4,0,0,8,15,5,0,0,8,15,6,0,0,8,15,7,0,0,8,15,8,0,0,8,15,9,0,0,8,15,10,0,0,8,15,11,0,0,8,16,1,0,0,8,16,2,0,0,8,16,3,0,0,8,16,4,0,0,8,16,5,0,0,8,16,6,0,0,8,16,7,0,0,8,16,8,0,0,8,16,9,0,0,8,16,10,0,0,8,16,11,0,0,8,-8,3,0,0,8,-8,4,0,0,8,-8,5,0,0,8,-8,6,0,0,8,-8,7,0,0,8,-7,3,0,0,8,-7,4,0,0,8,-7,5,0,0,8,-7,6,0,0,8,-7,7,0,0,8,-6,3,0,0,8,-6,4,0,0,8,-6,5,0,0,8,-6,6,0,0,8,-6,7,0,0,8,-5,3,0,0,8,-5,4,0,0,8,-5,5,0,0,8,-5,6,0,0,8,-5,7,0,0,8,-4,3,0,0,8,-4,4,0,0,8,-4,5,0,0,8,-4,6,0,0,8,-4,7,0,0,8,-3,3,0,0,8,-3,4,0,0,8,-3,5,0,0,8,-3,6,0,0,8,-3,7,0,0,8,-2,4,0,0,8,-2,5,0,0,8,-2,6,0,0,8,-2,7,0,0,8,-1,4,0,0,8,-1,5,0,0,8,-1,6,0,0,8,-1,7,0,0,8,0,4,0,0,8,0,5,0,0,8,0,6,0,0,8,0,7,0,0,8,-6,8,0,0,8,-6,9,0,0,8,-6,10,0,0,8,-6,11,0,0,8,-6,12,0,0,8,-6,13,0,0,8,-5,8,0,0,8,-5,9,0,0,8,-5,10,0,0,8,-5,11,0,0,8,-5,12,0,0,8,-5,13,0,0,8,-4,8,0,0,8,-4,9,0,0,8,-4,10,0,0,8,-4,11,0,0,8,-4,12,0,0,8,-4,13,0,0,8,-3,8,0,0,8,-3,9,0,0,8,-3,10,0,0,8,-3,11,0,0,8,-3,12,0,0,8,-3,13,0,0,8,-2,8,0,0,8,-2,9,0,0,8,-2,10,0,0,8,-2,11,0,0,8,-2,12,0,0,8,-2,13,0,0,8,-2,14,0,0,8,-2,15,0,0,8,-2,16,0,0,8,-1,8,0,0,8,-1,12,0,0,8,-1,13,0,0,8,-1,14,0,0,8,-1,15,0,0,8,-1,16,0,0,8,0,8,0,0,8,0,12,0,0,8,0,13,0,0,8,0,14,0,0,8,0,15,0,0,8,0,16,0,0,8,1,12,0,0,8,1,13,0,0,8,1,14,0,0,8,1,15,0,0,8,1,16,0,0,8,0,17,0,0,8,0,18,0,0,8,0,19,0,0,8,0,20,0,0,8,1,17,0,0,8,1,18,0,0,8,1,19,0,0,8,1,20,0,0,8,2,12,0,0,8,2,13,0,0,8,2,14,0,0,8,2,15,0,0,8,2,16,0,0,8,2,17,0,0,8,2,18,0,0,8,2,19,0,0,8,2,20,0,0,8,3,12,0,0,8,3,13,0,0,8,3,14,0,0,8,3,15,0,0,8,3,16,0,0,8,3,17,0,0,8,3,18,0,0,8,3,19,0,0,8,3,20,0,0,8,4,12,0,0,8,4,13,0,0,8,4,14,0,0,8,4,15,0,0,8,4,16,0,0,8,4,17,0,0,8,4,18,0,0,8,4,19,0,0,8,4,20,0,0,8,5,12,0,0,8,5,13,0,0,8,5,14,0,0,8,5,15,0,0,8,5,16,0,0,8,5,17,0,0,8,5,18,0,0,8,5,19,0,0,8,5,20,0,0,8,6,12,0,0,8,6,13,0,0,8,6,14,0,0,8,6,15,0,0,8,6,16,0,0,8,6,17,0,0,8,6,18,0,0,8,6,19,0,0,8,6,20,0,0,8,7,12,0,0,8,7,13,0,0,8,7,14,0,0,8,7,15,0,0,8,7,16,0,0,8,7,17,0,0,8,7,18,0,0,8,7,19,0,0,8,7,20,0,0,8,8,12,0,0,8,8,13,0,0,8,8,14,0,0,8,8,15,0,0,8,8,16,0,0,8,8,17,0,0,8,8,18,0,0,8,8,19,0,0,8,8,20,0,0,8,9,13,0,0,8,9,14,0,0,8,9,15,0,0,8,9,16,0,0,8,9,17,0,0,8,9,18,0,0,8,9,19,0,0,8,9,20,0,0,8,10,13,0,0,8,10,14,0,0,8,10,15,0,0,8,10,16,0,0,8,10,17,0,0,8,10,18,0,0,8,10,19,0,0,8,10,20,0,0,8,11,13,0,0,8,11,14,0,0,8,11,15,0,0,8,11,16,0,0,8,11,17,0,0,8,11,18,0,0,8,11,19,0,0,8,11,20,0,0,8,3,-3,0,0,8,3,-2,0,0,8,3,-1,0,0,8,3,0,0,0,8,4,-3,0,0,8,4,-2,0,0,8,4,-1,0,0,8,4,0,0,0,8,5,-3,0,0,8,5,-2,0,0,8,5,-1,0,0,8,5,0,0,0,8,6,-3,0,0,8,6,-2,0,0,8,6,-1,0,0,8,6,0,0,0,8,7,-3,0,0,8,7,-2,0,0,8,7,-1,0,0,8,7,0,0,0,8,8,-3,0,0,8,8,-2,0,0,8,8,-1,0,0,8,8,0,0,0,8,9,-3,0,0,8,9,-2,0,0,8,9,-1,0,0,8,9,0,0,0,8,10,-2,0,0,8,10,-1,0,0,8,10,0,0,0,8,11,-2,0,0,8,11,-1,0,0,8,11,0,0,0,8,12,-2,0,0,8,12,-1,0,0,8,12,0,0,0,8,13,-2,0,0,8,13,-1,0,0,8,13,0,0,0,8,14,-2,0,0,8,14,-1,0,0,8,14,0,0,0,8,12,12,0,0,8,12,13,0,0,8,12,14,0,0,8,13,12,0,0,8,13,13,0,0,8,13,14,0,0,8,14,12,0,0,8,14,13,0,0,8,14,14,0,0,8,12,15,0,0,8,12,16,0,0,8,13,15,0,0,8,13,16,0,0,8,14,15,0,0,8,14,16,0,0,8,15,14,0,0,8,15,15,0,0,8,15,16,0,0,8,15,12,0,0,8,15,13,0,0,8,16,12,0,0,8,16,13,0,0,8,16,14,0,0,8,16,15,0,0,8,16,16,0,0,8,-9,11,0,0,8,-9,12,0,0,8,-9,13,0,0,8,-9,14,0,0,8,-9,15,0,0,8,-9,16,0,0,8,-9,17,0,0,8,-8,11,0,0,8,-8,12,0,0,8,-8,13,0,0,8,-8,14,0,0,8,-8,15,0,0,8,-8,16,0,0,8,-8,17,0,0,8,-7,11,0,0,8,-7,12,0,0,8,-7,13,0,0,8,-7,14,0,0,8,-7,15,0,0,8,-7,16,0,0,8,-7,17,0,0,8,-6,14,0,0,8,-6,15,0,0,8,-6,16,0,0,8,-6,17,0,0,8,-5,14,0,0,8,-5,15,0,0,8,-5,16,0,0,8,-5,17,0,0,8,-4,14,0,0,8,-4,15,0,0,8,-4,16,0,0,8,-4,17,0,0,8,-3,14,0,0,8,-3,15,0,0,8,-3,16,0,0,8,-3,17,0,0,8,8,-7,0,0,8,8,-6,0,0,8,8,-5,0,0,8,8,-4,0,0,8,9,-7,0,0,8,9,-6,0,0,8,9,-5,0,0,8,9,-4,0,0,8,10,-7,0,0,8,10,-6,0,0,8,10,-5,0,0,8,10,-4,0,0,8,10,-3,0,0,8,11,-7,0,0,8,11,-6,0,0,8,11,-5,0,0,8,11,-4,0,0,8,11,-3,0,0,8,12,-7,0,0,8,12,-6,0,0,8,12,-5,0,0,8,12,-4,0,0,8,12,-3,0,0,8,13,-7,0,0,8,13,-6,0,0,8,13,-5,0,0,8,13,-4,0,0,8,13,-3,0,0,8,14,-7,0,0,8,14,-6,0,0,8,14,-5,0,0,8,14,-4,0,0,8,14,-3,0,0,8,15,-7,0,0,8,15,-6,0,0,8,15,-5,0,0,8,15,-4,0,0,8,15,-3,0,0,8,15,-2,0,0,8,15,-1,0,0,8,15,0,0,0,8],"Middle":[-9,-8,0,2,7,-9,10,0,2,7,-8,-8,0,2,7,-8,10,0,2,7,-7,-8,0,2,7,-7,10,0,3,7,-6,-8,0,2,7,-5,-8,0,2,7,-4,-8,0,2,7,-3,-8,0,2,7,-2,-8,0,2,7,-2,3,0,1,7,-1,-8,0,2,7,-1,3,0,2,7,-1,11,0,1,7,0,-8,0,2,7,0,3,0,3,7,0,11,0,2,7,1,-8,0,2,7,1,11,0,3,7,2,-8,0,2,7,3,-4,0,1,7,4,-4,0,2,7,5,-4,0,2,7,6,-4,0,2,7,7,-4,0,3,7,7,3,0,1,7,8,-8,0,2,7,8,3,0,2,7,9,-8,0,2,7,9,3,0,3,7,9,12,0,1,7,10,-8,0,2,7,10,12,0,2,7,11,-8,0,2,7,11,12,0,3,7,12,-8,0,2,7,13,-8,0,2,7,14,-8,0,2,7,15,-8,0,2,7,16,0,0,1,7],"Top":[-10,-8,0,3,4,-10,-7,0,3,3,-10,-6,0,3,3,-10,-5,0,3,3,-10,-4,0,3,3,-10,-3,0,3,3,-10,-2,0,3,3,-10,-1,0,3,3,-10,0,0,3,3,-10,1,0,3,3,-10,2,0,3,3,-10,3,0,11,2,-10,10,0,3,4,-10,11,0,3,3,-10,12,0,3,3,-10,13,0,3,3,-10,14,0,3,3,-10,15,0,3,3,-10,16,0,3,3,-10,17,0,3,3,-10,18,0,11,2,-9,3,0,3,2,-9,4,0,3,3,-9,5,0,3,3,-9,6,0,3,3,-9,7,0,3,3,-9,8,0,11,2,-9,18,0,2,2,-8,8,0,2,2,-8,18,0,2,2,-7,8,0,3,2,-7,9,0,3,3,-7,18,0,2,2,-6,18,0,2,2,-5,18,0,2,2,-4,18,0,2,2,-3,18,0,2,2,-2,1,0,1,2,-2,2,0,1,3,-2,17,0,1,2,-2,18,0,13,2,-1,1,0,2,2,-1,9,0,1,2,-1,10,0,1,3,-1,17,0,3,2,-1,18,0,3,3,-1,19,0,3,3,-1,20,0,3,3,-1,21,0,11,2,0,1,0,3,2,0,2,0,3,3,0,9,0,2,2,0,21,0,2,2,1,9,0,3,2,1,10,0,3,3,1,21,0,2,2,2,21,0,2,2,3,-8,0,1,4,3,-7,0,1,3,3,-6,0,1,3,3,-5,0,1,3,3,21,0,2,2,4,21,0,2,2,5,21,0,2,2,6,21,0,2,2,7,-8,0,3,4,7,-7,0,3,3,7,-6,0,3,3,7,-5,0,3,3,7,1,0,1,2,7,2,0,1,3,7,21,0,2,2,8,1,0,2,2,8,21,0,2,2,9,1,0,3,2,9,2,0,3,3,9,10,0,1,2,9,11,0,1,3,9,21,0,2,2,10,10,0,2,2,10,21,0,2,2,11,10,0,3,2,11,11,0,3,3,11,21,0,2,2,12,17,0,1,2,12,18,0,1,3,12,19,0,1,3,12,20,0,1,3,12,21,0,13,2,13,17,0,2,2,14,17,0,2,2,15,17,0,2,2,16,-8,0,1,4,16,-7,0,1,3,16,-6,0,1,3,16,-5,0,1,3,16,-4,0,1,3,16,-3,0,1,3,16,-2,0,1,3,16,-1,0,1,3,16,17,0,2,2,17,0,0,1,4,17,1,0,1,3,17,2,0,1,3,17,3,0,1,3,17,4,0,1,3,17,5,0,1,3,17,6,0,1,3,17,7,0,1,3,17,8,0,1,3,17,9,0,1,3,17,10,0,1,3,17,11,0,1,3,17,12,0,1,3,17,13,0,1,3,17,14,0,1,3,17,15,0,1,3,17,16,0,1,3,17,17,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json index 582ee5f..c401b01 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json @@ -1 +1 @@ -[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":19,"Y":2},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-76,"Y":35},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-79,"Y":46},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-75,"Y":2},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-75,"Y":67},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-73,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-76,"Y":21},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-74,"Y":-30},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":55,"Y":67},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":56,"Y":24},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":56,"Y":0},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":34,"Y":23},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":55,"Y":44},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":56,"Y":-24},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-16,"Y":16},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0005","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":19,"Y":2},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":24,"Y":-14},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":6,"Y":34},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-42,"Y":9},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-63,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-31,"Y":-16},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-47,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-25},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-80,"Y":14},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0008","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-75,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":46,"Y":1},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0011","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":36,"Y":49},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0012","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-90,"Y":-23},"Size":{"X":3,"Y":6},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0013","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-91,"Y":-6},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0014","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":57,"Y":56},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":67,"Y":28},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":60,"Y":-19},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":34,"Y":23},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-11,"Y":8},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-20,"Y":33},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preinstall.json index 2af15f7..ed652d3 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start2/Preinstall.json @@ -1 +1 @@ -[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":0,"Y":26},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":16,"Y":26},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-16,"Y":25},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-35,"Y":-40},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0002","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":37,"Y":-13},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/material/Blend.tres b/DungeonShooting_Godot/resource/material/Blend.tres index 8d6f5b3..b3015f1 100644 --- a/DungeonShooting_Godot/resource/material/Blend.tres +++ b/DungeonShooting_Godot/resource/material/Blend.tres @@ -9,5 +9,6 @@ shader_parameter/schedule = 0.0 shader_parameter/modulate = Color(1, 1, 1, 1) shader_parameter/show_outline = true -shader_parameter/outline_color = Color(0.941176, 0.941176, 0.941176, 1) +shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false +shader_parameter/outline_use_blend = true diff --git a/DungeonShooting_Godot/resource/material/SmokeParticleMaterial.tres b/DungeonShooting_Godot/resource/material/SmokeParticleMaterial.tres index 95ae1df..4470829 100644 --- a/DungeonShooting_Godot/resource/material/SmokeParticleMaterial.tres +++ b/DungeonShooting_Godot/resource/material/SmokeParticleMaterial.tres @@ -11,11 +11,9 @@ [resource] particle_flag_disable_z = true spread = 180.0 -gravity = Vector3(0, 0, 0) initial_velocity_min = 5.0 initial_velocity_max = 35.0 -orbit_velocity_min = 0.0 -orbit_velocity_max = 0.0 +gravity = Vector3(0, 0, 0) scale_min = 0.8 scale_max = 0.8 scale_curve = ExtResource("1_yr5l8") diff --git a/DungeonShooting_Godot/resource/sound/sfx/collision/Collision0001.ogg b/DungeonShooting_Godot/resource/sound/sfx/collision/Collision0001.ogg new file mode 100644 index 0000000..6c4611a --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/collision/Collision0001.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/collision/Collision0001.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/collision/Collision0001.ogg.import new file mode 100644 index 0000000..2eeee7f --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/collision/Collision0001.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://rj811bni34nt" +path="res://.godot/imported/Collision0001.ogg-1ff34918eb3dbf32e125bc036d2c72c7.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/collision/Collision0001.ogg" +dest_files=["res://.godot/imported/Collision0001.ogg-1ff34918eb3dbf32e125bc036d2c72c7.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading0003.ogg b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading0003.ogg new file mode 100644 index 0000000..3d9c9e0 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading0003.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading0003.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading0003.ogg.import new file mode 100644 index 0000000..33ae0aa --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading0003.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://u205d1t1pmd7" +path="res://.godot/imported/Reloading0003.ogg-f999a761b55735706639c26438047167.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/reloading/Reloading0003.ogg" +dest_files=["res://.godot/imported/Reloading0003.ogg-f999a761b55735706639c26438047167.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0011.ogg b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0011.ogg new file mode 100644 index 0000000..824fb1c --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0011.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0011.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0011.ogg.import new file mode 100644 index 0000000..0c3fbf5 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0011.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://beyypyocstosd" +path="res://.godot/imported/Reloading_begin0011.ogg-d40519c860179a2f5de2719034c81b0d.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/reloading/Reloading_begin0011.ogg" +dest_files=["res://.godot/imported/Reloading_begin0011.ogg-d40519c860179a2f5de2719034c81b0d.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0012.ogg b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0012.ogg new file mode 100644 index 0000000..764fe80 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0012.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0012.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0012.ogg.import new file mode 100644 index 0000000..c719b9a --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_begin0012.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://57o7wubot0p" +path="res://.godot/imported/Reloading_begin0012.ogg-0e6c1367e489c60b46da4ca0078a32b2.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/reloading/Reloading_begin0012.ogg" +dest_files=["res://.godot/imported/Reloading_begin0012.ogg-0e6c1367e489c60b46da4ca0078a32b2.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0003.ogg b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0003.ogg new file mode 100644 index 0000000..d35e958 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0003.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0003.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0003.ogg.import new file mode 100644 index 0000000..d3534cd --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0003.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://d2o18o4s88puc" +path="res://.godot/imported/Reloading_finish0003.ogg-d7d55690ff37054db2ba29bb7ef86993.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/reloading/Reloading_finish0003.ogg" +dest_files=["res://.godot/imported/Reloading_finish0003.ogg-d7d55690ff37054db2ba29bb7ef86993.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0004.ogg b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0004.ogg new file mode 100644 index 0000000..18444ac --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0004.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0004.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0004.ogg.import new file mode 100644 index 0000000..5795175 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/reloading/Reloading_finish0004.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dnyetm6s8gsoc" +path="res://.godot/imported/Reloading_finish0004.ogg-a7065b9324670014184a01ecc1ea8074.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/reloading/Reloading_finish0004.ogg" +dest_files=["res://.godot/imported/Reloading_finish0004.ogg-a7065b9324670014184a01ecc1ea8074.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0009.ogg b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0009.ogg new file mode 100644 index 0000000..f8104f6 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0009.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0009.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0009.ogg.import new file mode 100644 index 0000000..41f9be3 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0009.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://jnac4mnhxtlh" +path="res://.godot/imported/Shooting0009.ogg-58b34f0abb4c6eb9da8e6922d69071b8.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/shooting/Shooting0009.ogg" +dest_files=["res://.godot/imported/Shooting0009.ogg-58b34f0abb4c6eb9da8e6922d69071b8.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0010.ogg b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0010.ogg new file mode 100644 index 0000000..2344f0a --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0010.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0010.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0010.ogg.import new file mode 100644 index 0000000..a2a3e5c --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0010.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cor7rdht4jq5i" +path="res://.godot/imported/Shooting0010.ogg-11b9eb3bfdf9889c1c25a815c5ce8a05.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/shooting/Shooting0010.ogg" +dest_files=["res://.godot/imported/Shooting0010.ogg-11b9eb3bfdf9889c1c25a815c5ce8a05.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0011.ogg b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0011.ogg new file mode 100644 index 0000000..e2ddabe --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0011.ogg Binary files differ diff --git a/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0011.ogg.import b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0011.ogg.import new file mode 100644 index 0000000..43c67f2 --- /dev/null +++ b/DungeonShooting_Godot/resource/sound/sfx/shooting/Shooting0011.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dd8iw4672uyyr" +path="res://.godot/imported/Shooting0011.ogg-5ca9f9d8f36d57a9dd35dcc79e364d1f.oggvorbisstr" + +[deps] + +source_file="res://resource/sound/sfx/shooting/Shooting0011.ogg" +dest_files=["res://.godot/imported/Shooting0011.ogg-5ca9f9d8f36d57a9dd35dcc79e364d1f.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png b/DungeonShooting_Godot/resource/sprite/bullet/arrow.png deleted file mode 100644 index 4baebfb..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png.import b/DungeonShooting_Godot/resource/sprite/bullet/arrow.png.import deleted file mode 100644 index 18616dd..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/arrow.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cjb4rq1qavfm6" -path="res://.godot/imported/arrow.png-5f9f0a3c4c243acf30e833eb04add206.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/arrow.png" -dest_files=["res://.godot/imported/arrow.png-5f9f0a3c4c243acf30e833eb04add206.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/bullet/bullet0001.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png deleted file mode 100644 index 5b488de..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png.import deleted file mode 100644 index fe2ba90..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0001.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bu0b11hiuecxy" -path="res://.godot/imported/bullet0001.png-09e29b083f51e2b282ac1fb1dd682734.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet0001.png" -dest_files=["res://.godot/imported/bullet0001.png-09e29b083f51e2b282ac1fb1dd682734.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/bullet/bullet0002.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png deleted file mode 100644 index a76c266..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png.import deleted file mode 100644 index 90b0c71..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0002.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://ctsvj4y1t538u" -path="res://.godot/imported/bullet0002.png-5a53e3706ec2ef023e52e256612c2c94.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet0002.png" -dest_files=["res://.godot/imported/bullet0002.png-5a53e3706ec2ef023e52e256612c2c94.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/bullet/bullet0003.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png deleted file mode 100644 index 14a69ff..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png.import deleted file mode 100644 index 808d9f3..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet0003.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cs6pa7h8ffvy4" -path="res://.godot/imported/bullet0003.png-968c6a657388df80893fe68898e87dae.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet0003.png" -dest_files=["res://.godot/imported/bullet0003.png-968c6a657388df80893fe68898e87dae.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/bullet/bullet2.png b/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png deleted file mode 100644 index 964f292..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png.import b/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png.import deleted file mode 100644 index 79038a8..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/bullet2.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://o3iq4myj72q0" -path="res://.godot/imported/bullet2.png-6ca9527061677971732c8192cb1aa209.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/bullet/bullet2.png" -dest_files=["res://.godot/imported/bullet2.png-6ca9527061677971732c8192cb1aa209.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/bullet/laser/Laser0001.png b/DungeonShooting_Godot/resource/sprite/bullet/laser/Laser0001.png new file mode 100644 index 0000000..9338ede --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/laser/Laser0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/laser/Laser0001.png.import b/DungeonShooting_Godot/resource/sprite/bullet/laser/Laser0001.png.import new file mode 100644 index 0000000..3fdff0b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/laser/Laser0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://clfpbq1c1ilp1" +path="res://.godot/imported/Laser0001.png-a310e56cc700e65c7853874d9765878b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/laser/Laser0001.png" +dest_files=["res://.godot/imported/Laser0001.png-a310e56cc700e65c7853874d9765878b.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/bullet/normal/arrow.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png new file mode 100644 index 0000000..4baebfb --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png.import b/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png.import new file mode 100644 index 0000000..ffa58c4 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjb4rq1qavfm6" +path="res://.godot/imported/arrow.png-e6292bc0b86a2f51ddcbf6755de06ee0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/normal/arrow.png" +dest_files=["res://.godot/imported/arrow.png-e6292bc0b86a2f51ddcbf6755de06ee0.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/bullet/normal/bullet0001.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0001.png new file mode 100644 index 0000000..5b488de --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0001.png.import b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0001.png.import new file mode 100644 index 0000000..e261be8 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bu0b11hiuecxy" +path="res://.godot/imported/bullet0001.png-7d68281aea18b984211b806879504cbe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/normal/bullet0001.png" +dest_files=["res://.godot/imported/bullet0001.png-7d68281aea18b984211b806879504cbe.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/bullet/normal/bullet0002.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0002.png new file mode 100644 index 0000000..a76c266 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0002.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0002.png.import b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0002.png.import new file mode 100644 index 0000000..1a5e295 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0002.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctsvj4y1t538u" +path="res://.godot/imported/bullet0002.png-710d9bc1a4f134ae89c80c46b8499940.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/normal/bullet0002.png" +dest_files=["res://.godot/imported/bullet0002.png-710d9bc1a4f134ae89c80c46b8499940.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/bullet/normal/bullet0003.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0003.png new file mode 100644 index 0000000..14a69ff --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0003.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0003.png.import b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0003.png.import new file mode 100644 index 0000000..1408d33 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0003.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cs6pa7h8ffvy4" +path="res://.godot/imported/bullet0003.png-0b9ca4e8c8186f2c99bb18564bebed46.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/normal/bullet0003.png" +dest_files=["res://.godot/imported/bullet0003.png-0b9ca4e8c8186f2c99bb18564bebed46.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/bullet/normal/bullet0004.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0004.png new file mode 100644 index 0000000..bf06757 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0004.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0004.png.import b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0004.png.import new file mode 100644 index 0000000..3b32b1a --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0004.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c25xd887txviq" +path="res://.godot/imported/bullet0004.png-998e96e7c171c50fe5b23ce64ab09962.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/normal/bullet0004.png" +dest_files=["res://.godot/imported/bullet0004.png-998e96e7c171c50fe5b23ce64ab09962.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/bullet/normal/bullet2.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet2.png new file mode 100644 index 0000000..964f292 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet2.png.import b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet2.png.import new file mode 100644 index 0000000..d48c9d6 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://o3iq4myj72q0" +path="res://.godot/imported/bullet2.png-373c2adfe18998d5a55ebea0eaea27a9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/normal/bullet2.png" +dest_files=["res://.godot/imported/bullet2.png-373c2adfe18998d5a55ebea0eaea27a9.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/effects/Circle2.png b/DungeonShooting_Godot/resource/sprite/effects/Circle2.png new file mode 100644 index 0000000..c27b68f --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/Circle2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/effects/Circle2.png.import b/DungeonShooting_Godot/resource/sprite/effects/Circle2.png.import new file mode 100644 index 0000000..dfcc3c1 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/Circle2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://hsevliqnq82n" +path="res://.godot/imported/Circle2.png-ef3a2d65cdf8bc187c245a202bc736dd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effects/Circle2.png" +dest_files=["res://.godot/imported/Circle2.png-ef3a2d65cdf8bc187c245a202bc736dd.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/effects/common/Smoke2.png b/DungeonShooting_Godot/resource/sprite/effects/common/Smoke2.png new file mode 100644 index 0000000..af4aa83 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/common/Smoke2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/effects/common/Smoke2.png.import b/DungeonShooting_Godot/resource/sprite/effects/common/Smoke2.png.import new file mode 100644 index 0000000..f9e9f57 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/common/Smoke2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://rk73piti0qot" +path="res://.godot/imported/Smoke2.png-bfcd0e73871f709da66c76e16b1ccd07.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effects/common/Smoke2.png" +dest_files=["res://.godot/imported/Smoke2.png-bfcd0e73871f709da66c76e16b1ccd07.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/effects/explode/Explode_circle0001.png b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_circle0001.png new file mode 100644 index 0000000..c20e52e --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_circle0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_circle0001.png.import b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_circle0001.png.import new file mode 100644 index 0000000..d32a45b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_circle0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ccdflg560oub6" +path="res://.godot/imported/Explode_circle0001.png-226d2b77cea80f656d4eb2869ee47062.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effects/explode/Explode_circle0001.png" +dest_files=["res://.godot/imported/Explode_circle0001.png-226d2b77cea80f656d4eb2869ee47062.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/effects/explode/Explode_line0001.png b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_line0001.png new file mode 100644 index 0000000..b631b3f --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_line0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_line0001.png.import b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_line0001.png.import new file mode 100644 index 0000000..0f10321 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_line0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cquv6nomd3tpf" +path="res://.godot/imported/Explode_line0001.png-449ac783735384f2465771c25c401693.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effects/explode/Explode_line0001.png" +dest_files=["res://.godot/imported/Explode_line0001.png-449ac783735384f2465771c25c401693.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/effects/explode/Explode_pit0001.png b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_pit0001.png new file mode 100644 index 0000000..281d9ea --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_pit0001.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_pit0001.png.import b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_pit0001.png.import new file mode 100644 index 0000000..2536123 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/explode/Explode_pit0001.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6p1iq7sgw8lt" +path="res://.godot/imported/Explode_pit0001.png-e0ae86a6c1b6531083be57c318c78f11.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effects/explode/Explode_pit0001.png" +dest_files=["res://.godot/imported/Explode_pit0001.png-e0ae86a6c1b6531083be57c318c78f11.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/effects/weapon/ShotFire2.png b/DungeonShooting_Godot/resource/sprite/effects/weapon/ShotFire2.png new file mode 100644 index 0000000..2a6b618 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/weapon/ShotFire2.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/effects/weapon/ShotFire2.png.import b/DungeonShooting_Godot/resource/sprite/effects/weapon/ShotFire2.png.import new file mode 100644 index 0000000..109241d --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/effects/weapon/ShotFire2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cj8gb5dxnk8ov" +path="res://.godot/imported/ShotFire2.png-859bcfe4ad8b11b7eb348b8c54ee9e64.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effects/weapon/ShotFire2.png" +dest_files=["res://.godot/imported/ShotFire2.png-859bcfe4ad8b11b7eb348b8c54ee9e64.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/BuffProp0011.png b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0011.png new file mode 100644 index 0000000..718794f --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0011.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0011.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0011.png.import new file mode 100644 index 0000000..0e87026 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0011.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3lemqkwfnufw" +path="res://.godot/imported/BuffProp0011.png-cbec00a310f3df70762a02dad80ea824.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/BuffProp0011.png" +dest_files=["res://.godot/imported/BuffProp0011.png-cbec00a310f3df70762a02dad80ea824.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/BuffProp0012.png b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0012.png new file mode 100644 index 0000000..5660753 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0012.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0012.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0012.png.import new file mode 100644 index 0000000..b37352d --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0012.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://djhhig4ct8fgo" +path="res://.godot/imported/BuffProp0012.png-767200b9890d9fc7fd455c0aa41ecaad.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/BuffProp0012.png" +dest_files=["res://.godot/imported/BuffProp0012.png-767200b9890d9fc7fd455c0aa41ecaad.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/BuffProp0013.png b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0013.png new file mode 100644 index 0000000..b70b0b2 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0013.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0013.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0013.png.import new file mode 100644 index 0000000..4a815d4 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0013.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://8ykm3jbhjpxh" +path="res://.godot/imported/BuffProp0013.png-bdbfb79e3feb60c437df3d4205954e6c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/BuffProp0013.png" +dest_files=["res://.godot/imported/BuffProp0013.png-bdbfb79e3feb60c437df3d4205954e6c.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/BuffProp0014.png b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0014.png new file mode 100644 index 0000000..049c1a0 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0014.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0014.png.import b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0014.png.import new file mode 100644 index 0000000..fe9a2a1 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/prop/buff/BuffProp0014.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddkno2rlclys0" +path="res://.godot/imported/BuffProp0014.png-3f30439d1b22d8ddbf02fe34bf967a18.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/prop/buff/BuffProp0014.png" +dest_files=["res://.godot/imported/BuffProp0014.png-3f30439d1b22d8ddbf02fe34bf967a18.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/role/enemy0002/Enemy0002.png b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002.png new file mode 100644 index 0000000..0f1a4ed --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002.png.import new file mode 100644 index 0000000..acce48a --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ba6ke6xp63lnv" +path="res://.godot/imported/Enemy0002.png-cf46c3b830873b4d0ccb2d0683f29d51.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/role/enemy0002/Enemy0002.png" +dest_files=["res://.godot/imported/Enemy0002.png-cf46c3b830873b4d0ccb2d0683f29d51.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/role/enemy0002/Enemy0002_idle.png b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_idle.png new file mode 100644 index 0000000..5c65a43 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_idle.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_idle.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_idle.png.import new file mode 100644 index 0000000..c143170 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_idle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bwafpoxpkx3lu" +path="res://.godot/imported/Enemy0002_idle.png-f012203897ea29b187025e9df2dee09e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/role/enemy0002/Enemy0002_idle.png" +dest_files=["res://.godot/imported/Enemy0002_idle.png-f012203897ea29b187025e9df2dee09e.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/role/enemy0002/Enemy0002_run.png b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_run.png new file mode 100644 index 0000000..c8dc00b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_run.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_run.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_run.png.import new file mode 100644 index 0000000..c1b8fdd --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0002/Enemy0002_run.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dibftt2rj5omq" +path="res://.godot/imported/Enemy0002_run.png-6dfcd1cc185b0a4ee4497ba9526c1749.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/role/enemy0002/Enemy0002_run.png" +dest_files=["res://.godot/imported/Enemy0002_run.png-6dfcd1cc185b0a4ee4497ba9526c1749.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/shell/Shell0004.png b/DungeonShooting_Godot/resource/sprite/shell/Shell0004.png new file mode 100644 index 0000000..c707ae5 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/shell/Shell0004.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/shell/Shell0004.png.import b/DungeonShooting_Godot/resource/sprite/shell/Shell0004.png.import new file mode 100644 index 0000000..fea12d1 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/shell/Shell0004.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://17htwakoupb2" +path="res://.godot/imported/Shell0004.png-c15276d49808c180fa5762fdca11586e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/shell/Shell0004.png" +dest_files=["res://.godot/imported/Shell0004.png-c15276d49808c180fa5762fdca11586e.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/shell/shellCase.aseprite b/DungeonShooting_Godot/resource/sprite/shell/shellCase.aseprite deleted file mode 100644 index fe6c181..0000000 --- a/DungeonShooting_Godot/resource/sprite/shell/shellCase.aseprite +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008.png b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008.png new file mode 100644 index 0000000..47a67d9 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008.png.import b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008.png.import new file mode 100644 index 0000000..ca03629 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cb0n1btxc6wl6" +path="res://.godot/imported/Weapon0008.png-1420c47ea7cc621ba17c45723577d760.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/weapon/weapon0008/Weapon0008.png" +dest_files=["res://.godot/imported/Weapon0008.png-1420c47ea7cc621ba17c45723577d760.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/weapon/weapon0008/Weapon0008_reloading.png b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008_reloading.png new file mode 100644 index 0000000..7b3870e --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008_reloading.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008_reloading.png.import b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008_reloading.png.import new file mode 100644 index 0000000..87166a7 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0008/Weapon0008_reloading.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://h2jpooksm65e" +path="res://.godot/imported/Weapon0008_reloading.png-528bf1e7471ece4bfb129941ff134e83.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/weapon/weapon0008/Weapon0008_reloading.png" +dest_files=["res://.godot/imported/Weapon0008_reloading.png-528bf1e7471ece4bfb129941ff134e83.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/weapon/weapon0009/Weapon0009_reload.png b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/Weapon0009_reload.png new file mode 100644 index 0000000..e2d8ce4 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/Weapon0009_reload.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/Weapon0009_reload.png.import b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/Weapon0009_reload.png.import new file mode 100644 index 0000000..25ceb9b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/Weapon0009_reload.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvw6batqb8dv8" +path="res://.godot/imported/Weapon0009_reload.png-db2c0eea5342ef19729a52cc3bde8e8d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/weapon/weapon0009/Weapon0009_reload.png" +dest_files=["res://.godot/imported/Weapon0009_reload.png-db2c0eea5342ef19729a52cc3bde8e8d.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/weapon/weapon0009/weapon0009.png b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png new file mode 100644 index 0000000..35ed6f4 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png.import b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png.import new file mode 100644 index 0000000..f19320c --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/weapon/weapon0009/weapon0009.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://qd7hufitblaf" +path="res://.godot/imported/weapon0009.png-f160d5b5d752036e5597a2e48024e6b3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/weapon/weapon0009/weapon0009.png" +dest_files=["res://.godot/imported/weapon0009.png-f160d5b5d752036e5597a2e48024e6b3.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/bullet/Bullet0001.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres index b8cfbc6..990889c 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0001.tres @@ -1,6 +1,7 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://baoxep7vami72"] -[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/bullet0001.png" id="1_ktu7r"] +[ext_resource type="Texture2D" uid="uid://bu0b11hiuecxy" path="res://resource/sprite/bullet/normal/bullet0001.png" id="1_ktu7r"] + [resource] diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres index 635a03b..140018b 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0002.tres @@ -1,6 +1,7 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bpeodjqiy3mil"] -[ext_resource type="Texture2D" uid="uid://ctsvj4y1t538u" path="res://resource/sprite/bullet/bullet0002.png" id="1_53f3g"] +[ext_resource type="Texture2D" uid="uid://ctsvj4y1t538u" path="res://resource/sprite/bullet/normal/bullet0002.png" id="1_53f3g"] + [resource] animations = [{ diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres index 2e724e8..79e09eb 100644 --- a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0003.tres @@ -1,6 +1,7 @@ [gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bcnhyin0aufl1"] -[ext_resource type="Texture2D" uid="uid://cs6pa7h8ffvy4" path="res://resource/sprite/bullet/bullet0003.png" id="1_sl01e"] +[ext_resource type="Texture2D" uid="uid://cs6pa7h8ffvy4" path="res://resource/sprite/bullet/normal/bullet0003.png" id="1_sl01e"] + [resource] animations = [{ diff --git a/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0004.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0004.tres new file mode 100644 index 0000000..8ca35b7 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0004.tres @@ -0,0 +1,86 @@ +[gd_resource type="SpriteFrames" load_steps=12 format=3 uid="uid://d3vma1qjo478l"] + +[ext_resource type="Texture2D" uid="uid://c25xd887txviq" path="res://resource/sprite/bullet/normal/bullet0004.png" id="1_qrd7l"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_q5ryk"] +atlas = ExtResource("1_qrd7l") +region = Rect2(0, 0, 5, 5) + +[sub_resource type="AtlasTexture" id="AtlasTexture_k2jqk"] +atlas = ExtResource("1_qrd7l") +region = Rect2(0, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p5if5"] +atlas = ExtResource("1_qrd7l") +region = Rect2(7, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a88dp"] +atlas = ExtResource("1_qrd7l") +region = Rect2(14, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ewrr5"] +atlas = ExtResource("1_qrd7l") +region = Rect2(21, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_imjsl"] +atlas = ExtResource("1_qrd7l") +region = Rect2(28, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rkdnv"] +atlas = ExtResource("1_qrd7l") +region = Rect2(35, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hdnbo"] +atlas = ExtResource("1_qrd7l") +region = Rect2(42, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l6nrt"] +atlas = ExtResource("1_qrd7l") +region = Rect2(49, 0, 7, 7) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h6vsu"] +atlas = ExtResource("1_qrd7l") +region = Rect2(56, 0, 7, 7) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_q5ryk") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_k2jqk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p5if5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a88dp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ewrr5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_imjsl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rkdnv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hdnbo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l6nrt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h6vsu") +}], +"loop": true, +"name": &"move", +"speed": 10.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/effect/weapon/Collision1.tres b/DungeonShooting_Godot/resource/spriteFrames/effect/weapon/Collision1.tres new file mode 100644 index 0000000..f0b7085 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/effect/weapon/Collision1.tres @@ -0,0 +1,42 @@ +[gd_resource type="SpriteFrames" load_steps=6 format=3 uid="uid://pwg2tx7dmcvp"] + +[ext_resource type="Texture2D" uid="uid://dwa4chrugc6b1" path="res://resource/sprite/effects/weapon/Collision1.png" id="1_fwdya"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_howuv"] +atlas = ExtResource("1_fwdya") +region = Rect2(0, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4qx75"] +atlas = ExtResource("1_fwdya") +region = Rect2(16, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_n6ula"] +atlas = ExtResource("1_fwdya") +region = Rect2(32, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5lumy"] +atlas = ExtResource("1_fwdya") +region = Rect2(48, 0, 16, 16) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_howuv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4qx75") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_n6ula") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5lumy") +}, { +"duration": 1.0, +"texture": null +}], +"loop": false, +"name": &"default", +"speed": 25.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0011.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0011.tres new file mode 100644 index 0000000..6a95208 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0011.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://bq7t8ruav5g41"] + +[ext_resource type="Texture2D" uid="uid://b3lemqkwfnufw" path="res://resource/sprite/prop/buff/BuffProp0011.png" id="1_abwtt"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_abwtt") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0012.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0012.tres new file mode 100644 index 0000000..8416d7a --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0012.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://rksmm8jwex7l"] + +[ext_resource type="Texture2D" uid="uid://djhhig4ct8fgo" path="res://resource/sprite/prop/buff/BuffProp0012.png" id="1_kl6x5"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_kl6x5") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0013.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0013.tres new file mode 100644 index 0000000..ae3883a --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0013.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://cdnrqfy0vfyu5"] + +[ext_resource type="Texture2D" uid="uid://8ykm3jbhjpxh" path="res://resource/sprite/prop/buff/BuffProp0013.png" id="1_sshn3"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_sshn3") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0014.tres b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0014.tres new file mode 100644 index 0000000..141074b --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/prop/buff/BuffProp0014.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://ux70kddi6wwy"] + +[ext_resource type="Texture2D" uid="uid://ddkno2rlclys0" path="res://resource/sprite/prop/buff/BuffProp0014.png" id="1_0n30r"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_0n30r") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/role/Enemy0001.tres b/DungeonShooting_Godot/resource/spriteFrames/role/Enemy0001.tres new file mode 100644 index 0000000..42508d3 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/role/Enemy0001.tres @@ -0,0 +1,117 @@ +[gd_resource type="SpriteFrames" load_steps=15 format=3 uid="uid://cnctpyrn02rhd"] + +[ext_resource type="Texture2D" uid="uid://ddhkhfaos2w1g" path="res://resource/sprite/role/enemy0001/enemy0001.png" id="1_inanc"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_jttte"] +atlas = ExtResource("1_inanc") +region = Rect2(0, 0, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ff0sc"] +atlas = ExtResource("1_inanc") +region = Rect2(0, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mf7cn"] +atlas = ExtResource("1_inanc") +region = Rect2(16, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yvk4h"] +atlas = ExtResource("1_inanc") +region = Rect2(32, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pwcj2"] +atlas = ExtResource("1_inanc") +region = Rect2(48, 24, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_frwnm"] +atlas = ExtResource("1_inanc") +region = Rect2(48, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_201od"] +atlas = ExtResource("1_inanc") +region = Rect2(32, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kteyh"] +atlas = ExtResource("1_inanc") +region = Rect2(16, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_huqt3"] +atlas = ExtResource("1_inanc") +region = Rect2(0, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6s1ko"] +atlas = ExtResource("1_inanc") +region = Rect2(0, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vq38t"] +atlas = ExtResource("1_inanc") +region = Rect2(16, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2b6x5"] +atlas = ExtResource("1_inanc") +region = Rect2(32, 48, 16, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6755u"] +atlas = ExtResource("1_inanc") +region = Rect2(48, 48, 16, 24) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_jttte") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_ff0sc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mf7cn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yvk4h") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pwcj2") +}], +"loop": true, +"name": &"idle", +"speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_frwnm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_201od") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kteyh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_huqt3") +}], +"loop": true, +"name": &"reverseRun", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6s1ko") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vq38t") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2b6x5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6755u") +}], +"loop": true, +"name": &"run", +"speed": 10.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/role/Enemy0002.tres b/DungeonShooting_Godot/resource/spriteFrames/role/Enemy0002.tres new file mode 100644 index 0000000..227127a --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/role/Enemy0002.tres @@ -0,0 +1,131 @@ +[gd_resource type="SpriteFrames" load_steps=19 format=3 uid="uid://ctpkpxgcwb583"] + +[ext_resource type="Texture2D" uid="uid://ba6ke6xp63lnv" path="res://resource/sprite/role/enemy0002/Enemy0002.png" id="1_bvqwm"] +[ext_resource type="Texture2D" uid="uid://bwafpoxpkx3lu" path="res://resource/sprite/role/enemy0002/Enemy0002_idle.png" id="2_755ta"] +[ext_resource type="Texture2D" uid="uid://dibftt2rj5omq" path="res://resource/sprite/role/enemy0002/Enemy0002_run.png" id="3_xwtnk"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_pbkbq"] +atlas = ExtResource("2_755ta") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g3tja"] +atlas = ExtResource("2_755ta") +region = Rect2(64, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0dbdg"] +atlas = ExtResource("2_755ta") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_emsy8"] +atlas = ExtResource("2_755ta") +region = Rect2(128, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_d2jr8"] +atlas = ExtResource("2_755ta") +region = Rect2(160, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kaina"] +atlas = ExtResource("2_755ta") +region = Rect2(192, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hhv1n"] +atlas = ExtResource("2_755ta") +region = Rect2(224, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_583v7"] +atlas = ExtResource("3_xwtnk") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2gvm7"] +atlas = ExtResource("3_xwtnk") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_614bw"] +atlas = ExtResource("3_xwtnk") +region = Rect2(64, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_okagi"] +atlas = ExtResource("3_xwtnk") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bpq0u"] +atlas = ExtResource("3_xwtnk") +region = Rect2(128, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pmrvk"] +atlas = ExtResource("3_xwtnk") +region = Rect2(160, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_18qid"] +atlas = ExtResource("3_xwtnk") +region = Rect2(192, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yxvkk"] +atlas = ExtResource("3_xwtnk") +region = Rect2(224, 0, 32, 32) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_bvqwm") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_pbkbq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g3tja") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0dbdg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_emsy8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_d2jr8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kaina") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hhv1n") +}], +"loop": true, +"name": &"idle", +"speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_583v7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2gvm7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_614bw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_okagi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bpq0u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pmrvk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_18qid") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yxvkk") +}], +"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 deleted file mode 100644 index 600ba06..0000000 --- a/DungeonShooting_Godot/resource/spriteFrames/role/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://ddhkhfaos2w1g" path="res://resource/sprite/role/enemy0001/enemy0001.png" id="1_xi6qw"] - -[sub_resource type="AtlasTexture" id="AtlasTexture_jttte"] -atlas = ExtResource("1_xi6qw") -region = Rect2(0, 0, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ff0sc"] -atlas = ExtResource("1_xi6qw") -region = Rect2(0, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mf7cn"] -atlas = ExtResource("1_xi6qw") -region = Rect2(16, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_yvk4h"] -atlas = ExtResource("1_xi6qw") -region = Rect2(32, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_pwcj2"] -atlas = ExtResource("1_xi6qw") -region = Rect2(48, 24, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_frwnm"] -atlas = ExtResource("1_xi6qw") -region = Rect2(48, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_201od"] -atlas = ExtResource("1_xi6qw") -region = Rect2(32, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kteyh"] -atlas = ExtResource("1_xi6qw") -region = Rect2(16, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_huqt3"] -atlas = ExtResource("1_xi6qw") -region = Rect2(0, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6s1ko"] -atlas = ExtResource("1_xi6qw") -region = Rect2(0, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vq38t"] -atlas = ExtResource("1_xi6qw") -region = Rect2(16, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_2b6x5"] -atlas = ExtResource("1_xi6qw") -region = Rect2(32, 48, 16, 24) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6755u"] -atlas = ExtResource("1_xi6qw") -region = Rect2(48, 48, 16, 24) - -[resource] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_jttte") -}], -"loop": true, -"name": &"default", -"speed": 5.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_ff0sc") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mf7cn") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_yvk4h") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_pwcj2") -}], -"loop": true, -"name": &"idle", -"speed": 7.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_frwnm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_201od") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kteyh") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_huqt3") -}], -"loop": true, -"name": &"reverseRun", -"speed": 10.0 -}, { -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_6s1ko") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vq38t") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_2b6x5") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6755u") -}], -"loop": true, -"name": &"run", -"speed": 10.0 -}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0004.tres b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0004.tres new file mode 100644 index 0000000..f1bd70c --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/shell/Shell0004.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://b8b0ye3iv1vwp"] + +[ext_resource type="Texture2D" uid="uid://17htwakoupb2" path="res://resource/sprite/shell/Shell0004.png" id="1_mpyi3"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_mpyi3") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0008.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0008.tres new file mode 100644 index 0000000..1dfc8d7 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0008.tres @@ -0,0 +1,153 @@ +[gd_resource type="SpriteFrames" load_steps=22 format=3 uid="uid://b2wpy40adyjs6"] + +[ext_resource type="Texture2D" uid="uid://cb0n1btxc6wl6" path="res://resource/sprite/weapon/weapon0008/Weapon0008.png" id="1_bwp4b"] +[ext_resource type="Texture2D" uid="uid://h2jpooksm65e" path="res://resource/sprite/weapon/weapon0008/Weapon0008_reloading.png" id="2_gep5m"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_u0g6k"] +atlas = ExtResource("2_gep5m") +region = Rect2(0, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_c4u1l"] +atlas = ExtResource("2_gep5m") +region = Rect2(20, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8gghd"] +atlas = ExtResource("2_gep5m") +region = Rect2(40, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a47tr"] +atlas = ExtResource("2_gep5m") +region = Rect2(60, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tw6v8"] +atlas = ExtResource("2_gep5m") +region = Rect2(80, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jgrsc"] +atlas = ExtResource("2_gep5m") +region = Rect2(100, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y0oy8"] +atlas = ExtResource("2_gep5m") +region = Rect2(120, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kdd0i"] +atlas = ExtResource("2_gep5m") +region = Rect2(140, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hln2b"] +atlas = ExtResource("2_gep5m") +region = Rect2(160, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8gvf4"] +atlas = ExtResource("2_gep5m") +region = Rect2(180, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6jcnt"] +atlas = ExtResource("2_gep5m") +region = Rect2(200, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6slrt"] +atlas = ExtResource("2_gep5m") +region = Rect2(220, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3if6d"] +atlas = ExtResource("2_gep5m") +region = Rect2(240, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5x4hi"] +atlas = ExtResource("2_gep5m") +region = Rect2(260, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ot2rb"] +atlas = ExtResource("2_gep5m") +region = Rect2(280, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3djuj"] +atlas = ExtResource("2_gep5m") +region = Rect2(300, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_83gjo"] +atlas = ExtResource("2_gep5m") +region = Rect2(320, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hlvls"] +atlas = ExtResource("2_gep5m") +region = Rect2(340, 0, 20, 14) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ol1l8"] +atlas = ExtResource("2_gep5m") +region = Rect2(360, 0, 20, 14) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_bwp4b") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_u0g6k") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_c4u1l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8gghd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a47tr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tw6v8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jgrsc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y0oy8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kdd0i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hln2b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8gvf4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6jcnt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6slrt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3if6d") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5x4hi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ot2rb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3djuj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_83gjo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hlvls") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ol1l8") +}], +"loop": false, +"name": &"reloading", +"speed": 11.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0009.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0009.tres new file mode 100644 index 0000000..987a1d4 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0009.tres @@ -0,0 +1,55 @@ +[gd_resource type="SpriteFrames" load_steps=8 format=3 uid="uid://c0xwj3kpk02ua"] + +[ext_resource type="Texture2D" uid="uid://qd7hufitblaf" path="res://resource/sprite/weapon/weapon0009/weapon0009.png" id="1_kidjv"] +[ext_resource type="Texture2D" uid="uid://bvw6batqb8dv8" path="res://resource/sprite/weapon/weapon0009/Weapon0009_reload.png" id="2_3282c"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_isstj"] +atlas = ExtResource("2_3282c") +region = Rect2(0, 0, 32, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6v16h"] +atlas = ExtResource("2_3282c") +region = Rect2(32, 0, 32, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jjjl6"] +atlas = ExtResource("2_3282c") +region = Rect2(64, 0, 32, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nykj1"] +atlas = ExtResource("2_3282c") +region = Rect2(96, 0, 32, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6s7uc"] +atlas = ExtResource("2_3282c") +region = Rect2(128, 0, 32, 24) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_kidjv") +}], +"loop": false, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_isstj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6v16h") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jjjl6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nykj1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6s7uc") +}], +"loop": true, +"name": &"reloading_frame", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/scene/Main.tscn b/DungeonShooting_Godot/scene/Main.tscn index 877b1ff..080a8f2 100644 --- a/DungeonShooting_Godot/scene/Main.tscn +++ b/DungeonShooting_Godot/scene/Main.tscn @@ -47,8 +47,6 @@ [node name="SceneRoot" type="Node2D" parent="ViewCanvas/SubViewportContainer/SubViewport"] [node name="Camera2D" type="Camera2D" parent="ViewCanvas/SubViewportContainer/SubViewport"] -process_callback = 0 -limit_smoothed = true editor_draw_drag_margin = true script = ExtResource("2_2j367") diff --git a/DungeonShooting_Godot/scene/World.tscn b/DungeonShooting_Godot/scene/World.tscn index 69e07d3..76eca4e 100644 --- a/DungeonShooting_Godot/scene/World.tscn +++ b/DungeonShooting_Godot/scene/World.tscn @@ -10,7 +10,6 @@ glow_blend_mode = 1 [node name="World" type="CanvasModulate" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot", "FogMaskRoot")] -color = Color(0, 0, 0, 1) script = ExtResource("1_kt3mm") NormalLayer = NodePath("NormalLayer") YSortLayer = NodePath("YSortLayer") @@ -33,6 +32,7 @@ layer_1/y_sort_enabled = false layer_1/y_sort_origin = 0 layer_1/z_index = 0 +layer_1/navigation_enabled = true layer_1/tile_data = PackedInt32Array() layer_2/name = "Top" layer_2/enabled = true @@ -40,6 +40,7 @@ layer_2/y_sort_enabled = false layer_2/y_sort_origin = 0 layer_2/z_index = 10 +layer_2/navigation_enabled = true layer_2/tile_data = PackedInt32Array() layer_3/name = "AisleFloor" layer_3/enabled = true @@ -47,6 +48,7 @@ layer_3/y_sort_enabled = false layer_3/y_sort_origin = 0 layer_3/z_index = -10 +layer_3/navigation_enabled = true layer_3/tile_data = PackedInt32Array() [node name="StaticSpriteRoot" type="Node2D" parent="."] diff --git a/DungeonShooting_Godot/scene/test/TestCommpont.tscn b/DungeonShooting_Godot/scene/test/TestCommpont.tscn deleted file mode 100644 index 8594977..0000000 --- a/DungeonShooting_Godot/scene/test/TestCommpont.tscn +++ /dev/null @@ -1,10 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://chgfadxc8pqr4"] - -[ext_resource type="Texture2D" uid="uid://uhhfgdhpk7i4" path="res://icon.png" id="1"] - -[node name="Node2D" type="Node2D"] - -[node name="Sprite2D" type="Sprite2D" parent="."] -position = Vector2(200, 102) -scale = Vector2(0.3, 0.3) -texture = ExtResource("1") diff --git a/DungeonShooting_Godot/scene/test/TestDrawSprite.tscn b/DungeonShooting_Godot/scene/test/TestDrawSprite.tscn new file mode 100644 index 0000000..a777b39 --- /dev/null +++ b/DungeonShooting_Godot/scene/test/TestDrawSprite.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=3 format=3 uid="uid://gby5bfwuu4kx"] + +[ext_resource type="Script" path="res://src/test/TestDrawSprite.cs" id="1_tplub"] + +[sub_resource type="Curve2D" id="Curve2D_ft6ap"] +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 29, 41, 0, 0, 0, 0, 1547, 34, 0, 0, 0, 0, 1544, 863, 0, 0, 0, 0, 39, 848, 0, 0, 0, 0, 828, 387, 0, 0, 0, 0, 42, 54) +} +point_count = 6 + +[node name="TestDrawSprite" type="Node2D" node_paths=PackedStringArray("FpsLabel", "PathFollow2D")] +script = ExtResource("1_tplub") +FpsLabel = NodePath("CanvasLayer/Fps") +PathFollow2D = NodePath("Path2D/PathFollow2D") + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="Fps" type="Label" parent="CanvasLayer"] +offset_left = 34.0 +offset_top = 31.0 +offset_right = 43.0 +offset_bottom = 71.0 + +[node name="Path2D" type="Path2D" parent="."] +curve = SubResource("Curve2D_ft6ap") + +[node name="PathFollow2D" type="PathFollow2D" parent="Path2D"] +position = Vector2(29, 41) +rotation = -0.0046113 + +[node name="Camera2D" type="Camera2D" parent="Path2D/PathFollow2D"] diff --git a/DungeonShooting_Godot/scene/test/TestExpression.tscn b/DungeonShooting_Godot/scene/test/TestExpression.tscn deleted file mode 100644 index 13731e2..0000000 --- a/DungeonShooting_Godot/scene/test/TestExpression.tscn +++ /dev/null @@ -1,9 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://blp7bo6tyoqlr"] - -[ext_resource type="Script" path="res://src/test/TestExpression.cs" id="1_qmchi"] - -[node name="TestExpression" type="Node2D"] -script = ExtResource("1_qmchi") -Str = "0003; -0001(w:100,ca:15,ra:30); -0002(w:120,ca:10,ra:20);" diff --git a/DungeonShooting_Godot/scene/test/TestGenerateDungeon.tscn b/DungeonShooting_Godot/scene/test/TestGenerateDungeon.tscn deleted file mode 100644 index 2b694f5..0000000 --- a/DungeonShooting_Godot/scene/test/TestGenerateDungeon.tscn +++ /dev/null @@ -1,46 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://5bbx1u0od3jm"] - -[ext_resource type="Script" path="res://src/test/TestGenerateDungeon.cs" id="1"] -[ext_resource type="Texture2D" uid="uid://dj8nrd5od4fcl" path="res://resource/map/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png" id="2"] - - - -[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_rvg0t"] -texture = ExtResource("2") -margins = Vector2i(0, 128) -0:0/next_alternative_id = 8 -0:0/0 = 0 -0:0/1 = 1 -0:0/1/flip_h = true -0:0/2 = 2 -0:0/2/flip_v = true -0:0/3 = 3 -0:0/3/flip_h = true -0:0/3/flip_v = true -0:0/4 = 4 -0:0/4/transpose = true -0:0/5 = 5 -0:0/5/flip_h = true -0:0/5/transpose = true -0:0/6 = 6 -0:0/6/flip_v = true -0:0/6/transpose = true -0:0/7 = 7 -0:0/7/flip_h = true -0:0/7/flip_v = true -0:0/7/transpose = true - -[sub_resource type="TileSet" id="1"] -sources/0 = SubResource("TileSetAtlasSource_rvg0t") - -[node name="TestGenerateDungeon" type="Node2D"] -script = ExtResource("1") -TileMapPath = NodePath("TileMap") -Camera3D = NodePath("Camera2D") - -[node name="Camera2D" type="Camera2D" parent="."] - -[node name="TileMap" type="TileMap" parent="."] -z_index = -1 -tile_set = SubResource("1") -format = 2 diff --git a/DungeonShooting_Godot/scene/test/TestGridData.tscn b/DungeonShooting_Godot/scene/test/TestGridData.tscn new file mode 100644 index 0000000..9f00647 --- /dev/null +++ b/DungeonShooting_Godot/scene/test/TestGridData.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://b4lwq3384y6c1"] + +[ext_resource type="Script" path="res://src/test/TestGridData.cs" id="1_jtgxu"] + +[node name="TestGridData" type="Node2D"] +script = ExtResource("1_jtgxu") diff --git a/DungeonShooting_Godot/scene/test/TestReadExcel.tscn b/DungeonShooting_Godot/scene/test/TestReadExcel.tscn deleted file mode 100644 index 1ab48cd..0000000 --- a/DungeonShooting_Godot/scene/test/TestReadExcel.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://deq562id5sngp"] - -[ext_resource type="Script" path="res://src/test/TestReadExcel.cs" id="1_y8vrr"] - -[node name="TestReadExcel" type="Node2D"] -script = ExtResource("1_y8vrr") diff --git a/DungeonShooting_Godot/src/config/ExcelConfig.cs b/DungeonShooting_Godot/src/config/ExcelConfig.cs index 6416ead..f9d7eaf 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig.cs @@ -8,13 +8,22 @@ public static partial class ExcelConfig { /// - /// ActivityObject.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// ActivityBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// - public static List ActivityObject_List { get; private set; } + public static List ActivityBase_List { get; private set; } /// - /// ActivityObject.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// ActivityBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id /// - public static Dictionary ActivityObject_Map { get; private set; } + public static Dictionary ActivityBase_Map { get; private set; } + + /// + /// ActivityMaterial.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// + public static List ActivityMaterial_List { get; private set; } + /// + /// ActivityMaterial.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// + public static Dictionary ActivityMaterial_Map { get; private set; } /// /// AiAttackAttr.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 @@ -26,6 +35,15 @@ public static Dictionary AiAttackAttr_Map { get; private set; } /// + /// BulletBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// + public static List BulletBase_List { get; private set; } + /// + /// BulletBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// + public static Dictionary BulletBase_Map { get; private set; } + + /// /// Sound.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// public static List Sound_List { get; private set; } @@ -35,13 +53,13 @@ public static Dictionary Sound_Map { get; private set; } /// - /// Weapon.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// WeaponBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// - public static List Weapon_List { get; private set; } + public static List WeaponBase_List { get; private set; } /// - /// Weapon.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// WeaponBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id /// - public static Dictionary Weapon_Map { get; private set; } + public static Dictionary WeaponBase_Map { get; private set; } private static bool _init = false; @@ -53,29 +71,50 @@ if (_init) return; _init = true; - _InitActivityObjectConfig(); + _InitActivityBaseConfig(); + _InitActivityMaterialConfig(); _InitAiAttackAttrConfig(); + _InitBulletBaseConfig(); _InitSoundConfig(); - _InitWeaponConfig(); + _InitWeaponBaseConfig(); - _InitWeaponRef(); + _InitActivityBaseRef(); + _InitWeaponBaseRef(); } - private static void _InitActivityObjectConfig() + private static void _InitActivityBaseConfig() { try { - var text = _ReadConfigAsText("res://resource/config/ActivityObject.json"); - ActivityObject_List = JsonSerializer.Deserialize>(text); - ActivityObject_Map = new Dictionary(); - foreach (var item in ActivityObject_List) + var text = _ReadConfigAsText("res://resource/config/ActivityBase.json"); + ActivityBase_List = new List(JsonSerializer.Deserialize>(text)); + ActivityBase_Map = new Dictionary(); + foreach (var item in ActivityBase_List) { - ActivityObject_Map.Add(item.Id, item); + ActivityBase_Map.Add(item.Id, item); } } catch (Exception e) { GD.PrintErr(e.ToString()); - throw new Exception("初始化表'ActivityObject'失败!"); + throw new Exception("初始化表'ActivityBase'失败!"); + } + } + private static void _InitActivityMaterialConfig() + { + try + { + var text = _ReadConfigAsText("res://resource/config/ActivityMaterial.json"); + ActivityMaterial_List = JsonSerializer.Deserialize>(text); + ActivityMaterial_Map = new Dictionary(); + foreach (var item in ActivityMaterial_List) + { + ActivityMaterial_Map.Add(item.Id, item); + } + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化表'ActivityMaterial'失败!"); } } private static void _InitAiAttackAttrConfig() @@ -96,6 +135,24 @@ throw new Exception("初始化表'AiAttackAttr'失败!"); } } + private static void _InitBulletBaseConfig() + { + try + { + var text = _ReadConfigAsText("res://resource/config/BulletBase.json"); + BulletBase_List = JsonSerializer.Deserialize>(text); + BulletBase_Map = new Dictionary(); + foreach (var item in BulletBase_List) + { + BulletBase_Map.Add(item.Id, item); + } + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化表'BulletBase'失败!"); + } + } private static void _InitSoundConfig() { try @@ -114,31 +171,65 @@ throw new Exception("初始化表'Sound'失败!"); } } - private static void _InitWeaponConfig() + private static void _InitWeaponBaseConfig() { try { - var text = _ReadConfigAsText("res://resource/config/Weapon.json"); - Weapon_List = new List(JsonSerializer.Deserialize>(text)); - Weapon_Map = new Dictionary(); - foreach (var item in Weapon_List) + var text = _ReadConfigAsText("res://resource/config/WeaponBase.json"); + WeaponBase_List = new List(JsonSerializer.Deserialize>(text)); + WeaponBase_Map = new Dictionary(); + foreach (var item in WeaponBase_List) { - Weapon_Map.Add(item.Id, item); + WeaponBase_Map.Add(item.Id, item); } } catch (Exception e) { GD.PrintErr(e.ToString()); - throw new Exception("初始化表'Weapon'失败!"); + throw new Exception("初始化表'WeaponBase'失败!"); } } - private static void _InitWeaponRef() + private static void _InitActivityBaseRef() { - foreach (Ref_Weapon item in Weapon_List) + foreach (Ref_ActivityBase item in ActivityBase_List) { try { + if (!string.IsNullOrEmpty(item.__Material)) + { + item.Material = ActivityMaterial_Map[item.__Material]; + } + + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化'ActivityBase'引用其他表数据失败, 当前行id: " + item.Id); + } + } + } + private static void _InitWeaponBaseRef() + { + foreach (Ref_WeaponBase item in WeaponBase_List) + { + try + { + if (!string.IsNullOrEmpty(item.__Activity)) + { + item.Activity = ActivityBase_Map[item.__Activity]; + } + + if (!string.IsNullOrEmpty(item.__Bullet)) + { + item.Bullet = BulletBase_Map[item.__Bullet]; + } + + if (!string.IsNullOrEmpty(item.__Shell)) + { + item.Shell = ActivityBase_Map[item.__Shell]; + } + if (!string.IsNullOrEmpty(item.__ShootSound)) { item.ShootSound = Sound_Map[item.__ShootSound]; @@ -175,7 +266,7 @@ if (!string.IsNullOrEmpty(item.__AiUseAttribute)) { - item.AiUseAttribute = Weapon_Map[item.__AiUseAttribute]; + item.AiUseAttribute = WeaponBase_Map[item.__AiUseAttribute]; } if (!string.IsNullOrEmpty(item.__AiAttackAttr)) @@ -187,7 +278,7 @@ catch (Exception e) { GD.PrintErr(e.ToString()); - throw new Exception("初始化'Weapon'引用其他表数据失败, 当前行id: " + item.Id); + throw new Exception("初始化'WeaponBase'引用其他表数据失败, 当前行id: " + item.Id); } } } diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs new file mode 100644 index 0000000..76d7bfb --- /dev/null +++ b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs @@ -0,0 +1,107 @@ +using System.Text.Json.Serialization; +using System.Collections.Generic; + +namespace Config; + +public static partial class ExcelConfig +{ + public class ActivityBase + { + /// + /// 物体唯一id
+ /// 需要添加类型前缀 + ///
+ [JsonInclude] + public string Id; + + /// + /// Test(测试对象): 2
+ /// Role(角色): 3
+ /// Enemy(敌人): 4
+ /// Weapon(武器): 5
+ /// Bullet(子弹): 6
+ /// Shell(弹壳): 7
+ /// Effect(特效): 8
+ /// Prop(道具): 9
+ /// Other(其它类型): 99 + ///
+ [JsonInclude] + public int Type; + + /// + /// 物体名称 + /// + [JsonInclude] + public string Name; + + /// + /// 物体简介
+ /// 一句对物体简短的介绍, 比如拾起物体时弹出的描述 + ///
+ [JsonInclude] + public string Intro; + + /// + /// 物体详情
+ /// 在图鉴中的描述 + ///
+ [JsonInclude] + public string Details; + + /// + /// 是否是静态物体 + /// + [JsonInclude] + public bool IsStatic; + + /// + /// 物体使用交互材质
+ /// 如果不填,则默认使用id为0001的材质 + ///
+ public ActivityMaterial Material; + + /// + /// 物体预制场景路径, 场景根节点必须是ActivityObject子类 + /// + [JsonInclude] + public string Prefab; + + /// + /// 物体图标
+ /// 如果不需要在图鉴或者地图编辑器中显示该物体, 则可以不用设置 + ///
+ [JsonInclude] + public string Icon; + + /// + /// 是否在地图编辑器中显示该物体 + /// + [JsonInclude] + public bool ShowInMapEditor; + + /// + /// 返回浅拷贝出的新对象 + /// + public ActivityBase Clone() + { + var inst = new ActivityBase(); + inst.Id = Id; + inst.Type = Type; + inst.Name = Name; + inst.Intro = Intro; + inst.Details = Details; + inst.IsStatic = IsStatic; + inst.Material = Material; + inst.Prefab = Prefab; + inst.Icon = Icon; + inst.ShowInMapEditor = ShowInMapEditor; + return inst; + } + } + private class Ref_ActivityBase : ActivityBase + { + [JsonInclude] + public string __Material; + + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityMaterial.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityMaterial.cs new file mode 100644 index 0000000..d0d756b --- /dev/null +++ b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityMaterial.cs @@ -0,0 +1,82 @@ +using System.Text.Json.Serialization; +using System.Collections.Generic; + +namespace Config; + +public static partial class ExcelConfig +{ + public class ActivityMaterial + { + /// + /// 表Id + /// + [JsonInclude] + public string Id; + + /// + /// 备注 + /// + [JsonInclude] + public string Remark; + + /// + /// 摩擦力 + /// + [JsonInclude] + public float Friction; + + /// + /// 旋转摩擦力 + /// + [JsonInclude] + public float RotationFriction; + + /// + /// 落地之后是否回弹 + /// + [JsonInclude] + public bool Bounce; + + /// + /// 物体水平回弹强度 + /// + [JsonInclude] + public float BounceStrength; + + /// + /// 物体下坠回弹的强度 + /// + [JsonInclude] + public float FallBounceStrength; + + /// + /// 物体下坠回弹后的运动速度衰比例 + /// + [JsonInclude] + public float FallBounceSpeed; + + /// + /// 物体下坠回弹后的旋转速度衰减比例 + /// + [JsonInclude] + public float FallBounceRotation; + + /// + /// 返回浅拷贝出的新对象 + /// + public ActivityMaterial Clone() + { + var inst = new ActivityMaterial(); + inst.Id = Id; + inst.Remark = Remark; + inst.Friction = Friction; + inst.RotationFriction = RotationFriction; + inst.Bounce = Bounce; + inst.BounceStrength = BounceStrength; + inst.FallBounceStrength = FallBounceStrength; + inst.FallBounceSpeed = FallBounceSpeed; + inst.FallBounceRotation = FallBounceRotation; + return inst; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs deleted file mode 100644 index 1d3dbe4..0000000 --- a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityObject.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System.Text.Json.Serialization; -using System.Collections.Generic; - -namespace Config; - -public static partial class ExcelConfig -{ - public class ActivityObject - { - /// - /// 物体唯一id
- /// 需要添加类型前缀 - ///
- [JsonInclude] - public string Id; - - /// - /// Test(测试对象): 2
- /// Role(角色): 3
- /// Enemy(敌人): 4
- /// Weapon(武器): 5
- /// Bullet(子弹): 6
- /// Shell(弹壳): 7
- /// Effect(特效): 8
- /// Prop(道具): 9
- /// Other(其它类型): 99 - ///
- [JsonInclude] - public int Type; - - /// - /// 物体名称 - /// - [JsonInclude] - public string Name; - - /// - /// 物体简介
- /// 一句对物体简短的介绍, 比如拾起物体时弹出的描述 - ///
- [JsonInclude] - public string Intro; - - /// - /// 物体详情
- /// 在图鉴中的描述 - ///
- [JsonInclude] - public string Details; - - /// - /// 物体预制场景路径, 场景根节点必须是ActivityObject子类 - /// - [JsonInclude] - public string Prefab; - - /// - /// 物体图标
- /// 如果不需要在图鉴或者地图编辑器中显示该物体, 则可以不用设置 - ///
- [JsonInclude] - public string Icon; - - /// - /// 是否在地图编辑器中显示该物体 - /// - [JsonInclude] - public bool ShowInMapEditor; - - /// - /// 返回浅拷贝出的新对象 - /// - public ActivityObject Clone() - { - var inst = new ActivityObject(); - inst.Id = Id; - inst.Type = Type; - inst.Name = Name; - inst.Intro = Intro; - inst.Details = Details; - inst.Prefab = Prefab; - inst.Icon = Icon; - inst.ShowInMapEditor = ShowInMapEditor; - return inst; - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_BulletBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_BulletBase.cs new file mode 100644 index 0000000..dce87f4 --- /dev/null +++ b/DungeonShooting_Godot/src/config/ExcelConfig_BulletBase.cs @@ -0,0 +1,140 @@ +using System.Text.Json.Serialization; +using System.Collections.Generic; + +namespace Config; + +public static partial class ExcelConfig +{ + public class BulletBase + { + /// + /// 子弹id + /// + [JsonInclude] + public string Id; + + /// + /// 子弹名称 + /// + [JsonInclude] + public string Name; + + /// + /// 子弹类型:
+ /// 实体子弹:1
+ /// 激光子弹:2
+ /// 纯伤害:3 + ///
+ [JsonInclude] + public int Type; + + /// + /// 绑定子弹预制体,根据Type填不同的参数
+ /// Type为1,填ActivityBase表Id
+ /// Type为2,填场景路径
+ /// Type为3,不填 + ///
+ [JsonInclude] + public string Prefab; + + /// + /// 造成的伤害区间
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public int[] HarmRange; + + /// + /// 造成伤害后击退值区间
+ /// 如果发射子弹,则按每发子弹算击退
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] RepelRange; + + /// + /// 子弹偏移角度区间
+ /// 用于设置子弹偏移朝向, 该属性和射半径效果类似, 但与其不同的是, 散射半径是用来控制枪口朝向的, 而该属性是控制子弹朝向的, 可用于制作霰弹枪子弹效果
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] DeviationAngleRange; + + /// + /// 子弹初速度区间
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] SpeedRange; + + /// + /// 子弹最大存在时间,单位:秒
+ /// 如果值小于等于0时子弹无限期存在
+ /// 只有Type为1时才需要填写
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] LifeTimeRange; + + /// + /// 子弹最大飞行距离区间
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] DistanceRange; + + /// + /// 是否开启重力下坠
+ /// 只有Type为1时有效 + ///
+ [JsonInclude] + public bool UseGravity; + + /// + /// 初始纵轴速度区间
+ /// 只有Type为1时有效
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] VerticalSpeed; + + /// + /// 反弹次数区间
+ /// 只有Type为1或2时有效
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public int[] BounceCount; + + /// + /// 子弹穿透次数区间
+ /// 只有Type为1时有效
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public int[] Penetration; + + /// + /// 返回浅拷贝出的新对象 + /// + public BulletBase Clone() + { + var inst = new BulletBase(); + inst.Id = Id; + inst.Name = Name; + inst.Type = Type; + inst.Prefab = Prefab; + inst.HarmRange = HarmRange; + inst.RepelRange = RepelRange; + inst.DeviationAngleRange = DeviationAngleRange; + inst.SpeedRange = SpeedRange; + inst.LifeTimeRange = LifeTimeRange; + inst.DistanceRange = DistanceRange; + inst.UseGravity = UseGravity; + inst.VerticalSpeed = VerticalSpeed; + inst.BounceCount = BounceCount; + inst.Penetration = Penetration; + return inst; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs b/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs deleted file mode 100644 index c9dd584..0000000 --- a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs +++ /dev/null @@ -1,499 +0,0 @@ -using System.Text.Json.Serialization; -using System.Collections.Generic; - -namespace Config; - -public static partial class ExcelConfig -{ - public class Weapon - { - /// - /// 武器属性id - /// - [JsonInclude] - public string Id; - - /// - /// 属性绑定武器的Id,如果是Ai使用的数据, 则填空字符串串 - /// - [JsonInclude] - public string WeaponId; - - /// - /// 备注 - /// - [JsonInclude] - public string Remark; - - /// - /// 重量 - /// - [JsonInclude] - public float Weight; - - /// - /// 武器类型:
- /// 1.副武器
- /// 2.主武器
- /// 3.重型武器 - ///
- [JsonInclude] - public byte WeightType; - - /// - /// 是否连续发射, 如果为false, 则每次发射都需要扣动扳机 - /// - [JsonInclude] - public bool ContinuousShoot; - - /// - /// 弹夹容量 - /// - [JsonInclude] - public int AmmoCapacity; - - /// - /// 弹药容量上限 - /// - [JsonInclude] - public int MaxAmmoCapacity; - - /// - /// 默认起始备用弹药数量 - /// - [JsonInclude] - public int StandbyAmmoCapacity; - - /// - /// 装弹时间 (单位: 秒) - /// - [JsonInclude] - public float ReloadTime; - - /// - /// 每粒子弹是否是单独装填, 如果是, 那么每上一发子弹的时间就是 ReloadTime, 可以做霰弹枪装填效果 - /// - [JsonInclude] - public bool AloneReload; - - /// - /// 单独装填时每次装填子弹数量, 必须要将 'AloneReload' 属性设置为 true - /// - [JsonInclude] - public int AloneReloadCount; - - /// - /// 单独装弹模式下,从触发装弹到开始装第一发子弹中间的间隔时间, 必须要将 'AloneReload' 属性设置为 true - /// - [JsonInclude] - public float AloneReloadBeginIntervalTime; - - /// - /// 单独装弹模式下,从装完最后一发子弹到可以射击中间的间隔时间, 必须要将 'AloneReload' 属性设置为 true - /// - [JsonInclude] - public float AloneReloadFinishIntervalTime; - - /// - /// 单独装填的子弹时可以立即射击, 必须要将 'AloneReload' 属性设置为 true - /// - [JsonInclude] - public bool AloneReloadCanShoot; - - /// - /// 是否为松发开火, 也就是松开扳机才开火, 若要启用该属性, 必须将 'ContinuousShoot' 设置为 false - /// - [JsonInclude] - public bool LooseShoot; - - /// - /// 最少需要蓄力多久才能开火, 必须将 'LooseShoot' 设置为 true - /// - [JsonInclude] - public float MinChargeTime; - - /// - /// 单次射击后是否需要手动上膛动作, 必须将 'ContinuousShoot' 设置为 false - /// - [JsonInclude] - public bool ManualBeLoaded; - - /// - /// 手动上膛模式下, 单次射击后是否自动执行上膛操作, 必须将 'ManualBeLoaded' 设置为 true - /// - [JsonInclude] - public bool AutoManualBeLoaded; - - /// - /// 上膛时间, 如果时间为0, 则不会播放上膛动画和音效, 可以视为没有上膛动作, 必须将 'ManualBeLoaded' 设置为 true - /// - [JsonInclude] - public float BeLoadedTime; - - /// - /// 连续发射次数区间, 仅当 'ContinuousShoot' 为 false 时生效
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public int[] ContinuousCountRange; - - /// - /// 按下一次扳机后需要多长时间才能再次感应按下 - /// - [JsonInclude] - public float TriggerInterval; - - /// - /// 初始射速, 初始每分钟能开火次数 - /// - [JsonInclude] - public float StartFiringSpeed; - - /// - /// 最终射速, 最终每分钟能开火次数, 仅当 'ContinuousShoot' 为 true 时生效 - /// - [JsonInclude] - public float FinalFiringSpeed; - - /// - /// 按下扳机并开火后射速每秒增加量 - /// - [JsonInclude] - public float FiringSpeedAddSpeed; - - /// - /// 松开扳机后射速消散速率 - /// - [JsonInclude] - public float FiringSpeedBackSpeed; - - /// - /// 单次开火发射子弹数量区间
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public int[] FireBulletCountRange; - - /// - /// 从按下扳机到发射第一发子弹的延时时, 如果中途松开扳机, 那么延时时间会重新计算, 必须将 'LooseShoot' 设置为 false - /// - [JsonInclude] - public float DelayedTime; - - /// - /// 初始散射半径 - /// - [JsonInclude] - public float StartScatteringRange; - - /// - /// 最终散射半径 - /// - [JsonInclude] - public float FinalScatteringRange; - - /// - /// 每次发射后散射增加值 - /// - [JsonInclude] - public float ScatteringRangeAddValue; - - /// - /// 散射值销退速率 - /// - [JsonInclude] - public float ScatteringRangeBackSpeed; - - /// - /// 开始销退散射值的延时时间 - /// - [JsonInclude] - public float ScatteringRangeBackDelayTime; - - /// - /// 开火后相机抖动强度,只有玩家拾起武器开火才会抖动相机 - /// - [JsonInclude] - public float CameraShake; - - /// - /// 后坐力区间 (仅用于开火后武器身抖动)
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public float[] BacklashRange; - - /// - /// 后坐力偏移回归回归速度 - /// - [JsonInclude] - public float BacklashRegressionSpeed; - - /// - /// 开火后武器口上抬角度 - /// - [JsonInclude] - public float UpliftAngle; - - /// - /// 武器默认上抬角度 - /// - [JsonInclude] - public float DefaultAngle; - - /// - /// 开火后武器口角度恢复速度倍数 - /// - [JsonInclude] - public float UpliftAngleRestore; - - /// - /// 默认射出的子弹id - /// - [JsonInclude] - public string BulletId; - - /// - /// 造成的伤害区间
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public int[] HarmRange; - - /// - /// 造成伤害后击退值区间
- /// 如果发射子弹,则按每发子弹算击退
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public float[] RepelRnage; - - /// - /// 子弹偏移角度区间
- /// 用于设置子弹偏移朝向, 该属性和射半径效果类似, 但与其不同的是, 散射半径是用来控制枪口朝向的, 而该属性是控制子弹朝向的, 可用于制作霰弹枪子弹效果
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public float[] BulletDeviationAngleRange; - - /// - /// 子弹初速度区间
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public float[] BulletSpeedRange; - - /// - /// 子弹飞行距离区间
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public float[] BulletDistanceRange; - - /// - /// 默认抛出的弹壳 - /// - [JsonInclude] - public string ShellId; - - /// - /// 投抛弹壳的延时时间, 在射击或者上膛后会触发抛弹壳效果
- /// 如果为负数, 则不自动抛弹 - ///
- [JsonInclude] - public float ThrowShellDelayTime; - - /// - /// 投抛状态下物体碰撞器大小 - /// - [JsonInclude] - public SerializeVector2 ThrowCollisionSize; - - /// - /// 是否可以触发近战攻击 - /// - [JsonInclude] - public bool CanMeleeAttack; - - /// - /// 近战攻击伤害区间
- /// 格式为格式为[value]或者[min,max] - ///
- [JsonInclude] - public int[] MeleeAttackHarmRange; - - /// - /// 近战攻击造成伤害后击退值区间
- /// 格式为[value]或者[min,max] - ///
- [JsonInclude] - public float[] MeleeAttackRepelRnage; - - /// - /// 射击音效 - /// - public Sound ShootSound; - - /// - /// 开始换弹音效 - /// - public Sound BeginReloadSound; - - /// - /// 开始换弹音效延时时间 - /// - [JsonInclude] - public float BeginReloadSoundDelayTime; - - /// - /// 换弹音效 - /// - public Sound ReloadSound; - - /// - /// 换弹音效延时时间 - /// - [JsonInclude] - public float ReloadSoundDelayTime; - - /// - /// 换弹结束音效 - /// - public Sound ReloadFinishSound; - - /// - /// 换弹结束音效在换弹结束前多久开始
- /// 注意: 如果'AloneReload'为true, 那么当前属性的值应该小于'AloneReloadFinishIntervalTime' - ///
- [JsonInclude] - public float ReloadFinishSoundAdvanceTime; - - /// - /// 上膛音效 - /// - public Sound BeLoadedSound; - - /// - /// 上膛音效延时时间, 这个时间应该小于'BeLoadedTime' - /// - [JsonInclude] - public float BeLoadedSoundDelayTime; - - /// - /// 其他音效 - /// - public Dictionary OtherSoundMap; - - /// - /// Ai属性
- /// Ai 使用该武器时的武器数据, 设置该字段, 可让同一把武器在敌人和玩家手上有不同属性
- /// 如果不填则Ai和玩家使用同一种属性 - ///
- public Weapon AiUseAttribute; - - /// - /// Ai使用该武器开火时的一些额外配置属性
- /// 玩家使用的武器不需要填写该字段 - ///
- public AiAttackAttr AiAttackAttr; - - /// - /// 返回浅拷贝出的新对象 - /// - public Weapon Clone() - { - var inst = new Weapon(); - inst.Id = Id; - inst.WeaponId = WeaponId; - inst.Remark = Remark; - inst.Weight = Weight; - inst.WeightType = WeightType; - inst.ContinuousShoot = ContinuousShoot; - inst.AmmoCapacity = AmmoCapacity; - inst.MaxAmmoCapacity = MaxAmmoCapacity; - inst.StandbyAmmoCapacity = StandbyAmmoCapacity; - inst.ReloadTime = ReloadTime; - inst.AloneReload = AloneReload; - inst.AloneReloadCount = AloneReloadCount; - inst.AloneReloadBeginIntervalTime = AloneReloadBeginIntervalTime; - inst.AloneReloadFinishIntervalTime = AloneReloadFinishIntervalTime; - inst.AloneReloadCanShoot = AloneReloadCanShoot; - inst.LooseShoot = LooseShoot; - inst.MinChargeTime = MinChargeTime; - inst.ManualBeLoaded = ManualBeLoaded; - inst.AutoManualBeLoaded = AutoManualBeLoaded; - inst.BeLoadedTime = BeLoadedTime; - inst.ContinuousCountRange = ContinuousCountRange; - inst.TriggerInterval = TriggerInterval; - inst.StartFiringSpeed = StartFiringSpeed; - inst.FinalFiringSpeed = FinalFiringSpeed; - inst.FiringSpeedAddSpeed = FiringSpeedAddSpeed; - inst.FiringSpeedBackSpeed = FiringSpeedBackSpeed; - inst.FireBulletCountRange = FireBulletCountRange; - inst.DelayedTime = DelayedTime; - inst.StartScatteringRange = StartScatteringRange; - inst.FinalScatteringRange = FinalScatteringRange; - inst.ScatteringRangeAddValue = ScatteringRangeAddValue; - inst.ScatteringRangeBackSpeed = ScatteringRangeBackSpeed; - inst.ScatteringRangeBackDelayTime = ScatteringRangeBackDelayTime; - inst.CameraShake = CameraShake; - inst.BacklashRange = BacklashRange; - inst.BacklashRegressionSpeed = BacklashRegressionSpeed; - inst.UpliftAngle = UpliftAngle; - inst.DefaultAngle = DefaultAngle; - inst.UpliftAngleRestore = UpliftAngleRestore; - inst.BulletId = BulletId; - inst.HarmRange = HarmRange; - inst.RepelRnage = RepelRnage; - inst.BulletDeviationAngleRange = BulletDeviationAngleRange; - inst.BulletSpeedRange = BulletSpeedRange; - inst.BulletDistanceRange = BulletDistanceRange; - inst.ShellId = ShellId; - inst.ThrowShellDelayTime = ThrowShellDelayTime; - inst.ThrowCollisionSize = ThrowCollisionSize; - inst.CanMeleeAttack = CanMeleeAttack; - inst.MeleeAttackHarmRange = MeleeAttackHarmRange; - inst.MeleeAttackRepelRnage = MeleeAttackRepelRnage; - inst.ShootSound = ShootSound; - inst.BeginReloadSound = BeginReloadSound; - inst.BeginReloadSoundDelayTime = BeginReloadSoundDelayTime; - inst.ReloadSound = ReloadSound; - inst.ReloadSoundDelayTime = ReloadSoundDelayTime; - inst.ReloadFinishSound = ReloadFinishSound; - inst.ReloadFinishSoundAdvanceTime = ReloadFinishSoundAdvanceTime; - inst.BeLoadedSound = BeLoadedSound; - inst.BeLoadedSoundDelayTime = BeLoadedSoundDelayTime; - inst.OtherSoundMap = OtherSoundMap; - inst.AiUseAttribute = AiUseAttribute; - inst.AiAttackAttr = AiAttackAttr; - return inst; - } - } - private class Ref_Weapon : Weapon - { - [JsonInclude] - public string __ShootSound; - - [JsonInclude] - public string __BeginReloadSound; - - [JsonInclude] - public string __ReloadSound; - - [JsonInclude] - public string __ReloadFinishSound; - - [JsonInclude] - public string __BeLoadedSound; - - [JsonInclude] - public Dictionary __OtherSoundMap; - - [JsonInclude] - public string __AiUseAttribute; - - [JsonInclude] - public string __AiAttackAttr; - - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_WeaponBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_WeaponBase.cs new file mode 100644 index 0000000..8a535fd --- /dev/null +++ b/DungeonShooting_Godot/src/config/ExcelConfig_WeaponBase.cs @@ -0,0 +1,483 @@ +using System.Text.Json.Serialization; +using System.Collections.Generic; + +namespace Config; + +public static partial class ExcelConfig +{ + public class WeaponBase + { + /// + /// 武器属性id + /// + [JsonInclude] + public string Id; + + /// + /// 属性绑定武器的Id,这个id时ActivityBase表Id,如果是Ai使用的数据, 则填空字符串串 + /// + public ActivityBase Activity; + + /// + /// 备注 + /// + [JsonInclude] + public string Remark; + + /// + /// 重量 + /// + [JsonInclude] + public float Weight; + + /// + /// 武器类型:
+ /// 1.副武器
+ /// 2.主武器
+ /// 3.重型武器 + ///
+ [JsonInclude] + public byte WeightType; + + /// + /// 标记是否是近战武器 + /// + [JsonInclude] + public bool IsMelee; + + /// + /// 是否连续发射, 如果为false, 则每次发射都需要扣动扳机 + /// + [JsonInclude] + public bool ContinuousShoot; + + /// + /// 弹夹容量 + /// + [JsonInclude] + public int AmmoCapacity; + + /// + /// 弹药容量上限 + /// + [JsonInclude] + public int MaxAmmoCapacity; + + /// + /// 默认起始备用弹药数量 + /// + [JsonInclude] + public int StandbyAmmoCapacity; + + /// + /// 装弹时间 (单位: 秒) + /// + [JsonInclude] + public float ReloadTime; + + /// + /// 每粒子弹是否是单独装填, 如果是, 那么每上一发子弹的时间就是 ReloadTime, 可以做霰弹枪装填效果 + /// + [JsonInclude] + public bool AloneReload; + + /// + /// 单独装填时每次装填子弹数量, 必须要将 'AloneReload' 属性设置为 true + /// + [JsonInclude] + public int AloneReloadCount; + + /// + /// 单独装弹模式下,从触发装弹到开始装第一发子弹中间的间隔时间, 必须要将 'AloneReload' 属性设置为 true + /// + [JsonInclude] + public float AloneReloadBeginIntervalTime; + + /// + /// 单独装弹模式下,从装完最后一发子弹到可以射击中间的间隔时间, 必须要将 'AloneReload' 属性设置为 true + /// + [JsonInclude] + public float AloneReloadFinishIntervalTime; + + /// + /// 单独装填的子弹时可以立即射击, 必须要将 'AloneReload' 属性设置为 true + /// + [JsonInclude] + public bool AloneReloadCanShoot; + + /// + /// 是否为松发开火, 也就是松开扳机才开火, 若要启用该属性, 必须将 'ContinuousShoot' 设置为 false + /// + [JsonInclude] + public bool LooseShoot; + + /// + /// 最少需要蓄力多久才能开火, 必须将 'LooseShoot' 设置为 true + /// + [JsonInclude] + public float MinChargeTime; + + /// + /// 单次射击后是否需要手动上膛动作, 必须将 'ContinuousShoot' 设置为 false + /// + [JsonInclude] + public bool ManualBeLoaded; + + /// + /// 手动上膛模式下, 单次射击后是否自动执行上膛操作, 必须将 'ManualBeLoaded' 设置为 true + /// + [JsonInclude] + public bool AutoManualBeLoaded; + + /// + /// 上膛时间, 如果时间为0, 则不会播放上膛动画和音效, 可以视为没有上膛动作, 必须将 'ManualBeLoaded' 设置为 true + /// + [JsonInclude] + public float BeLoadedTime; + + /// + /// 连续发射次数区间, 仅当 'ContinuousShoot' 为 false 时生效
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public int[] ContinuousCountRange; + + /// + /// 按下一次扳机后需要多长时间才能再次感应按下 + /// + [JsonInclude] + public float TriggerInterval; + + /// + /// 初始射速, 初始每分钟能开火次数 + /// + [JsonInclude] + public float StartFiringSpeed; + + /// + /// 最终射速, 最终每分钟能开火次数, 仅当 'ContinuousShoot' 为 true 时生效 + /// + [JsonInclude] + public float FinalFiringSpeed; + + /// + /// 按下扳机并开火后射速每秒增加量 + /// + [JsonInclude] + public float FiringSpeedAddSpeed; + + /// + /// 松开扳机后射速消散速率 + /// + [JsonInclude] + public float FiringSpeedBackSpeed; + + /// + /// 单次开火发射子弹数量区间
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public int[] FireBulletCountRange; + + /// + /// 从按下扳机到发射第一发子弹的延时时, 如果中途松开扳机, 那么延时时间会重新计算, 必须将 'LooseShoot' 设置为 false + /// + [JsonInclude] + public float DelayedTime; + + /// + /// 初始散射半径 + /// + [JsonInclude] + public float StartScatteringRange; + + /// + /// 最终散射半径 + /// + [JsonInclude] + public float FinalScatteringRange; + + /// + /// 每次发射后散射增加值 + /// + [JsonInclude] + public float ScatteringRangeAddValue; + + /// + /// 散射值销退速率 + /// + [JsonInclude] + public float ScatteringRangeBackSpeed; + + /// + /// 开始销退散射值的延时时间 + /// + [JsonInclude] + public float ScatteringRangeBackDelayTime; + + /// + /// 开火后相机抖动强度,只有玩家拾起武器开火才会抖动相机 + /// + [JsonInclude] + public float CameraShake; + + /// + /// 后坐力区间 (仅用于开火后武器身抖动)
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] BacklashRange; + + /// + /// 后坐力偏移回归回归速度 + /// + [JsonInclude] + public float BacklashRegressionSpeed; + + /// + /// 开火后武器口上抬角度 + /// + [JsonInclude] + public float UpliftAngle; + + /// + /// 武器默认上抬角度 + /// + [JsonInclude] + public float DefaultAngle; + + /// + /// 开火后武器口角度恢复速度倍数 + /// + [JsonInclude] + public float UpliftAngleRestore; + + /// + /// 开火特效 + /// + [JsonInclude] + public string FireEffect; + + /// + /// 默认射出的子弹 + /// + public BulletBase Bullet; + + /// + /// 默认抛出的弹壳 + /// + public ActivityBase Shell; + + /// + /// 是否在换弹时才抛弹壳 + /// + [JsonInclude] + public bool ReloadThrowShell; + + /// + /// 投抛弹壳的延时时间 + /// + [JsonInclude] + public float ThrowShellDelayTime; + + /// + /// 投抛状态下物体碰撞器大小 + /// + [JsonInclude] + public SerializeVector2 ThrowCollisionSize; + + /// + /// 是否可以触发近战攻击 + /// + [JsonInclude] + public bool CanMeleeAttack; + + /// + /// 近战攻击伤害区间
+ /// 格式为格式为[value]或者[min,max] + ///
+ [JsonInclude] + public int[] MeleeAttackHarmRange; + + /// + /// 近战攻击造成伤害后击退值区间
+ /// 格式为[value]或者[min,max] + ///
+ [JsonInclude] + public float[] MeleeAttackRepelRange; + + /// + /// 射击音效 + /// + public Sound ShootSound; + + /// + /// 开始换弹音效 + /// + public Sound BeginReloadSound; + + /// + /// 开始换弹音效延时时间 + /// + [JsonInclude] + public float BeginReloadSoundDelayTime; + + /// + /// 换弹音效,单独装弹时也会出发 + /// + public Sound ReloadSound; + + /// + /// 换弹音效延时时间 + /// + [JsonInclude] + public float ReloadSoundDelayTime; + + /// + /// 换弹结束音效 + /// + public Sound ReloadFinishSound; + + /// + /// 换弹结束音效在换弹结束前多久开始
+ /// 注意: 如果'AloneReload'为true, 那么当前属性的值应该小于'AloneReloadFinishIntervalTime' + ///
+ [JsonInclude] + public float ReloadFinishSoundAdvanceTime; + + /// + /// 上膛音效 + /// + public Sound BeLoadedSound; + + /// + /// 上膛音效延时时间, 这个时间应该小于'BeLoadedTime' + /// + [JsonInclude] + public float BeLoadedSoundDelayTime; + + /// + /// 其他音效 + /// + public Dictionary OtherSoundMap; + + /// + /// Ai属性
+ /// Ai 使用该武器时的武器数据, 设置该字段, 可让同一把武器在敌人和玩家手上有不同属性
+ /// 如果不填则Ai和玩家使用同一种属性 + ///
+ public WeaponBase AiUseAttribute; + + /// + /// Ai使用该武器开火时的一些额外配置属性
+ /// 玩家使用的武器不需要填写该字段 + ///
+ public AiAttackAttr AiAttackAttr; + + /// + /// 返回浅拷贝出的新对象 + /// + public WeaponBase Clone() + { + var inst = new WeaponBase(); + inst.Id = Id; + inst.Activity = Activity; + inst.Remark = Remark; + inst.Weight = Weight; + inst.WeightType = WeightType; + inst.IsMelee = IsMelee; + inst.ContinuousShoot = ContinuousShoot; + inst.AmmoCapacity = AmmoCapacity; + inst.MaxAmmoCapacity = MaxAmmoCapacity; + inst.StandbyAmmoCapacity = StandbyAmmoCapacity; + inst.ReloadTime = ReloadTime; + inst.AloneReload = AloneReload; + inst.AloneReloadCount = AloneReloadCount; + inst.AloneReloadBeginIntervalTime = AloneReloadBeginIntervalTime; + inst.AloneReloadFinishIntervalTime = AloneReloadFinishIntervalTime; + inst.AloneReloadCanShoot = AloneReloadCanShoot; + inst.LooseShoot = LooseShoot; + inst.MinChargeTime = MinChargeTime; + inst.ManualBeLoaded = ManualBeLoaded; + inst.AutoManualBeLoaded = AutoManualBeLoaded; + inst.BeLoadedTime = BeLoadedTime; + inst.ContinuousCountRange = ContinuousCountRange; + inst.TriggerInterval = TriggerInterval; + inst.StartFiringSpeed = StartFiringSpeed; + inst.FinalFiringSpeed = FinalFiringSpeed; + inst.FiringSpeedAddSpeed = FiringSpeedAddSpeed; + inst.FiringSpeedBackSpeed = FiringSpeedBackSpeed; + inst.FireBulletCountRange = FireBulletCountRange; + inst.DelayedTime = DelayedTime; + inst.StartScatteringRange = StartScatteringRange; + inst.FinalScatteringRange = FinalScatteringRange; + inst.ScatteringRangeAddValue = ScatteringRangeAddValue; + inst.ScatteringRangeBackSpeed = ScatteringRangeBackSpeed; + inst.ScatteringRangeBackDelayTime = ScatteringRangeBackDelayTime; + inst.CameraShake = CameraShake; + inst.BacklashRange = BacklashRange; + inst.BacklashRegressionSpeed = BacklashRegressionSpeed; + inst.UpliftAngle = UpliftAngle; + inst.DefaultAngle = DefaultAngle; + inst.UpliftAngleRestore = UpliftAngleRestore; + inst.FireEffect = FireEffect; + inst.Bullet = Bullet; + inst.Shell = Shell; + inst.ReloadThrowShell = ReloadThrowShell; + inst.ThrowShellDelayTime = ThrowShellDelayTime; + inst.ThrowCollisionSize = ThrowCollisionSize; + inst.CanMeleeAttack = CanMeleeAttack; + inst.MeleeAttackHarmRange = MeleeAttackHarmRange; + inst.MeleeAttackRepelRange = MeleeAttackRepelRange; + inst.ShootSound = ShootSound; + inst.BeginReloadSound = BeginReloadSound; + inst.BeginReloadSoundDelayTime = BeginReloadSoundDelayTime; + inst.ReloadSound = ReloadSound; + inst.ReloadSoundDelayTime = ReloadSoundDelayTime; + inst.ReloadFinishSound = ReloadFinishSound; + inst.ReloadFinishSoundAdvanceTime = ReloadFinishSoundAdvanceTime; + inst.BeLoadedSound = BeLoadedSound; + inst.BeLoadedSoundDelayTime = BeLoadedSoundDelayTime; + inst.OtherSoundMap = OtherSoundMap; + inst.AiUseAttribute = AiUseAttribute; + inst.AiAttackAttr = AiAttackAttr; + return inst; + } + } + private class Ref_WeaponBase : WeaponBase + { + [JsonInclude] + public string __Activity; + + [JsonInclude] + public string __Bullet; + + [JsonInclude] + public string __Shell; + + [JsonInclude] + public string __ShootSound; + + [JsonInclude] + public string __BeginReloadSound; + + [JsonInclude] + public string __ReloadSound; + + [JsonInclude] + public string __ReloadFinishSound; + + [JsonInclude] + public string __BeLoadedSound; + + [JsonInclude] + public Dictionary __OtherSoundMap; + + [JsonInclude] + public string __AiUseAttribute; + + [JsonInclude] + public string __AiAttackAttr; + + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityMaterial.cs b/DungeonShooting_Godot/src/framework/activity/ActivityMaterial.cs deleted file mode 100644 index 2d561fc..0000000 --- a/DungeonShooting_Godot/src/framework/activity/ActivityMaterial.cs +++ /dev/null @@ -1,8 +0,0 @@ - -/// -/// 物体材质 -/// -public class ActivityMaterial -{ - -} \ 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 03cead3..44ba25a 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs @@ -20,13 +20,22 @@ /// /// 当前物体对应的配置数据, 如果不是通过 ActivityObject.Create() 函数创建出来的对象那么 ItemConfig 为 null /// - public ExcelConfig.ActivityObject ItemConfig { get; private set; } + public ExcelConfig.ActivityBase ItemConfig { get; private set; } /// /// 是否是静态物体, 如果为true, 则会禁用移动处理 /// - [Export] - public bool IsStatic { get; set; } + public bool IsStatic + { + get => MoveController != null ? !MoveController.Enable : true; + set + { + if (MoveController != null) + { + MoveController.Enable = !value; + } + } + } /// /// 是否显示阴影 @@ -145,26 +154,6 @@ private float _verticalSpeed; /// - /// 落地之后是否回弹 - /// - public bool Bounce { get; set; } = true; - - /// - /// 物体下坠回弹的强度 - /// - public float BounceStrength { get; set; } = 0.5f; - - /// - /// 物体下坠回弹后的运动速度衰减量 - /// - public float BounceSpeed { get; set; } = 0.75f; - - /// - /// 物体下坠回弹后的旋转速度衰减量 - /// - public float BounceRotationSpeed { get; set; } = 0.5f; - - /// /// 投抛状态下物体碰撞器大小, 如果 (x, y) 都小于 0, 则默认使用 AnimatedSprite 的默认动画第一帧的大小 /// [Export] @@ -176,6 +165,11 @@ public bool EnableVerticalMotion { get; set; } = true; /// + /// 撞到墙壁反弹时是否锁定旋转角度, 如果为 false, 则反弹后将直接修改旋转角度 + /// + public bool BounceLockRotation { get; set; } = true; + + /// /// 是否启用物体更新行为, 默认 true, 如果禁用, 则会停止当前物体的 Process(), PhysicsProcess() 调用, 并且禁用 Collision 节点, 禁用后所有组件也同样被禁用行为 /// public bool EnableBehavior @@ -209,7 +203,7 @@ /// /// 物体材质数据 /// - public ActivityMaterial ActivityMaterial { get; private set; } + public ExcelConfig.ActivityMaterial ActivityMaterial { get; private set; } /// /// 所在的 World 对象 @@ -271,8 +265,12 @@ // -------------------------------------------------------------------------------- + //是否正在调用组件 Update 函数 + private bool _updatingComp = false; //组件集合 - private List> _components = new List>(); + private readonly List> _components = new List>(); + //修改的组件集合, value 为 true 表示添加组件, false 表示移除组件 + private readonly List> _changeComponents = new List>(); //上一帧动画名称 private string _prevAnimation; //上一帧动画 @@ -287,7 +285,7 @@ private ShaderMaterial _shadowBlendShaderMaterial; //存储投抛该物体时所产生的数据 - private ActivityFallData _fallData = new ActivityFallData(); + private readonly ActivityFallData _fallData = new ActivityFallData(); //所在层级 private RoomLayerEnum _currLayer; @@ -334,9 +332,12 @@ //描边颜色 private bool _initOutlineColor = false; private Color _outlineColor = new Color(0, 0, 0, 1); + + //冻结显示的Sprite + private FreezeSprite _freezeSprite; //初始化节点 - private void _InitNode(RegisterActivityData activityData, World world) + private void _InitNode(ExcelConfig.ActivityBase config, World world) { #if TOOLS if (!Engine.IsEditorHint()) @@ -347,8 +348,17 @@ } } #endif + if (config.Material == null) + { + ActivityMaterial = ExcelConfig.ActivityMaterial_List[0]; + } + else + { + ActivityMaterial = config.Material; + } + World = world; - ItemConfig = activityData.Config; + ItemConfig = config; Name = GetType().Name + (_instanceIndex++); _blendShaderMaterial = AnimatedSprite.Material as ShaderMaterial; _shadowBlendShaderMaterial = ShadowSprite.Material as ShaderMaterial; @@ -365,7 +375,7 @@ ShadowSprite.Visible = false; MotionMode = MotionModeEnum.Floating; MoveController = AddComponent(); - MoveController.Enable = !IsStatic; + IsStatic = config.IsStatic; OnInit(); } @@ -376,7 +386,7 @@ { } - + /// /// 子类需要重写 _EnterTree() 函数, 请重写 EnterTree() /// @@ -490,13 +500,12 @@ public virtual void OnInit() { } - + /// /// 进入场景树时调用 /// public virtual void EnterTree() { - } /// @@ -504,7 +513,6 @@ /// public virtual void ExitTree() { - } /// @@ -574,13 +582,6 @@ } /// - /// 每帧调用一次, ProcessOver() 会在组件的 Process() 之后调用 - /// - protected virtual void ProcessOver(float delta) - { - } - - /// /// 每物理帧调用一次, 物体的 PhysicsProcess() 会在组件的 PhysicsProcess() 之前调用 /// protected virtual void PhysicsProcess(float delta) @@ -588,13 +589,6 @@ } /// - /// 每物理帧调用一次, PhysicsProcessOver() 会在组件的 PhysicsProcess() 之后调用 - /// - protected virtual void PhysicsProcessOver(float delta) - { - } - - /// /// 如果开启 debug, 则每帧调用该函数, 可用于绘制文字线段等 /// protected virtual void DebugDraw() @@ -610,6 +604,20 @@ } /// + /// 移动并碰撞到物体时调用该函数, 参数为碰撞数据, 该函数由 MoveController 调用 + /// + public virtual void OnMoveCollision(KinematicCollision2D collision) + { + } + + /// + /// 撞到墙壁反弹时调用该函数, 参数为反弹的角度, 弧度制, 该函数由 MoveController 调用 + /// + public virtual void OnBounce(float rotation) + { + } + + /// /// 返回当物体 CollisionLayer 是否能与 mask 层碰撞 /// public bool CollisionWithMask(uint mask) @@ -648,10 +656,12 @@ { if (parent != null) { - parent.RemoveChild(this); + Reparent(root); } - - this.AddToActivityRoot(layer); + else + { + root.AddChild(this); + } } if (showShadow) @@ -752,7 +762,15 @@ public T AddComponent() where T : Component, new() { var component = new T(); - _components.Add(new KeyValuePair(typeof(T), component)); + if (_updatingComp) + { + _changeComponents.Add(new KeyValuePair(component, true)); + } + else + { + _components.Add(new KeyValuePair(typeof(T), component)); + } + component.Master = this; component.Ready(); component.OnEnable(); @@ -765,7 +783,15 @@ public Component AddComponent(Type type) { var component = (Component)Activator.CreateInstance(type); - _components.Add(new KeyValuePair(type, component)); + if (_updatingComp) + { + _changeComponents.Add(new KeyValuePair(component, true)); + } + else + { + _components.Add(new KeyValuePair(type, component)); + } + component.Master = this; component.Ready(); component.OnEnable(); @@ -778,13 +804,26 @@ /// 组件对象 public void RemoveComponent(Component component) { - for (int i = 0; i < _components.Count; i++) + if (component.IsDestroyed) { - if (_components[i].Value == component) + return; + } + + if (_updatingComp) + { + _changeComponents.Add(new KeyValuePair(component, false)); + component.Destroy(); + } + else + { + for (var i = 0; i < _components.Count; i++) { - _components.RemoveAt(i); - component.Destroy(); - return; + if (_components[i].Value == component) + { + _components.RemoveAt(i); + component.Destroy(); + return; + } } } } @@ -797,12 +836,24 @@ for (int i = 0; i < _components.Count; i++) { var temp = _components[i]; - if (temp.Key == type) + if (temp.Key.IsAssignableTo(type)) { return temp.Value; } } + if (_updatingComp) + { + for (var i = 0; i < _changeComponents.Count; i++) + { + var temp = _components[i]; + if (temp.Value.GetType().IsAssignableTo(type)) + { + return temp.Value; + } + } + } + return null; } @@ -811,12 +862,91 @@ /// public T GetComponent() where T : Component { - var component = GetComponent(typeof(T)); - if (component == null) return null; - return (T)component; + for (int i = 0; i < _components.Count; i++) + { + var temp = _components[i]; + if (temp.Value is T component) + { + return component; + } + } + + if (_updatingComp) + { + for (var i = 0; i < _changeComponents.Count; i++) + { + var temp = _components[i]; + if (temp.Value is T component) + { + return component; + } + } + } + + return null; } /// + /// 根据类型获取所有相同类型的组件 + /// + public Component[] GetComponents(Type type) + { + var list = new List(); + for (int i = 0; i < _components.Count; i++) + { + var temp = _components[i]; + if (temp.Key.IsAssignableTo(type)) + { + list.Add(temp.Value); + } + } + + if (_updatingComp) + { + for (var i = 0; i < _changeComponents.Count; i++) + { + var temp = _components[i]; + if (temp.Value.GetType().IsAssignableTo(type)) + { + list.Add(temp.Value); + } + } + } + + return list.ToArray(); + } + + /// + /// 根据类型获取所有相同类型的组件 + /// + public T[] GetComponents() where T : Component + { + var list = new List(); + for (int i = 0; i < _components.Count; i++) + { + var temp = _components[i]; + if (temp.Value is T component) + { + list.Add(component); + } + } + + if (_updatingComp) + { + for (var i = 0; i < _changeComponents.Count; i++) + { + var temp = _components[i]; + if (temp.Value is T component) + { + list.Add(component); + } + } + } + + return list.ToArray(); + } + + /// /// 设置混色材质的颜色 /// public void SetBlendColor(Color color) @@ -885,14 +1015,14 @@ //更新组件 if (_components.Count > 0) { + _updatingComp = true; if (EnableCustomBehavior) //启用所有组件 { - var arr = _components.ToArray(); - for (int i = 0; i < arr.Length; i++) + for (int i = 0; i < _components.Count; i++) { if (IsDestroyed) return; - var temp = arr[i].Value; - if (temp != null && temp.Master == this && temp.Enable) + var temp = _components[i].Value; + if (temp != null && temp.Enable) { temp.Process(newDelta); } @@ -905,8 +1035,58 @@ MoveController.Process(newDelta); } } + _updatingComp = false; + + if (_changeComponents.Count > 0) + { + RefreshComponent(); + } } + // 更新下坠处理逻辑 + UpdateFall(newDelta); + + //阴影 + UpdateShadowSprite(newDelta); + + // Hit 动画 + if (_playHit) + { + if (_playHitSchedule < 0.05f) + { + _blendShaderMaterial.SetShaderParameter("schedule", 1); + } + else if (_playHitSchedule < 0.15f) + { + _blendShaderMaterial.SetShaderParameter("schedule", Mathf.Lerp(1, 0, (_playHitSchedule - 0.05f) / 0.1f)); + } + if (_playHitSchedule >= 0.15f) + { + _blendShaderMaterial.SetShaderParameter("schedule", 0); + _playHitSchedule = 0; + _playHit = false; + } + else + { + _playHitSchedule += newDelta; + } + } + + //协程更新 + ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, newDelta); + + //调试绘制 + if (IsDebug) + { + QueueRedraw(); + } + } + + /// + /// 更新下坠处理逻辑 + /// + public void UpdateFall(float delta) + { // 下坠判定 if (Altitude > 0 || VerticalSpeed != 0) { @@ -922,8 +1102,8 @@ var ysp = VerticalSpeed; - _altitude += VerticalSpeed * newDelta; - _verticalSpeed -= GameConfig.G * newDelta; + _altitude += VerticalSpeed * delta; + _verticalSpeed -= GameConfig.G * delta; //当高度大于16时, 显示在所有物体上 if (Altitude >= 16) @@ -957,28 +1137,28 @@ { //缩放移动速度 //MoveController.ScaleAllForce(BounceSpeed); - _throwForce.Velocity *= BounceSpeed; + _throwForce.Velocity *= ActivityMaterial.FallBounceSpeed; //缩放旋转速度 //MoveController.ScaleAllRotationSpeed(BounceStrength); - _throwForce.RotationSpeed *= BounceRotationSpeed; + _throwForce.RotationSpeed *= ActivityMaterial.FallBounceRotation; } //如果落地高度不够低, 再抛一次 - if (Bounce && (!_hasResilienceVerticalSpeed || _resilienceVerticalSpeed > 5)) + if (ActivityMaterial.Bounce && (!_hasResilienceVerticalSpeed || _resilienceVerticalSpeed > 5)) { if (!_hasResilienceVerticalSpeed) { _hasResilienceVerticalSpeed = true; - _resilienceVerticalSpeed = -VerticalSpeed * BounceStrength; + _resilienceVerticalSpeed = -VerticalSpeed * ActivityMaterial.FallBounceStrength; } else { if (_resilienceVerticalSpeed < 25) { - _resilienceVerticalSpeed = _resilienceVerticalSpeed * BounceStrength * 0.4f; + _resilienceVerticalSpeed = _resilienceVerticalSpeed * ActivityMaterial.FallBounceStrength * 0.4f; } else { - _resilienceVerticalSpeed = _resilienceVerticalSpeed * BounceStrength; + _resilienceVerticalSpeed = _resilienceVerticalSpeed * ActivityMaterial.FallBounceStrength; } } _verticalSpeed = _resilienceVerticalSpeed; @@ -1008,7 +1188,14 @@ } } - //阴影 + } + + /// + /// 更新阴影逻辑 + /// + public void UpdateShadowSprite(float delta) + { + // 阴影 if (ShadowSprite.Visible) { //更新阴影贴图, 使其和动画一致 @@ -1023,48 +1210,15 @@ _prevAnimation = anim; _prevAnimationFrame = frame; - //计算阴影 - CalcShadowTransform(); + if (_freezeSprite == null || !_freezeSprite.IsFrozen) + { + //计算阴影 + CalcShadowTransform(); + } } - // Hit 动画 - if (_playHit) - { - if (_playHitSchedule < 0.05f) - { - _blendShaderMaterial.SetShaderParameter("schedule", 1); - } - else if (_playHitSchedule < 0.15f) - { - _blendShaderMaterial.SetShaderParameter("schedule", Mathf.Lerp(1, 0, (_playHitSchedule - 0.05f) / 0.1f)); - } - if (_playHitSchedule >= 0.15f) - { - _blendShaderMaterial.SetShaderParameter("schedule", 0); - _playHitSchedule = 0; - _playHit = false; - } - else - { - _playHitSchedule += newDelta; - } - } - - //协程更新 - if (_coroutineList != null) - { - ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, newDelta); - } - - ProcessOver(newDelta); - - //调试绘制 - if (IsDebug) - { - QueueRedraw(); - } } - + /// /// 每物理帧调用一次, 为了防止子类覆盖 _PhysicsProcess(), 给 _PhysicsProcess() 加上了 sealed, 子类需要帧循环函数请重写 PhysicsProcess() 函数 /// @@ -1085,14 +1239,14 @@ //更新组件 if (_components.Count > 0) { + _updatingComp = true; if (EnableCustomBehavior) //启用所有组件 { - var arr = _components.ToArray(); - for (int i = 0; i < arr.Length; i++) + for (int i = 0; i < _components.Count; i++) { if (IsDestroyed) return; - var temp = arr[i].Value; - if (temp != null && temp.Master == this && temp.Enable) + var temp = _components[i].Value; + if (temp != null && temp.Enable) { temp.PhysicsProcess(newDelta); } @@ -1105,9 +1259,37 @@ MoveController.PhysicsProcess(newDelta); } } - } + _updatingComp = false; - PhysicsProcessOver(newDelta); + if (_changeComponents.Count > 0) + { + RefreshComponent(); + } + } + } + + //更新新增/移除的组件 + private void RefreshComponent() + { + for (var i = 0; i < _changeComponents.Count; i++) + { + var item = _changeComponents[i]; + if (item.Value) //添加组件 + { + _components.Add(new KeyValuePair(item.Key.GetType(), item.Key)); + } + else //移除组件 + { + for (var j = 0; j < _components.Count; j++) + { + if (_components[i].Value == item.Key) + { + _components.RemoveAt(i); + break; + } + } + } + } } /// @@ -1188,11 +1370,18 @@ QueueFree(); OnDestroy(); + if (_freezeSprite != null) + { + _freezeSprite.Destroy(); + } + var arr = _components.ToArray(); for (var i = 0; i < arr.Length; i++) { arr[i].Value?.Destroy(); } + + _components.Clear(); } /// @@ -1275,7 +1464,7 @@ Collision.Rotation = 0; Collision.Scale = Vector2.One; CollisionMask = 1; - CollisionLayer = PhysicsLayer.Throwing; + CollisionLayer = _fallData.OriginCollisionLayer | PhysicsLayer.Throwing; _fallData.UseOrigin = false; } } @@ -1417,6 +1606,22 @@ _playHit = true; _playHitSchedule = 0; } + + /// + /// 获取当前摩擦力 + /// + public float GetCurrentFriction() + { + return ActivityMaterial.Friction; + } + + /// + /// 获取当前旋转摩擦力 + /// + public float GetCurrentRotationFriction() + { + return ActivityMaterial.RotationFriction; + } public long StartCoroutine(IEnumerator able) { @@ -1437,6 +1642,19 @@ { ProxyCoroutineHandler.ProxyStopAllCoroutine(ref _coroutineList); } + + /// + /// 播放 AnimatedSprite 上的动画, 如果没有这个动画, 则什么也不会发生 + /// + /// 动画名称 + public void PlaySpriteAnimation(string name) + { + var spriteFrames = AnimatedSprite.SpriteFrames; + if (spriteFrames != null && spriteFrames.HasAnimation(name)) + { + AnimatedSprite.Play(name); + } + } /// /// 将当前 ActivityObject 变成静态图像绘制到地面上, 用于优化渲染大量物体
@@ -1458,9 +1676,9 @@ _processingBecomesStaticImage = true; EnableBehavior = false; - var staticImageCanvas = AffiliationArea.RoomInfo.StaticImageCanvas; - var position = staticImageCanvas.ToImageCanvasPosition(GlobalPosition); - staticImageCanvas.CanvasSprite.DrawActivityObjectInCanvas(this, position.X, position.Y, () => + var roomInfo = AffiliationArea.RoomInfo; + var position = roomInfo.ToImageCanvasPosition(GlobalPosition); + roomInfo.StaticImageCanvas.DrawActivityObjectInCanvas(this, position.X, position.Y, () => { Destroy(); }); @@ -1473,4 +1691,28 @@ { return _processingBecomesStaticImage; } + + /// + /// 冻结物体,多余的节点就会被移出场景树,逻辑也会被暂停,用于优化性能 + /// + public void Freeze() + { + if (_freezeSprite == null) + { + _freezeSprite = new FreezeSprite(this); + } + _freezeSprite.Freeze(); + } + + /// + /// 解冻物体, 恢复正常逻辑 + /// + public void Unfreeze() + { + if (_freezeSprite == null) + { + return; + } + _freezeSprite.Unfreeze(); + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Create.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Create.cs new file mode 100644 index 0000000..ebc901a --- /dev/null +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Create.cs @@ -0,0 +1,55 @@ + +using System; +using Config; + +public partial class ActivityObject +{ + /// + /// 通过 ActivityBase 实例化 ActivityObject 对象 + /// + public static ActivityObject Create(ExcelConfig.ActivityBase config) + { + var world = GameApplication.Instance.World; + if (world == null) + { + throw new Exception("实例化 ActivityObject 前请先调用 'GameApplication.Instance.CreateNewWorld()' 初始化 World 对象"); + } + var instance = ResourceManager.LoadAndInstantiate(config.Prefab); + instance._InitNode(config, world); + return instance; + } + + /// + /// 通过 ActivityBase 实例化 ActivityObject 对象 + /// + public static T Create(ExcelConfig.ActivityBase config) where T : ActivityObject + { + return (T)Create(config); + } + + /// + /// 通过 ItemId 实例化 ActivityObject 对象 + /// + public static ActivityObject Create(string itemId) + { + if (ExcelConfig.ActivityBase_Map.TryGetValue(itemId, out var config)) + { + return Create(config); + } + Debug.LogError("创建实例失败, 未找到id为'" + itemId + "'的物体!"); + return null; + } + + /// + /// 通过 ItemId 实例化 ActivityObject 对象 + /// + public static T Create(string itemId) where T : ActivityObject + { + var instance = Create(itemId); + if (instance != null) + { + return (T)instance; + } + return null; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs index 3ff5957..a6c0b2a 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -19,6 +19,11 @@ ///
public const string Id_enemy0001 = "enemy0001"; /// + /// 名称: 敌人2
+ /// 简介: 敌人2 + ///
+ public const string Id_enemy0002 = "enemy0002"; + /// /// 名称: 步枪
/// 简介: ///
@@ -54,6 +59,16 @@ ///
public const string Id_weapon0007 = "weapon0007"; /// + /// 名称: 激光手枪
+ /// 简介: + ///
+ public const string Id_weapon0008 = "weapon0008"; + /// + /// 名称: 榴弹发射器
+ /// 简介: + ///
+ public const string Id_weapon0009 = "weapon0009"; + /// /// 名称:
/// 简介: ///
@@ -69,6 +84,11 @@ ///
public const string Id_bullet0003 = "bullet0003"; /// + /// 名称: 榴弹炮
+ /// 简介: + ///
+ public const string Id_bullet0004 = "bullet0004"; + /// /// 名称:
/// 简介: ///
@@ -85,6 +105,11 @@ public const string Id_shell0003 = "shell0003"; /// /// 名称:
+ /// 简介: + ///
+ public const string Id_shell0004 = "shell0004"; + /// + /// 名称:
/// 简介: 敌人死亡碎片 ///
public const string Id_effect0001 = "effect0001"; @@ -135,10 +160,30 @@ public const string Id_prop0009 = "prop0009"; /// /// 名称: 分裂子弹
- /// 简介: 子弹数量翻倍, 但是精准度和伤害降低 + /// 简介: 子弹数量翻倍, 但是精准度, 击退和伤害降低 ///
public const string Id_prop0010 = "prop0010"; /// + /// 名称: 弹射子弹
+ /// 简介: 子弹反弹次数+2 + ///
+ public const string Id_prop0011 = "prop0011"; + /// + /// 名称: 穿透子弹
+ /// 简介: 子弹穿透+1 + ///
+ public const string Id_prop0012 = "prop0012"; + /// + /// 名称: 武器背包
+ /// 简介: 武器容量+1 + ///
+ public const string Id_prop0013 = "prop0013"; + /// + /// 名称: 道具背包
+ /// 简介: 道具容量+1 + ///
+ public const string Id_prop0014 = "prop0014"; + /// /// 名称: 医药箱
/// 简介: 使用后回复一颗红心 ///
@@ -169,39 +214,4 @@ ///
public const string Id_other_door_n = "other_door_n"; } - private static void _InitRegister() - { - _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("weapon0007", new RegisterActivityData("res://prefab/weapon/Weapon0007.tscn", ExcelConfig.ActivityObject_Map["weapon0007"])); - _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("bullet0003", new RegisterActivityData("res://prefab/bullet/Bullet0003.tscn", ExcelConfig.ActivityObject_Map["bullet0003"])); - _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/enemy/Effect0001.tscn", ExcelConfig.ActivityObject_Map["effect0001"])); - _activityRegisterMap.Add("prop0001", new RegisterActivityData("res://prefab/effect/enemy/Effect0001.tscn", ExcelConfig.ActivityObject_Map["prop0001"])); - _activityRegisterMap.Add("prop0002", new RegisterActivityData("res://prefab/prop/buff/BuffProp0002.tscn", ExcelConfig.ActivityObject_Map["prop0002"])); - _activityRegisterMap.Add("prop0003", new RegisterActivityData("res://prefab/prop/buff/BuffProp0003.tscn", ExcelConfig.ActivityObject_Map["prop0003"])); - _activityRegisterMap.Add("prop0004", new RegisterActivityData("res://prefab/prop/buff/BuffProp0004.tscn", ExcelConfig.ActivityObject_Map["prop0004"])); - _activityRegisterMap.Add("prop0005", new RegisterActivityData("res://prefab/prop/buff/BuffProp0005.tscn", ExcelConfig.ActivityObject_Map["prop0005"])); - _activityRegisterMap.Add("prop0006", new RegisterActivityData("res://prefab/prop/buff/BuffProp0006.tscn", ExcelConfig.ActivityObject_Map["prop0006"])); - _activityRegisterMap.Add("prop0007", new RegisterActivityData("res://prefab/prop/buff/BuffProp0007.tscn", ExcelConfig.ActivityObject_Map["prop0007"])); - _activityRegisterMap.Add("prop0008", new RegisterActivityData("res://prefab/prop/buff/BuffProp0008.tscn", ExcelConfig.ActivityObject_Map["prop0008"])); - _activityRegisterMap.Add("prop0009", new RegisterActivityData("res://prefab/prop/buff/BuffProp0009.tscn", ExcelConfig.ActivityObject_Map["prop0009"])); - _activityRegisterMap.Add("prop0010", new RegisterActivityData("res://prefab/prop/buff/BuffProp0010.tscn", ExcelConfig.ActivityObject_Map["prop0010"])); - _activityRegisterMap.Add("prop5000", new RegisterActivityData("res://prefab/prop/active/ActiveProp5000.tscn", ExcelConfig.ActivityObject_Map["prop5000"])); - _activityRegisterMap.Add("prop5001", new RegisterActivityData("res://prefab/prop/active/ActiveProp5001.tscn", ExcelConfig.ActivityObject_Map["prop5001"])); - _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 deleted file mode 100644 index 28a5d5a..0000000 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs +++ /dev/null @@ -1,72 +0,0 @@ - -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 bool _initState = false; - - /// - /// 初始化调用, 开始扫描当前程序集, 并自动注册 ActivityObject 物体 - /// - public static void InitActivity() - { - if (_initState) - { - return; - } - - _initState = true; - _InitRegister(); - } - - /// - /// 通过 ItemId 实例化 ActivityObject 对象 - /// - public static ActivityObject Create(string itemId) - { - var world = GameApplication.Instance.World; - if (world == null) - { - throw new Exception("实例化 ActivityObject 前请先调用 'GameApplication.Instance.CreateNewWorld()' 初始化 World 对象"); - } - - if (_activityRegisterMap.TryGetValue(itemId, out var config)) - { - var instance = ResourceManager.LoadAndInstantiate(config.Path); - instance._InitNode(config, world); - return instance; - } - Debug.LogError("创建实例失败, 未找到id为'" + itemId + "'的物体!"); - return null; - } - - /// - /// 通过 ItemId 实例化 ActivityObject 对象 - /// - public static T Create(string itemId) where T : ActivityObject - { - var instance = Create(itemId); - if (instance != null) - { - return (T)instance; - } - return null; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/Component.cs b/DungeonShooting_Godot/src/framework/activity/Component.cs index a33d5e2..be0680d 100644 --- a/DungeonShooting_Godot/src/framework/activity/Component.cs +++ b/DungeonShooting_Godot/src/framework/activity/Component.cs @@ -245,6 +245,16 @@ return Master.GetComponent(type); } + public T[] GetComponents() where T : Component, new() + { + return Master.GetComponents(); + } + + public Component[] GetComponents(Type type) + { + return Master.GetComponents(type); + } + public void RemoveComponent(Component component) { Master.RemoveComponent(component); diff --git a/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs b/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs index 02ee215..fee637c 100644 --- a/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs +++ b/DungeonShooting_Godot/src/framework/activity/ExternalForce.cs @@ -19,8 +19,8 @@ /// /// 是否在空中也会受到阻力 /// - public bool EnableResistanceInTheAir { get; set; } = true; - + public bool EnableResistanceInTheAir { get; set; } = false; + /// /// 当速度( Velocity 和 RotationSpeed )到达 0 后是否自动销毁, 默认 true /// diff --git a/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs b/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs index 9056451..f193d53 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/MoveController.cs @@ -30,6 +30,21 @@ } private Vector2 _basisVelocity = Vector2.Zero; + private float _flag = 0; + + /// + /// 是否是静止状态 + /// + public bool IsMotionless() + { + var v = Velocity; + foreach (var externalForce in _forceList) + { + v += externalForce.Velocity; + } + + return v == Vector2.Zero; + } /// /// 缩放所有外力对象的速率, 包括基础速率 @@ -172,6 +187,7 @@ public ExternalForce AddForce(Vector2 velocity) { var force = AddForce("_anonymity_" + _index++); + force.AutoDestroy = true; force.Velocity = velocity; return force; } @@ -304,15 +320,19 @@ //处理旋转 if (rotationSpeed != 0) { - Master.Rotation += rotationSpeed * delta; + Rotation += rotationSpeed * delta; } + var friction = !Master.IsThrowing && Master.Altitude <= 0 ? Master.GetCurrentFriction() : 0; + var rotationFriction = !Master.IsThrowing && Master.Altitude <= 0 ? Mathf.DegToRad(Master.GetCurrentRotationFriction()) : 0; //衰减旋转速率 for (var i = 0; i < _forceList.Count; i++) { var force = _forceList[i]; - if (force.RotationResistance != 0 && (force.EnableResistanceInTheAir || !Master.IsThrowing)) + var num = (force.EnableResistanceInTheAir || !Master.IsThrowing) ? force.RotationResistance : 0; + num += rotationFriction; + if (num != 0) { - force.RotationSpeed = Mathf.MoveToward(force.RotationSpeed, 0, force.RotationResistance * delta); + force.RotationSpeed = Mathf.MoveToward(force.RotationSpeed, 0, num * delta); } } @@ -327,6 +347,11 @@ //新速度 var newVelocity = Master.Velocity; + if (!Master.BounceLockRotation) //跟着反弹角度 + { + Rotation = newVelocity.Angle(); + } + if (newVelocity.X == 0f && _basisVelocity.X * finallyVelocity.X > 0) { _basisVelocity.X = 0; @@ -338,17 +363,39 @@ } //是否撞到物体 - var collision = Master.GetLastSlideCollision(); - if (collision != null) //执行反弹操作 + KinematicCollision2D collision; + _flag--; + if (_flag <= 0 && (collision = Master.GetLastSlideCollision()) != null) //执行反弹操作 { - var no = collision.GetNormal().Rotated(Mathf.Pi * 0.5f); - newVelocity = (finallyVelocity - _basisVelocity).Reflect(no); - var length = _forceList.Count; - var v = newVelocity / (length / Master.BounceStrength); - for (var i = 0; i < _forceList.Count; i++) + //调用移动碰撞函数 + Master.OnMoveCollision(collision); + if (Master.IsDestroyed || (Master is IPoolItem poolItem && poolItem.IsRecycled)) { - _forceList[i].Velocity = v; + return; } + //2帧内不能再触发第二次碰撞检测 + _flag = 2; + var no = collision.GetNormal().Rotated(Mathf.Pi * 0.5f); + newVelocity = finallyEf.Reflect(no); + var rotation = newVelocity.Angle(); + + if (!Master.BounceLockRotation) //跟着反弹角度 + { + Rotation = rotation; + } + + var length = _forceList.Count; + if (length != 0) + { + var v = newVelocity / (length / Master.ActivityMaterial.BounceStrength); + for (var i = 0; i < _forceList.Count; i++) + { + _forceList[i].Velocity = v; + } + } + + //调用反弹函数 + Master.OnBounce(rotation); } else //没有撞到物体 { @@ -365,9 +412,11 @@ ); //力速度衰减 - if (force.VelocityResistance != 0 && (force.EnableResistanceInTheAir || !Master.IsThrowing)) + var num = (force.EnableResistanceInTheAir || !Master.IsThrowing) ? force.VelocityResistance : 0; + num += friction; + if (num != 0) { - force.Velocity = force.Velocity.MoveToward(Vector2.Zero, force.VelocityResistance * delta); + force.Velocity = force.Velocity.MoveToward(Vector2.Zero, num * delta); } } } diff --git a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs index bb1bbd8..d33027c 100644 --- a/DungeonShooting_Godot/src/framework/activity/components/StateController.cs +++ b/DungeonShooting_Godot/src/framework/activity/components/StateController.cs @@ -5,7 +5,7 @@ /// /// 对象状态机控制器 /// -public class StateController : Component where T : ActivityObject where S : Enum +public class StateController : Component where T : ActivityObject where S : Enum { /// /// 获取当前状态 @@ -60,7 +60,7 @@ return; } - stateBase.Master = Master as T; + stateBase.Master = Master; stateBase.StateController = this; _states.Add(stateBase.State, stateBase); } diff --git a/DungeonShooting_Godot/src/framework/common/NodeExtend.cs b/DungeonShooting_Godot/src/framework/common/NodeExtend.cs index deee5c1..e9988f0 100644 --- a/DungeonShooting_Godot/src/framework/common/NodeExtend.cs +++ b/DungeonShooting_Godot/src/framework/common/NodeExtend.cs @@ -50,6 +50,16 @@ { GameApplication.Instance.World.GetRoomLayer(layer).AddChild(node); } + + /// + /// 将节点插入的房间物体根节点,延时调用 + /// + /// 实例 + /// 放入的层 + public static void AddToActivityRootDeferred(this Node2D node, RoomLayerEnum layer) + { + GameApplication.Instance.World.GetRoomLayer(layer).CallDeferred(Node.MethodName.AddChild, node); + } /// /// 设置Ui布局方式是否横向扩展, 如果为 true, 则 GridContainer 的宽度会撑满父物体 diff --git a/DungeonShooting_Godot/src/framework/common/SeedRandom.cs b/DungeonShooting_Godot/src/framework/common/SeedRandom.cs index 6fd42c4..11acb6f 100644 --- a/DungeonShooting_Godot/src/framework/common/SeedRandom.cs +++ b/DungeonShooting_Godot/src/framework/common/SeedRandom.cs @@ -188,4 +188,81 @@ return RandomRangeInt(0, weightList.Length - 1); } + + /// + /// 返回指定区域内的随机坐标点, 该函数比较慢, 请谨慎调用 + /// + /// 碰撞区域数据 + /// 需要随机点的数量 + public Vector2[] GetRandomPositionInPolygon(List polygonDataList, int count) + { + var minX = int.MaxValue; + var maxX = int.MinValue; + var minY = int.MaxValue; + var maxY = int.MinValue; + + var outCount = 0; + + // 遍历多边形的顶点,找到最小和最大的x、y坐标 + foreach (var navigationPolygonData in polygonDataList) + { + if (navigationPolygonData.Type == NavigationPolygonType.Out) + { + outCount++; + } + foreach (var vertex in navigationPolygonData.GetPoints()) + { + if (vertex.X < minX) + { + minX = Mathf.CeilToInt(vertex.X); + } + else if (vertex.X > maxX) + { + maxX = Mathf.FloorToInt(vertex.X); + } + if (vertex.Y < minY) + { + minY = Mathf.CeilToInt(vertex.Y); + } + else if (vertex.Y > maxY) + { + maxY = Mathf.FloorToInt(vertex.Y); + } + } + } + + var list = new List(); + while (true) + { + var flag = outCount == 0; + var point = new Vector2(RandomRangeInt(minX, maxX), RandomRangeInt(minY, maxY)); + + foreach (var navigationPolygonData in polygonDataList) + { + if (navigationPolygonData.Type == NavigationPolygonType.Out) + { + if (!flag && Utils.IsPointInPolygon(navigationPolygonData.GetPoints(), point)) + { + flag = true; + } + } + else + { + if (flag && Utils.IsPointInPolygon(navigationPolygonData.GetPoints(), point)) + { + flag = false; + } + } + } + + if (flag) + { + list.Add(point); + if (list.Count >= count) + { + return list.ToArray(); + } + } + } + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/common/SpiralUtil.cs b/DungeonShooting_Godot/src/framework/common/SpiralUtil.cs new file mode 100644 index 0000000..67d8a79 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/common/SpiralUtil.cs @@ -0,0 +1,56 @@ +using Godot; + + +public static class SpiralUtil +{ + /// + /// 螺旋算法 顺时针 + /// 7 8 9 10 + /// 6 1 2 + /// 5 4 3 + /// + private static float[][] SCREW_CLOCKWISE = new float[][] { new float[] { 1, 2, 3, 4 }, new float[] { 4, 1, 2, 3 } }; + + /// + /// 螺旋算法 + /// + /// 当前序列 + /// 返回当前序列应该所在的位置 + public static Vector2I Screw(int index) + { + //总体思路是先找到第几圈 然后再找到第几个拐角 然后用switch + //因为一般序列都是从0开始的,所以此处加一以适应规则 + index++; + //如果求的是中心点 直接返回就行了 + if (index <= 1) return new Vector2I(0, 0); + + //开平方得到当前序列在哪个阶段中(阶段=第几圈*2) + var n = Mathf.Ceil(Mathf.Sqrt(index)); + var step = Mathf.FloorToInt(n / 2) * 2; + //求出当前序列是当前阶段中的第几个数 + var stepIndex = index - (step - 1) * (step - 1); + //求出当前序列在当前阶段中的第几条边上 + var stepStep = Mathf.CeilToInt((float)stepIndex / step); + //当前序列是当前边上第几个数 + var ssi = stepIndex % step; + if (ssi == 0) ssi = step; + + return new Vector2I( + GetValue(step, ssi, SCREW_CLOCKWISE[0][stepStep - 1]), + GetValue(step, ssi, SCREW_CLOCKWISE[1][stepStep - 1]) + ); + } + + private static int GetValue(int step, int ssi, float switchIndex) + { + switch (switchIndex) + { + case 1: return step / 2; + case 2: return step / 2 - ssi; + case 3: return -step / 2; + case 4: return -step / 2 + ssi; + } + + return 0; + } +} diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs index 4bda9ac..7c58641 100644 --- a/DungeonShooting_Godot/src/framework/common/Utils.cs +++ b/DungeonShooting_Godot/src/framework/common/Utils.cs @@ -269,4 +269,25 @@ { return (point - anchor).Normalized() * distance + anchor; } + + /// + /// 返回一个点是否在 Polygon 内部 + /// + /// 多边形顶点 + /// 目标点 + public static bool IsPointInPolygon(Vector2[] polygon, Vector2 point) + { + var isInside = false; + for (int i = 0, j = polygon.Length - 1; i < polygon.Length; j = i++) + { + if ((polygon[i].Y > point.Y) != (polygon[j].Y > point.Y) && + point.X < (polygon[j].X - polygon[i].X) * (point.Y - polygon[i].Y) / (polygon[j].Y - polygon[i].Y) + + polygon[i].X) + { + isInside = !isInside; + } + } + + return isInside; + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs b/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs index 8db3fd8..18371c0 100644 --- a/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs +++ b/DungeonShooting_Godot/src/framework/coroutine/ProxyCoroutineHandler.cs @@ -15,7 +15,7 @@ /// public static void ProxyUpdateCoroutine(ref List coroutineList, float delta) { - if (coroutineList.Count == 0) + if (coroutineList == null || coroutineList.Count == 0) { return; } diff --git a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs index ee59049..86bfa6d 100644 --- a/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs +++ b/DungeonShooting_Godot/src/framework/generator/ExcelGenerator.cs @@ -3,6 +3,7 @@ using System; using System.IO; using System.Text.Json; +using Config; using Godot; using Array = Godot.Collections.Array; @@ -36,11 +37,10 @@ //生成初始化 ActivityObject 代码 private static void GeneratorActivityObjectInit() { - var text = File.ReadAllText("resource/config/ActivityObject.json"); - var array = JsonSerializer.Deserialize[]>(text); + var text = File.ReadAllText($"resource/config/{nameof(ExcelConfig.ActivityBase)}.json"); + var array = JsonSerializer.Deserialize[]>(text); var code1 = ""; - var code2 = ""; foreach (var item in array) { @@ -52,7 +52,6 @@ code1 += $" /// 简介: {intro.Replace("\n", "
\n /// ")}\n"; code1 += $" ///
\n"; code1 += $" public const string Id_{id} = \"{id}\";\n"; - code2 += $" _activityRegisterMap.Add(\"{id}\", new RegisterActivityData(\"{item["Prefab"]}\", ExcelConfig.ActivityObject_Map[\"{id}\"]));\n"; } var str = $"using Config;\n\n"; @@ -68,10 +67,6 @@ str += code1; str += $" }}\n"; - str += $" private static void _InitRegister()\n"; - str += $" {{\n"; - str += code2; - str += $" }}\n"; str += $"}}\n"; File.WriteAllText("src/framework/activity/ActivityObject_Init.cs", str); diff --git a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs index 1972ec2..fe66f00 100644 --- a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs +++ b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs @@ -29,7 +29,7 @@ /// 玩家是否是第一次进入 ///
public bool IsFirstEnterFlag { get; private set; } = true; - + private bool _init = false; private Vector2 _initSize; private RectangleShape2D _shape; @@ -48,6 +48,7 @@ _initSize = rect2.Size; RoomInfo = roomInfo; + var collisionShape = new CollisionShape2D(); collisionShape.GlobalPosition = rect2.Position + rect2.Size / 2; var shape = new RectangleShape2D(); @@ -63,7 +64,7 @@ Monitoring = true; Monitorable = false; CollisionLayer = PhysicsLayer.None; - CollisionMask = PhysicsLayer.Prop | PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Shell | PhysicsLayer.Throwing; + CollisionMask = PhysicsLayer.Prop | PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Debris | PhysicsLayer.Throwing; BodyEntered += OnBodyEntered; BodyExited += OnBodyExited; diff --git a/DungeonShooting_Godot/src/framework/map/image/FreezeSprite.cs b/DungeonShooting_Godot/src/framework/map/image/FreezeSprite.cs new file mode 100644 index 0000000..34a035c --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/image/FreezeSprite.cs @@ -0,0 +1,125 @@ + +using Godot; + +/// +/// 用于绘制静止不动的 ActivityObject,从而优化性能 +/// +public class FreezeSprite : IDestroy +{ + public bool IsDestroyed { get; private set; } + + /// + /// 所在位置 + /// + public Vector2 Position { get; private set; } + + /// + /// 所属对象 + /// + public ActivityObject ActivityObject { get; } + + /// + /// 是否已经被冻结 + /// + public bool IsFrozen { get; private set; } + + private Node _spriteParent; + private int _spriteIndex; + private Node _shadowParent; + private int _shadowIndex; + private Node _parent; + + public FreezeSprite(ActivityObject ao) + { + ActivityObject = ao; + _spriteParent = ao.AnimatedSprite.GetParent(); + _shadowParent = ao.ShadowSprite.GetParent(); + } + + /// + /// 冻结精灵,这样 ActivityObject 多余的节点就会被移出场景树,逻辑也会被暂停,从而优化性能 + /// + public void Freeze() + { + if (IsFrozen) + { + return; + } + + var affiliationArea = ActivityObject.AffiliationArea; + if (affiliationArea == null) + { + Debug.LogError("物体的 AffiliationArea 属性为空,不能调用 Freeze() 函数!"); + return; + } + + Position = ActivityObject.Position; + affiliationArea.RoomInfo.StaticSprite.AddFreezeSprite(this); + HandlerFreezeSprite(); + } + + /// + /// 解冻精灵,让 ActivityObject 恢复正常功能 + /// + public void Unfreeze() + { + if (!IsFrozen) + { + return; + } + + IsFrozen = false; + + ActivityObject.AffiliationArea.RoomInfo.StaticSprite.RemoveFreezeSprite(this); + HandlerUnfreezeSprite(); + } + + public void HandlerFreezeSprite() + { + IsFrozen = true; + var affiliationArea = ActivityObject.AffiliationArea; + _spriteIndex = ActivityObject.AnimatedSprite.GetIndex(); + _shadowIndex = ActivityObject.ShadowSprite.GetIndex(); + var staticSprite = affiliationArea.RoomInfo.StaticSprite; + ActivityObject.ShadowSprite.Reparent(staticSprite); + ActivityObject.AnimatedSprite.Reparent(staticSprite); + _parent = ActivityObject.GetParent(); + _parent.RemoveChild(ActivityObject); + } + + public void HandlerUnfreezeSprite() + { + IsFrozen = false; + _parent.CallDeferred(Node.MethodName.AddChild, ActivityObject); + ActivityObject.ShadowSprite.Reparent(_shadowParent); + ActivityObject.AnimatedSprite.Reparent(_spriteParent); + + if (_spriteIndex > _shadowIndex) + { + _shadowParent.MoveChild(ActivityObject.ShadowSprite, _shadowIndex); + _spriteParent.MoveChild(ActivityObject.AnimatedSprite, _spriteIndex); + } + else + { + _spriteParent.MoveChild(ActivityObject.AnimatedSprite, _spriteIndex); + _shadowParent.MoveChild(ActivityObject.ShadowSprite, _shadowIndex); + } + } + + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; + if (IsFrozen) + { + ActivityObject.Destroy(); + ActivityObject.AnimatedSprite.QueueFree(); + ActivityObject.ShadowSprite.QueueFree(); + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/image/RoomStaticImageCanvas.cs b/DungeonShooting_Godot/src/framework/map/image/RoomStaticImageCanvas.cs deleted file mode 100644 index 75b3da7..0000000 --- a/DungeonShooting_Godot/src/framework/map/image/RoomStaticImageCanvas.cs +++ /dev/null @@ -1,42 +0,0 @@ - -using Godot; - -public class RoomStaticImageCanvas : IDestroy -{ - public bool IsDestroyed { get; private set; } - /// - /// 画布节点实例 - /// - public ImageCanvas CanvasSprite { get; } - /// - /// 房间坐标相对于画布坐标偏移量, 单位: 像素 - /// - public Vector2I RoomOffset { get; set; } - - public RoomStaticImageCanvas(Node root, Vector2I position, int width, int height) - { - CanvasSprite = new ImageCanvas(width, height); - //CanvasSprite.Clear(new Color(1, 1, 1, 0.2f)); - CanvasSprite.GlobalPosition = position; - root.AddChild(CanvasSprite); - } - - /// - /// 将世界坐标转为画布下的坐标 - /// - public Vector2 ToImageCanvasPosition(Vector2 pos) - { - return pos - CanvasSprite.GlobalPosition; - } - - public void Destroy() - { - if (IsDestroyed) - { - return; - } - - IsDestroyed = true; - CanvasSprite.Destroy(); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/image/RoomStaticSprite.cs b/DungeonShooting_Godot/src/framework/map/image/RoomStaticSprite.cs new file mode 100644 index 0000000..8eeb2bb --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/image/RoomStaticSprite.cs @@ -0,0 +1,155 @@ + +using System.Collections.Generic; +using Godot; + +/// +/// RoomInfo 中用于存放静态Sprite的功能类 +/// +public partial class RoomStaticSprite : Node2D, IDestroy +{ + + public bool IsDestroyed { get; private set; } + + private readonly List> _list = new List>(); + private readonly Grid> _grid = new Grid>(); + private readonly RoomInfo _roomInfo; + //网格划分的格子大小 + private readonly Vector2I _step; + //当前残骸数量 + private int _count = 0; + //最大残骸数量 + private int _maxCount = 1000; + //每个格子中最大残骸数量 + private int _stepMaxCount = 30; + private int _num = 0; + + public RoomStaticSprite(RoomInfo roomInfo) + { + _roomInfo = roomInfo; + _step = new Vector2I(30, 30); + } + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; + + _grid.ForEach((x, y, data) => + { + foreach (var spriteData in data) + { + spriteData.Destroy(); + } + data.Clear(); + }); + _grid.Clear(); + QueueFree(); + } + + /// + /// 添加静态精灵 + /// + public void AddFreezeSprite(FreezeSprite freezeSprite) + { + var pos = ToGridPosition(freezeSprite.Position); + var list = _grid.Get(pos); + if (list == null) + { + list = new List(); + _grid.Set(pos, list); + _list.Add(list); + } + list.Add(freezeSprite); + _count++; + + if (list.Count > _stepMaxCount) //检测单个step中残骸是否超出最大数量 + { + var sprite = list[0]; + list.RemoveAt(0); + sprite.Destroy(); + _count--; + } + else if (_count > _maxCount) //检测所有残骸是否超出最大数量 + { + if (_num <= 0 || _list[0].Count == 0) + { + _num = 5; + _list.Sort((l1, l2) => l2.Count - l1.Count); + } + else + { + _num--; + } + + var tempList = _list[0]; + if (tempList.Count > 0) + { + var sprite = tempList[0]; + tempList.RemoveAt(0); + sprite.Destroy(); + _count--; + } + } + } + + /// + /// 移除静态精灵 + /// + public void RemoveFreezeSprite(FreezeSprite freezeSprite) + { + var pos = ToGridPosition(freezeSprite.Position); + var list = _grid.Get(pos); + if (list != null) + { + if (list.Remove(freezeSprite)) + { + _count--; + } + } + } + + public List CollisionCircle(Vector2 position, float radius, bool unfreeze = false) + { + var len = radius * radius; + var result = new List(); + var startPosition = ToGridPosition(new Vector2(position.X - radius, position.Y - radius)); + var endPosition = ToGridPosition(new Vector2(position.X + radius, position.Y + radius)); + for (var x = startPosition.X; x <= endPosition.X; x++) + { + for (var y = startPosition.Y; y <= endPosition.Y; y++) + { + var data = _grid.Get(x, y); + if (data != null) + { + for (var i = 0; i < data.Count; i++) + { + var freezeSprite = data[i]; + if (position.DistanceSquaredTo(freezeSprite.Position) < len) + { + result.Add(freezeSprite); + if (unfreeze) + { + freezeSprite.HandlerUnfreezeSprite(); + data.RemoveAt(i--); + _count--; + } + } + } + } + } + } + + return result; + } + + private Vector2I ToGridPosition(Vector2 position) + { + var x = Mathf.FloorToInt(position.X / _step.X); + var y = Mathf.FloorToInt(position.Y / _step.Y); + return new Vector2I(x * _step.X, y * _step.Y); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs index 409eeab..ff5d0c9 100644 --- a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs +++ b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs @@ -120,7 +120,7 @@ mark.DerivedAttr = new Dictionary(); mark.VerticalSpeed = markInfoItem.VerticalSpeed; mark.Altitude = markInfoItem.Altitude; - mark.ActivityType = (ActivityType)ExcelConfig.ActivityObject_Map[markInfoItem.Id].Type; + mark.ActivityType = (ActivityType)ExcelConfig.ActivityBase_Map[markInfoItem.Id].Type; if (mark.ActivityType == ActivityType.Enemy) //敌人类型 { @@ -159,9 +159,9 @@ random.RandomRangeInt((int)(pos.X - birthRect.X / 2), (int)(pos.X + birthRect.X / 2)), random.RandomRangeInt((int)(pos.Y - birthRect.Y / 2), (int)(pos.Y + birthRect.Y / 2)) ); - var offset = RoomInfo.GetOffsetPosition(); //var offset = RoomInfo.RoomSplit.RoomInfo.Position.AsVector2I(); - mark.Position = RoomInfo.GetWorldPosition() + (tempPos - offset); + //mark.Position = RoomInfo.GetWorldPosition() + tempPos - offset; + mark.Position = RoomInfo.ToGlobalPosition(tempPos); wave.Add(mark); } @@ -298,9 +298,11 @@ activityObject.StartCoroutine(OnActivityObjectBirth(activityObject)); activityObject.PutDown(GetDefaultLayer(activityMark)); - var effect1 = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_effect_common_Effect1_tscn); - effect1.Position = activityObject.Position + new Vector2(0, -activityMark.Altitude); - effect1.AddToActivityRoot(RoomLayerEnum.YSortLayer); + var effect = ObjectManager.GetPoolItem(ResourcePath.prefab_effect_common_Effect1_tscn); + var node = (Node2D)effect; + node.Position = activityObject.Position + new Vector2(0, -activityMark.Altitude); + node.AddToActivityRoot(RoomLayerEnum.YSortLayer); + effect.PlayEffect(); } i++; @@ -428,8 +430,8 @@ } else if (activityMark.ActivityType == ActivityType.Enemy) //敌人类型 { - var enemy = (Enemy)activityObject; - if (activityMark.Attr.TryGetValue("Weapon", out var weaponId)) //使用的武器 + var role = (Role)activityObject; + if (role is AdvancedEnemy enemy && activityMark.Attr.TryGetValue("Weapon", out var weaponId)) //使用的武器 { if (!string.IsNullOrEmpty(weaponId)) { @@ -449,7 +451,7 @@ if (activityMark.DerivedAttr.TryGetValue("Face", out var face)) //脸朝向, 应该只有 -1 和 1 { var faceDir = int.Parse(face); - enemy.Face = (FaceDirection)faceDir; + role.Face = (FaceDirection)faceDir; } } } diff --git a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs index 93f52da..a249dda 100644 --- a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs @@ -76,9 +76,19 @@ public AffiliationArea AffiliationArea; /// + /// 静态渲染精灵根节点, 用于放置sprite + /// + public RoomStaticSprite StaticSprite; + + /// /// 静态精灵绘制画布 /// - public RoomStaticImageCanvas StaticImageCanvas; + public ImageCanvas StaticImageCanvas; + + /// + /// 房间坐标相对于画布坐标偏移量, 单位: 像素 + /// + public Vector2I RoomOffset; /// /// 房间迷雾 @@ -215,6 +225,14 @@ } /// + /// 将房间配置中的坐标转为全局坐标, 单位: 像素 + /// + public Vector2 ToGlobalPosition(Vector2 pos) + { + return GetWorldPosition() + pos - GetOffsetPosition(); + } + + /// /// 获取房间横轴结束位置, 单位: 格 /// public int GetHorizontalEnd() @@ -263,6 +281,14 @@ return Size.Y * GameConfig.TileCellSize; } + /// + /// 将世界坐标转为画布下的坐标 + /// + public Vector2 ToImageCanvasPosition(Vector2 pos) + { + return pos - StaticImageCanvas.Position; + } + public void Destroy() { if (IsDestroyed) @@ -296,6 +322,12 @@ { StaticImageCanvas.Destroy(); } + + // + if (StaticSprite != null) + { + StaticSprite.Destroy(); + } //销毁迷雾 if (RoomFogMask != null) diff --git a/DungeonShooting_Godot/src/framework/pool/IPoolItem.cs b/DungeonShooting_Godot/src/framework/pool/IPoolItem.cs new file mode 100644 index 0000000..73c66db --- /dev/null +++ b/DungeonShooting_Godot/src/framework/pool/IPoolItem.cs @@ -0,0 +1,23 @@ + +/// +/// 可被对象池池回收的实例对象接口 +/// +public interface IPoolItem : IDestroy +{ + /// + /// 是否已经回收 + /// + bool IsRecycled { get; set; } + /// + /// 对象唯一标识,用于在对象池中区分对象类型,可以是资源路径,也可以是配置表id + /// + string Logotype { get; set; } + /// + /// 当物体被回收时调用,也就是进入对象池 + /// + void OnReclaim(); + /// + /// 离开对象池时调用 + /// + void OnLeavePool(); +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/pool/ObjectPool.cs b/DungeonShooting_Godot/src/framework/pool/ObjectPool.cs new file mode 100644 index 0000000..b21242b --- /dev/null +++ b/DungeonShooting_Godot/src/framework/pool/ObjectPool.cs @@ -0,0 +1,75 @@ + +using System.Collections.Generic; + +/// +/// 对象池,用于获取和回收常用对象,避免每次都创建一个新的 +/// +public static class ObjectPool +{ + private static Dictionary> _pool = new Dictionary>(); + + /// + /// 回收一个对象 + /// + public static void Reclaim(IPoolItem poolItem) + { + if (poolItem.IsRecycled) + { + return; + } + var logotype = poolItem.Logotype; + if (!_pool.TryGetValue(logotype, out var poolItems)) + { + poolItems = new Stack(); + _pool.Add(logotype, poolItems); + } + + poolItems.Push(poolItem); + poolItem.IsRecycled = true; + poolItem.OnReclaim(); + } + + /// + /// 根据标识从池中取出一个实例,如果没有该标识类型的实例,则返回null + /// + public static IPoolItem GetItem(string logotype) + { + if (_pool.TryGetValue(logotype, out var poolItems)) + { + if (poolItems.Count > 0) + { + var poolItem = poolItems.Pop(); + poolItem.IsRecycled = false; + poolItem.OnLeavePool(); + return poolItem; + } + } + + return null; + } + + /// + /// 根据标识从池中取出一个实例,如果没有该标识类型的实例,则返回null + /// + public static T GetItem(string logotype) where T : IPoolItem + { + return (T)GetItem(logotype); + } + + /// + /// 销毁所有池中的物体 + /// + public static void DisposeAllItem() + { + foreach (var keyValuePair in _pool) + { + var poolItems = keyValuePair.Value; + while (poolItems.Count > 0) + { + var item = poolItems.Pop(); + item.Destroy(); + } + } + _pool.Clear(); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/ui/UiBase.cs b/DungeonShooting_Godot/src/framework/ui/UiBase.cs index 28ee1fd..17e6d7e 100644 --- a/DungeonShooting_Godot/src/framework/ui/UiBase.cs +++ b/DungeonShooting_Godot/src/framework/ui/UiBase.cs @@ -210,10 +210,7 @@ Process(newDelta); //协程更新 - if (_coroutineList != null) - { - ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, newDelta); - } + ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, newDelta); } /// diff --git a/DungeonShooting_Godot/src/game/AnimatorNames.cs b/DungeonShooting_Godot/src/game/AnimatorNames.cs index 8ba547d..b393c9f 100644 --- a/DungeonShooting_Godot/src/game/AnimatorNames.cs +++ b/DungeonShooting_Godot/src/game/AnimatorNames.cs @@ -60,4 +60,12 @@ /// 显示动画 /// public const string Show = "show"; + /// + /// 播放特效 + /// + public const string Play = "play"; + /// + /// 物体移动 + /// + public const string Move = "move"; } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/Cursor.cs b/DungeonShooting_Godot/src/game/Cursor.cs index aca4d11..7f8e528 100644 --- a/DungeonShooting_Godot/src/game/Cursor.cs +++ b/DungeonShooting_Godot/src/game/Cursor.cs @@ -13,7 +13,7 @@ /// /// 非GUI模式下鼠标指针所挂载的角色 /// - private Role _mountRole; + private AdvancedRole _mountRole; private Sprite2D center; private Sprite2D lt; @@ -88,7 +88,7 @@ /// /// 设置非GUI模式下鼠标指针所挂载的角色 /// - public void SetMountRole(Role role) + public void SetMountRole(AdvancedRole role) { _mountRole = role; } @@ -96,7 +96,7 @@ /// /// 获取非GUI模式下鼠标指针所挂载的角色 /// - public Role GetMountRole() + public AdvancedRole GetMountRole() { return _mountRole; } diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index 9e4266c..86b0d3d 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -33,16 +33,15 @@ [Export] public Node2D GlobalNodeRoot; /// - /// 是否开启调试 + /// 游戏目标帧率 /// - [ExportGroup("Debug")] - [Export] public bool Debug; - + public int TargetFps { get; private set; } + /// /// 鼠标指针 /// public Cursor Cursor { get; private set; } - + /// /// 游戏世界 /// @@ -84,13 +83,12 @@ public GameApplication() { Instance = this; + TargetFps = (int)DisplayServer.ScreenGetRefreshRate(); //初始化配置表 ExcelConfig.Init(); //初始化房间配置数据 InitRoomConfig(); - //初始化 ActivityObject - ActivityObject.InitActivity(); //初始化武器数据 Weapon.InitWeaponAttribute(); @@ -106,19 +104,19 @@ //随机化种子 //GD.Randomize(); //固定帧率 - Engine.MaxFps = 60; + //Engine.MaxFps = TargetFps; //调试绘制开关 - ActivityObject.IsDebug = Debug; + //IsDebug = true; + ActivityObject.IsDebug = false; //Engine.TimeScale = 0.2f; - //调整窗口分辨率 OnWindowSizeChanged(); RefreshSubViewportSize(); //窗体大小改变 GetWindow().SizeChanged += OnWindowSizeChanged; - + ImageCanvas.Init(GetTree().CurrentScene); - + //初始化ui UiManager.Init(); //调试Ui @@ -145,10 +143,7 @@ SoundManager.Update(newDelta); //协程更新 - if (_coroutineList != null) - { - ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, newDelta); - } + ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, newDelta); } /// @@ -171,11 +166,15 @@ /// public void DestroyWorld() { + //销毁所有物体 if (World != null) { ClearWorld(); World.QueueFree(); } + + //销毁池中所有物体 + ObjectPool.DisposeAllItem(); World = null; } @@ -296,7 +295,6 @@ //清理世界 private void ClearWorld() { - var childCount = World.NormalLayer.GetChildCount(); for (var i = 0; i < childCount; i++) { diff --git a/DungeonShooting_Godot/src/game/PhysicsLayer.cs b/DungeonShooting_Godot/src/game/PhysicsLayer.cs index a96e34d..f181de2 100644 --- a/DungeonShooting_Godot/src/game/PhysicsLayer.cs +++ b/DungeonShooting_Godot/src/game/PhysicsLayer.cs @@ -36,9 +36,9 @@ /// public const uint OnHand = 0b1000000; /// - /// 弹壳 + /// 各种碎屑,包括弹壳,敌人死亡碎片,爆炸碎片等 /// - public const uint Shell = 0b10000000; + public const uint Debris = 0b10000000; /// /// 投抛中 /// diff --git a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs deleted file mode 100644 index 0cf2a33..0000000 --- a/DungeonShooting_Godot/src/game/activity/bullet/Bullet.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System.Collections; -using Godot; - -/// -/// 子弹类 -/// -[Tool] -public partial class Bullet : ActivityObject -{ - /// - /// 碰撞区域 - /// - [Export, ExportFillNode] - public Area2D CollisionArea { get; set; } - - /// - /// 攻击的层级 - /// - public uint AttackLayer - { - get => CollisionArea.CollisionMask; - set => CollisionArea.CollisionMask = value; - } - - /// - /// 发射该子弹的武器 - /// - public Weapon Weapon { get; private set; } - - /// - /// 发射该子弹的角色 - /// - public Role Role { get; private set; } - - /// - /// 最小伤害 - /// - public int MinHarm { get; set; } = 4; - - /// - /// 最大伤害 - /// - public int MaxHarm { get; set; } = 4; - - /// - /// 发射该子弹的角色是否是Ai - /// - public bool TriggerRoleIsAi { get; set; } - - // 最大飞行距离 - private float MaxDistance; - - // 子弹飞行速度 - private float FlySpeed; - - //当前子弹已经飞行的距离 - private float CurrFlyDistance = 0; - - /// - /// 初始化子弹属性 - /// - /// 触发开火的角色 - /// 射出该子弹的武器 - /// 速度 - /// 最大飞行距离 - /// 位置 - /// 角度 - /// 攻击目标层级 - public void Init(bool triggerIsAi, Weapon weapon, float speed, float maxDistance, Vector2 position, float rotation, uint targetLayer) - { - TriggerRoleIsAi = triggerIsAi; - Weapon = weapon; - Role = weapon.Master; - AttackLayer = targetLayer; - CollisionArea.AreaEntered += OnArea2dEntered; - - if (!triggerIsAi) //只有玩家使用该武器才能获得正常速度的子弹 - { - FlySpeed = speed; - } - else - { - FlySpeed = speed * weapon.AiUseAttribute.AiAttackAttr.BulletSpeedScale; - } - MaxDistance = maxDistance; - Position = position; - Rotation = rotation; - ShadowOffset = new Vector2(0, 5); - BasisVelocity = new Vector2(FlySpeed, 0).Rotated(Rotation); - - //如果子弹会对玩家造成伤害, 则显示红色描边 - if (Player.Current.CollisionWithMask(targetLayer)) - { - ShowOutline = true; - OutlineColor = new Color(1, 0, 0); - StartCoroutine(BorderFlashes()); - } - } - - private IEnumerator BorderFlashes() - { - while (true) - { - ShowOutline = !ShowOutline; - yield return new WaitForSeconds(0.12f); - } - } - - /// - /// 播放子弹消失的特效 - /// - public virtual void PlayDisappearEffect() - { - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); - var node = packedScene.Instantiate(); - node.GlobalPosition = GlobalPosition; - node.AddToActivityRoot(RoomLayerEnum.YSortLayer); - } - - protected override void PhysicsProcessOver(float delta) - { - //移动 - var lastSlideCollision = GetLastSlideCollision(); - //撞到墙 - if (lastSlideCollision != null) - { - //创建粒子特效 - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletSmoke_tscn); - var smoke = packedScene.Instantiate(); - smoke.GlobalPosition = lastSlideCollision.GetPosition(); - smoke.GlobalRotation = lastSlideCollision.GetNormal().Angle(); - smoke.AddToActivityRoot(RoomLayerEnum.YSortLayer); - - Destroy(); - return; - } - //距离太大, 自动销毁 - CurrFlyDistance += FlySpeed * delta; - if (CurrFlyDistance >= MaxDistance) - { - PlayDisappearEffect(); - Destroy(); - } - } - - private void OnArea2dEntered(Area2D other) - { - var role = other.AsActivityObject(); - if (role != null) - { - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); - var node = packedScene.Instantiate(); - node.GlobalPosition = GlobalPosition; - node.AddToActivityRoot(RoomLayerEnum.YSortLayer); - - //计算子弹造成的伤害 - var damage = Utils.Random.RandomRangeInt(MinHarm, MaxHarm); - if (Role != null) - { - damage = Role.RoleState.CallCalcDamageEvent(damage); - } - - //击退 - if (role is not Player) //目标不是玩家才会触发击退 - { - var attr = TriggerRoleIsAi ? Weapon.AiUseAttribute : Weapon.PlayerUseAttribute; - var repel = Utils.Random.RandomConfigRange(attr.RepelRnage); - role.MoveController.AddForce(Vector2.FromAngle(BasisVelocity.Angle()) * repel, repel * 2); - } - - //造成伤害 - role.CallDeferred(nameof(Role.Hurt), damage, Rotation); - Destroy(); - } - } - - protected override void OnDestroy() - { - StopAllCoroutine(); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/BulletAttribute.cs b/DungeonShooting_Godot/src/game/activity/bullet/BulletAttribute.cs deleted file mode 100644 index aa30af1..0000000 --- a/DungeonShooting_Godot/src/game/activity/bullet/BulletAttribute.cs +++ /dev/null @@ -1,5 +0,0 @@ - -public class BulletAttribute -{ - -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/explode/Explode.cs b/DungeonShooting_Godot/src/game/activity/bullet/explode/Explode.cs new file mode 100644 index 0000000..6bbec1c --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/bullet/explode/Explode.cs @@ -0,0 +1,162 @@ + +using Config; +using Godot; + +/// +/// 爆炸 +/// +public partial class Explode : Area2D, IPoolItem +{ + public bool IsRecycled { get; set; } + public string Logotype { get; set; } + + public bool IsDestroyed { get; private set; } + + /// + /// 动画播放器 + /// + public AnimationPlayer AnimationPlayer { get; private set; } + /// + /// 碰撞器 + /// + public CollisionShape2D CollisionShape { get; private set; } + /// + /// 碰撞器形状对象 + /// + public CircleShape2D CircleShape { get; private set; } + + /// + /// 爆炸攻击的层级 + /// + public uint AttackLayer { get; private set; } + + + private bool _init = false; + private float _hitRadius; + private int _harm; + private float _repelledRadius; + private float _maxRepelled; + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; + QueueFree(); + } + + /// + /// 初始化爆炸数据 + /// + /// 爆炸所在区域 + /// 攻击的层级 + /// 伤害半径 + /// 造成的伤害 + /// 击退半径 + /// 最大击退速度 + public void Init(AffiliationArea affiliationArea, uint attackLayer, float hitRadius, int harm, float repelledRadius, float maxRepelled) + { + if (!_init) + { + _init = true; + AnimationPlayer = GetNode("AnimationPlayer"); + CollisionShape = GetNode("CollisionShape2D"); + CircleShape = (CircleShape2D)CollisionShape.Shape; + AnimationPlayer.AnimationFinished += OnAnimationFinish; + BodyEntered += OnBodyEntered; + } + + AttackLayer = attackLayer; + _hitRadius = hitRadius; + _harm = harm; + _repelledRadius = repelledRadius; + _maxRepelled = maxRepelled; + CollisionMask = attackLayer | PhysicsLayer.Prop | PhysicsLayer.Debris; + CircleShape.Radius = Mathf.Max(hitRadius, maxRepelled); + + //冲击波 + if (affiliationArea != null) + { + ShockWave(affiliationArea); + } + } + + /// + /// 播放爆炸, triggerRole 为触发该爆炸的角色 + /// + public void RunPlay(AdvancedRole triggerRole = null) + { + GameCamera.Main.CreateShake(new Vector2(6, 6), 0.7f, true); + AnimationPlayer.Play(AnimatorNames.Play); + //播放爆炸音效 + SoundManager.PlaySoundByConfig("explosion0002", Position, triggerRole); + } + + //爆炸冲击波 + private void ShockWave(AffiliationArea affiliationArea) + { + var position = Position; + var freezeSprites = affiliationArea.RoomInfo.StaticSprite.CollisionCircle(position, _repelledRadius, true); + foreach (var freezeSprite in freezeSprites) + { + var temp = freezeSprite.Position - position; + freezeSprite.ActivityObject.MoveController.AddForce(temp.Normalized() * _maxRepelled * (_repelledRadius - temp.Length()) / _repelledRadius); + } + } + + public void OnReclaim() + { + GetParent().CallDeferred(Node.MethodName.RemoveChild, this); + } + + public void OnLeavePool() + { + + } + + private void OnAnimationFinish(StringName name) + { + if (name == AnimatorNames.Play) + { + ObjectPool.Reclaim(this); + } + } + + private void OnBodyEntered(Node2D node) + { + var o = node.AsActivityObject(); + if (o != null) + { + var temp = o.Position - Position; + var len = temp.Length(); + var angle = temp.Angle(); + + if (len <= _hitRadius) //在伤害半径内 + { + if (o is Role role) //是角色 + { + role.CallDeferred(nameof(role.Hurt), _harm, angle); + } + else if (o is Bullet bullet) //是子弹 + { + if (bullet is BoomBullet boomBullet) //如果是爆炸子弹, 则直接销毁 + { + boomBullet.PlayBoom(); + } + bullet.Destroy(); + return; + } + } + + if (len <= _repelledRadius) //击退半径内 + { + var repelled = (_repelledRadius - len) / _repelledRadius * _maxRepelled; + //o.MoveController.SetAllVelocity(Vector2.Zero); + o.MoveController.AddForce(Vector2.FromAngle(angle) * repelled); + } + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/laser/Laser.cs b/DungeonShooting_Godot/src/game/activity/bullet/laser/Laser.cs new file mode 100644 index 0000000..5a62788 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/bullet/laser/Laser.cs @@ -0,0 +1,200 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Godot; + +/// +/// 激光子弹 +/// +public partial class Laser : Area2D, IBullet +{ + public CollisionShape2D Collision { get; private set; } + public Sprite2D LineSprite { get; private set; } + public RectangleShape2D Shape { get; private set; } + + public event Action OnReclaimEvent; + public event Action OnLeavePoolEvent; + + public bool IsRecycled { get; set; } + public string Logotype { get; set; } + + public uint AttackLayer + { + get => CollisionMask; + set => CollisionMask = value; + } + + public BulletData BulletData { get; private set; } + + public bool IsDestroyed { get; private set; } + + public float Width { get; set; } + + //开启的协程 + private List _coroutineList; + private float _pixelScale; + private float _speed = 2000; + private Tween _tween; + private bool _init = false; + + public void InitData(BulletData data, uint attackLayer) + { + InitData(data, attackLayer, 5); + } + + public void InitData(BulletData data, uint attackLayer, float width) + { + if (!_init) + { + Collision = GetNodeOrNull("CollisionShape2D"); + Collision.Disabled = true; + Shape = (RectangleShape2D)Collision.Shape; + LineSprite = GetNodeOrNull("LineSprite"); + _pixelScale = 1f / LineSprite.Texture.GetHeight(); + + AreaEntered += OnArea2dEntered; + + _init = true; + } + + BulletData = data; + AttackLayer = attackLayer; + + Position = data.Position; + Rotation = data.Rotation; + + //计算射线最大距离, 也就是撞到墙壁的距离 + var targetPosition = data.Position + Vector2.FromAngle(data.Rotation) * data.MaxDistance; + var parameters = PhysicsRayQueryParameters2D.Create(data.Position, targetPosition, PhysicsLayer.Wall); + var result = GetWorld2D().DirectSpaceState.IntersectRay(parameters); + float distance; + if (result != null && result.TryGetValue("position", out var point)) + { + distance = Position.DistanceTo((Vector2)point); + } + else + { + distance = data.MaxDistance; + } + + Collision.SetDeferred(CollisionShape2D.PropertyName.Disabled, false); + Collision.Position = Vector2.Zero; + Shape.Size = Vector2.Zero; + LineSprite.Scale = new Vector2(0, width * _pixelScale); + + //如果子弹会对玩家造成伤害, 则显示成红色 + if (Player.Current.CollisionWithMask(attackLayer)) + { + LineSprite.Modulate = new Color(2.5f, 0.5f, 0.5f); + } + else + { + LineSprite.Modulate = new Color(1.5f, 1.5f, 1.5f); + } + + //激光飞行时间 + var time = distance / _speed; + + _tween = CreateTween(); + _tween.SetParallel(); + _tween.TweenProperty(LineSprite, "scale", new Vector2(distance, width * _pixelScale), time); + _tween.TweenProperty(Collision, "position", new Vector2(distance * 0.5f, 0), time); + _tween.TweenProperty(Shape, "size", new Vector2(distance, width), time); + _tween.Chain(); + //持续时间 + // tween.TweenInterval(0.2f); + // tween.Chain(); + _tween.TweenCallback(Callable.From(() => + { + Collision.SetDeferred(CollisionShape2D.PropertyName.Disabled, false); + })); + _tween.Chain(); + _tween.TweenProperty(LineSprite, "scale", new Vector2(distance, 0), 0.3f); + _tween.Chain(); + _tween.TweenCallback(Callable.From(() => + { + _tween = null; + DoReclaim(); + })); + _tween.Play(); + } + + public override void _Process(double delta) + { + ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, (float)delta); + } + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + QueueFree(); + } + + private void OnArea2dEntered(Area2D other) + { + var role = other.AsActivityObject(); + if (role != null) + { + //击退 + if (BulletData.Repel != 0) + { + role.MoveController.AddForce(Vector2.FromAngle(Rotation) * BulletData.Repel); + } + //造成伤害 + role.CallDeferred(nameof(Role.Hurt), BulletData.Harm, Rotation); + } + } + + public long StartCoroutine(IEnumerator able) + { + return ProxyCoroutineHandler.ProxyStartCoroutine(ref _coroutineList, able); + } + + public void StopCoroutine(long coroutineId) + { + ProxyCoroutineHandler.ProxyStopCoroutine(ref _coroutineList, coroutineId); + } + + public bool IsCoroutineOver(long coroutineId) + { + return ProxyCoroutineHandler.ProxyIsCoroutineOver(ref _coroutineList, coroutineId); + } + + public void StopAllCoroutine() + { + ProxyCoroutineHandler.ProxyStopAllCoroutine(ref _coroutineList); + } + + public void DoReclaim() + { + ObjectPool.Reclaim(this); + } + + public virtual void OnReclaim() + { + if (OnReclaimEvent != null) + { + OnReclaimEvent(); + } + + if (_tween != null) + { + _tween.Dispose(); + _tween = null; + } + GetParent().CallDeferred(Node.MethodName.RemoveChild, this); + } + + public virtual void OnLeavePool() + { + StopAllCoroutine(); + if (OnLeavePoolEvent != null) + { + OnLeavePoolEvent(); + } + } +} diff --git a/DungeonShooting_Godot/src/game/activity/bullet/normal/BoomBullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/normal/BoomBullet.cs new file mode 100644 index 0000000..fa1826f --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/bullet/normal/BoomBullet.cs @@ -0,0 +1,85 @@ + +using Godot; + +/// +/// 爆炸子弹 +/// +[Tool] +public partial class BoomBullet : Bullet +{ + /// + /// 轨迹粒子 + /// + [Export] + public GpuParticles2D Particles; + + public override void InitData(BulletData data, uint attackLayer) + { + base.InitData(data, attackLayer); + if (Particles != null) + { + Particles.Restart(); + } + } + + public override void OnLimeOver() + { + PlayBoom(); + DoReclaim(); + } + + public override void OnMaxDistance() + { + PlayBoom(); + DoReclaim(); + } + + public override void OnCollisionTarget(ActivityObject o) + { + PlayBoom(); + DoReclaim(); + } + + public override void OnMoveCollision(KinematicCollision2D lastSlideCollision) + { + CurrentBounce++; + if (CurrentBounce > BulletData.BounceCount) //反弹次数超过限制 + { + PlayBoom(); + } + else + { + //播放撞击音效 + SoundManager.PlaySoundByConfig("collision0001", Position, BulletData.TriggerRole); + } + } + + protected override void OnFallToGround() + { + //播放撞击音效 + SoundManager.PlaySoundByConfig("collision0001", Position, BulletData.TriggerRole); + } + + /// + /// 播放爆炸 + /// + public void PlayBoom() + { + var explode = ObjectManager.GetPoolItem(ResourcePath.prefab_bullet_explode_Explode0001_tscn); + var pos = Position; + explode.Position = pos; + explode.RotationDegrees = Utils.Random.RandomRangeInt(0, 360); + explode.AddToActivityRootDeferred(RoomLayerEnum.YSortLayer); + explode.Init(BulletData.TriggerRole?.AffiliationArea, AttackLayer, 25, BulletData.Harm, 50, BulletData.Repel); + explode.RunPlay(BulletData.TriggerRole); + if (AffiliationArea != null) + { + var texture = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_effects_explode_Explode_pit0001_png); + var tempPos = AffiliationArea.RoomInfo.ToImageCanvasPosition(pos); + AffiliationArea.RoomInfo.StaticImageCanvas.DrawImageInCanvas( + texture, null, tempPos.X, tempPos.Y, Utils.Random.RandomRangeInt(0, 360), + texture.GetWidth() / 2, texture.GetHeight() / 2, false + ); + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs new file mode 100644 index 0000000..2e7af1e --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs @@ -0,0 +1,256 @@ + +using System; +using System.Collections; +using Godot; + +/// +/// 子弹类 +/// +[Tool] +public partial class Bullet : ActivityObject, IBullet +{ + public event Action OnReclaimEvent; + public event Action OnLeavePoolEvent; + + public bool IsRecycled { get; set; } + public string Logotype { get; set; } + + /// + /// 碰撞区域 + /// + [Export, ExportFillNode] + public Area2D CollisionArea { get; set; } + + /// + /// 攻击的层级 + /// + public uint AttackLayer + { + get => CollisionArea.CollisionMask; + set => CollisionArea.CollisionMask = value; + } + + public BulletData BulletData { get; private set; } + + /// + /// 当前反弹次数 + /// + public int CurrentBounce { get; protected set; } = 0; + + /// + /// 当前穿透次数 + /// + public int CurrentPenetration { get; protected set; } = 0; + + //当前子弹已经飞行的距离 + private float CurrFlyDistance = 0; + + private bool _init = false; + + public virtual void InitData(BulletData data, uint attackLayer) + { + if (!_init) + { + CollisionArea.AreaEntered += OnArea2dEntered; + _init = true; + } + + CurrentBounce = 0; + CurrentPenetration = 0; + CurrFlyDistance = 0; + + BounceLockRotation = false; + BulletData = data; + AttackLayer = attackLayer; + Rotation = data.Rotation; + + float altitude; + var triggerRole = data.TriggerRole; + if (triggerRole != null) + { + altitude = -triggerRole.MountPoint.Position.Y; + if (triggerRole.AffiliationArea != null) //设置所属区域 + { + triggerRole.AffiliationArea.InsertItem(this); + } + } + else + { + altitude = 8; + } + + Position = data.Position + new Vector2(0, altitude); + Altitude = altitude; + if (data.VerticalSpeed != 0) + { + VerticalSpeed = data.VerticalSpeed; + } + EnableVerticalMotion = data.BulletBase.UseGravity; + + //BasisVelocity = new Vector2(data.FlySpeed, 0).Rotated(Rotation); + MoveController.AddForce(new Vector2(data.FlySpeed, 0).Rotated(Rotation)); + + //如果子弹会对玩家造成伤害, 则显示红色描边 + if (Player.Current.CollisionWithMask(attackLayer)) + { + ShowBorderFlashes(); + } + PutDown(RoomLayerEnum.YSortLayer); + //播放子弹移动动画 + PlaySpriteAnimation(AnimatorNames.Move); + //强制更新下坠逻辑处理 + UpdateFall((float)GetProcessDeltaTime()); + + //过期销毁 + if (data.LifeTime > 0) + { + this.CallDelay(data.LifeTime, OnLimeOver); + } + } + + + public override void OnMoveCollision(KinematicCollision2D collision) + { + CurrentBounce++; + if (CurrentBounce > BulletData.BounceCount) //反弹次数超过限制 + { + //创建粒子特效 + var effect = ObjectManager.GetPoolItem(ResourcePath.prefab_effect_weapon_BulletSmoke_tscn); + var smoke = (Node2D)effect; + var rotated = AnimatedSprite.Position.Rotated(Rotation); + smoke.GlobalPosition = collision.GetPosition() + new Vector2(0, rotated.Y); + smoke.GlobalRotation = collision.GetNormal().Angle(); + smoke.AddToActivityRoot(RoomLayerEnum.YSortLayer); + effect.PlayEffect(); + DoReclaim(); + } + } + + /// + /// 碰到目标 + /// + public virtual void OnCollisionTarget(ActivityObject o) + { + if (o is Role role) + { + PlayDisappearEffect(); + + //击退 + if (role is not Player) //目标不是玩家才会触发击退 + { + if (BulletData.Repel != 0) + { + role.MoveController.AddForce(Velocity.Normalized() * BulletData.Repel); + } + } + + //造成伤害 + role.CallDeferred(nameof(AdvancedRole.Hurt), BulletData.Harm, Rotation); + + //穿透次数 + CurrentPenetration++; + if (CurrentPenetration > BulletData.Penetration) + { + DoReclaim(); + } + } + } + + /// + /// 到达最大运行距离 + /// + public virtual void OnMaxDistance() + { + PlayDisappearEffect(); + DoReclaim(); + } + + /// + /// 子弹生命周期结束 + /// + public virtual void OnLimeOver() + { + PlayDisappearEffect(); + DoReclaim(); + } + + /// + /// 显示红色描边 + /// + public void ShowBorderFlashes() + { + ShowOutline = true; + OutlineColor = new Color(1, 0, 0); + StartCoroutine(BorderFlashes()); + } + + private IEnumerator BorderFlashes() + { + while (true) + { + ShowOutline = !ShowOutline; + yield return new WaitForSeconds(0.12f); + } + } + + /// + /// 播放子弹消失的特效 + /// + public virtual void PlayDisappearEffect() + { + var effect = ObjectManager.GetPoolItem(ResourcePath.prefab_effect_weapon_BulletDisappear_tscn); + var node = (Node2D)effect; + node.GlobalPosition = AnimatedSprite.GlobalPosition; + node.AddToActivityRoot(RoomLayerEnum.YSortLayer); + effect.PlayEffect(); + } + + protected override void Process(float delta) + { + //距离太大, 自动销毁 + CurrFlyDistance += BulletData.FlySpeed * delta; + if (CurrFlyDistance >= BulletData.MaxDistance) + { + OnMaxDistance(); + } + } + + private void OnArea2dEntered(Area2D other) + { + if (IsDestroyed) + { + return; + } + var activityObject = other.AsActivityObject(); + OnCollisionTarget(activityObject); + } + + public virtual void DoReclaim() + { + ObjectPool.Reclaim(this); + } + + public virtual void OnReclaim() + { + if (OnReclaimEvent != null) + { + OnReclaimEvent(); + } + if (AffiliationArea != null) + { + AffiliationArea.RemoveItem(this); + } + ShowOutline = false; + GetParent().CallDeferred(Node.MethodName.RemoveChild, this); + } + + public virtual void OnLeavePool() + { + MoveController.ClearForce(); + StopAllCoroutine(); + if (OnLeavePoolEvent != null) + { + OnLeavePoolEvent(); + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/normal/BulletAttribute.cs b/DungeonShooting_Godot/src/game/activity/bullet/normal/BulletAttribute.cs new file mode 100644 index 0000000..aa30af1 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/bullet/normal/BulletAttribute.cs @@ -0,0 +1,5 @@ + +public class BulletAttribute +{ + +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/bullet/normal/IBullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/normal/IBullet.cs new file mode 100644 index 0000000..a81f718 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/bullet/normal/IBullet.cs @@ -0,0 +1,32 @@ + +using System; +using Config; + +public interface IBullet : ICoroutine, IPoolItem +{ + /// + /// 当物体被回收时的事件 + /// + event Action OnReclaimEvent; + /// + /// 离开对象池时的事件 + /// + event Action OnLeavePoolEvent; + + /// + /// 攻击的层级 + /// + uint AttackLayer { get; set; } + /// + /// 子弹数据 + /// + BulletData BulletData { get; } + /// + /// 初始化子弹数据 + /// + void InitData(BulletData data, uint attackLayer); + /// + /// 执行子弹回收操作 + /// + void DoReclaim(); +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/package/IPackageItem.cs b/DungeonShooting_Godot/src/game/activity/package/IPackageItem.cs index aca7c9d..93a5774 100644 --- a/DungeonShooting_Godot/src/game/activity/package/IPackageItem.cs +++ b/DungeonShooting_Godot/src/game/activity/package/IPackageItem.cs @@ -1,13 +1,13 @@ /// -/// 可放入背包中的物体接口 +/// 可放入背包中的物体接口,泛型T表示所属角色对象类型 /// -public interface IPackageItem +public interface IPackageItem where T : Role { /// /// 物体所属角色 /// - Role Master { get; set; } + T Master { get; set; } /// /// 物体在背包中的索引, 如果不在背包中则为 -1 diff --git a/DungeonShooting_Godot/src/game/activity/package/Package.cs b/DungeonShooting_Godot/src/game/activity/package/Package.cs index 378f7ef..4dd43dd 100644 --- a/DungeonShooting_Godot/src/game/activity/package/Package.cs +++ b/DungeonShooting_Godot/src/game/activity/package/Package.cs @@ -4,7 +4,7 @@ /// /// 物体背包类 /// -public class Package : Component where T : ActivityObject, IPackageItem +public class Package : Component where T : ActivityObject, IPackageItem where S : Role { /// /// 当前使用对象改变时回调 diff --git a/DungeonShooting_Godot/src/game/activity/prop/Prop.cs b/DungeonShooting_Godot/src/game/activity/prop/Prop.cs index 1e937e9..beb1751 100644 --- a/DungeonShooting_Godot/src/game/activity/prop/Prop.cs +++ b/DungeonShooting_Godot/src/game/activity/prop/Prop.cs @@ -32,7 +32,7 @@ /// 触发扔掉道具效果, 并不会管道具是否在道具背包中 /// /// 触发扔掉该道具的的角色 - public void ThrowProp(Role master) + public void ThrowProp(AdvancedRole master) { ThrowProp(master, master.GlobalPosition); } @@ -47,7 +47,7 @@ //阴影偏移 ShadowOffset = new Vector2(0, 2); GlobalRotation = 0; - var startHeight = -master.MountPoint.Position.Y; + var startHeight = -master.GetCenterPosition().Y; Throw(startPosition, startHeight, 0, Vector2.Zero, 0); //继承role的移动速度 diff --git a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs index ac660c5..aaa78c3 100644 --- a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs +++ b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp.cs @@ -4,7 +4,7 @@ /// /// 主动使用道具 /// -public abstract partial class ActiveProp : Prop, IPackageItem +public abstract partial class ActiveProp : Prop, IPackageItem { public int PackageIndex { get; set; } @@ -131,7 +131,7 @@ { } - protected override void ProcessOver(float delta) + protected override void Process(float delta) { RunUpdate(delta); } @@ -312,5 +312,6 @@ public virtual void OnOverflowItem() { + Master.ThrowActiveProp(PackageIndex); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs index e9f0852..eb4662c 100644 --- a/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs +++ b/DungeonShooting_Godot/src/game/activity/prop/active/ActiveProp5001.cs @@ -16,17 +16,26 @@ public override bool OnCheckUse() { - return Master.WeaponPack.ActiveItem != null && !Master.WeaponPack.ActiveItem.IsAmmoFull(); + if (Master is AdvancedRole advancedRole) + { + return advancedRole.WeaponPack.ActiveItem != null && !advancedRole.WeaponPack.ActiveItem.IsAmmoFull(); + } + + return false; } protected override int OnUse() { - var weapon = Master.WeaponPack.ActiveItem; - if (weapon != null) + if (Master is AdvancedRole advancedRole) { - weapon.SetTotalAmmo(weapon.Attribute.MaxAmmoCapacity); - return 1; + var weapon = advancedRole.WeaponPack.ActiveItem; + if (weapon != null) + { + weapon.SetTotalAmmo(weapon.Attribute.MaxAmmoCapacity); + return 1; + } } + return 0; } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0001.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0001.cs new file mode 100644 index 0000000..50c3417 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0001.cs @@ -0,0 +1,23 @@ + +using Godot; + +/// +/// 移速 buff, 移速 + 3 +/// +[Tool] +public partial class BuffProp0001 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.MoveSpeed += 30; + Master.RoleState.Acceleration += 400; + Master.RoleState.Friction += 300; + } + + public override void OnRemoveItem() + { + 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/BuffProp0002.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0002.cs new file mode 100644 index 0000000..ec3b255 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0002.cs @@ -0,0 +1,20 @@ + +using Godot; + +/// +/// 血量上限buff, 心之容器 + 1 +/// +[Tool] +public partial class BuffProp0002 : BuffProp +{ + public override void OnPickUpItem() + { + Master.MaxHp += 2; + Master.Hp += 2; + } + + public override void OnRemoveItem() + { + Master.MaxHp -= 2; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0003.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0003.cs new file mode 100644 index 0000000..7ecf063 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0003.cs @@ -0,0 +1,20 @@ + +using Godot; + +/// +/// 护盾上限buff, 护盾 + 1 +/// +[Tool] +public partial class BuffProp0003 : BuffProp +{ + public override void OnPickUpItem() + { + Master.MaxShield += 1; + Master.Shield += 1; + } + + public override void OnRemoveItem() + { + Master.MaxShield -= 1; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0004.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0004.cs new file mode 100644 index 0000000..f66ab3b --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0004.cs @@ -0,0 +1,19 @@ + +using Godot; + +/// +/// 护盾恢复时间buff, 恢复时间 - 2.5s +/// +[Tool] +public partial class BuffProp0004 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.ShieldRecoveryTime -= 2.5f; + } + + public override void OnRemoveItem() + { + Master.RoleState.ShieldRecoveryTime += 2.5f; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0005.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0005.cs new file mode 100644 index 0000000..37783e6 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0005.cs @@ -0,0 +1,24 @@ + +using Godot; + +/// +/// 提升伤害buff, 子弹伤害提升20% +/// +[Tool] +public partial class BuffProp0005 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.CalcDamageEvent += CalcDamage; + } + + public override void OnRemoveItem() + { + 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/BuffProp0006.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0006.cs new file mode 100644 index 0000000..8076c29 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0006.cs @@ -0,0 +1,19 @@ + +using Godot; + +/// +/// 延长无敌时间buff, 受伤后无敌时间 + 2s +/// +[Tool] +public partial class BuffProp0006 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.WoundedInvincibleTime += 2f; + } + + public override void OnRemoveItem() + { + Master.RoleState.WoundedInvincibleTime -= 2f; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0007.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0007.cs new file mode 100644 index 0000000..e83b525 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0007.cs @@ -0,0 +1,27 @@ + +using Godot; + +/// +/// 受伤时有15%概率抵消伤害 +/// +[Tool] +public partial class BuffProp0007 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.CalcHurtDamageEvent += CalcHurtDamageEvent; + } + + public override void OnRemoveItem() + { + Master.RoleState.CalcHurtDamageEvent -= CalcHurtDamageEvent; + } + + private void CalcHurtDamageEvent(int originDamage, RefValue refValue) + { + if (refValue.Value > 0 && Utils.Random.RandomBoolean(0.15f)) + { + refValue.Value = 0; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0008.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0008.cs new file mode 100644 index 0000000..e72de6d --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0008.cs @@ -0,0 +1,31 @@ + +using Godot; + +/// +/// 眼镜, 提高武器50%精准度 +/// +[Tool] +public partial class BuffProp0008 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.CalcStartScatteringEvent += CalcStartScatteringEvent; + Master.RoleState.CalcFinalScatteringEvent += CalcFinalScatteringEvent; + } + + public override void OnRemoveItem() + { + 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/BuffProp0009.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0009.cs new file mode 100644 index 0000000..ff94d5f --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0009.cs @@ -0,0 +1,31 @@ + +using Godot; + +/// +/// 高速子弹 子弹速度和射程提升25% +/// +[Tool] +public partial class BuffProp0009 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; + Master.RoleState.CalcBulletDistanceEvent += CalcBulletDistanceEvent; + } + + public override void OnRemoveItem() + { + 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/BuffProp0010.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0010.cs new file mode 100644 index 0000000..3e323e9 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0010.cs @@ -0,0 +1,62 @@ + +using Godot; + +/// +/// 分裂子弹 子弹数量翻倍, 但是精准度, 击退和伤害降低 +/// +[Tool] +public partial class BuffProp0010 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.CalcBulletCountEvent += CalcBulletCountEvent; + Master.RoleState.CalcBulletDeviationAngleEvent += CalcBulletDeviationAngleEvent; + Master.RoleState.CalcDamageEvent += CalcDamageEvent; + Master.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; + Master.RoleState.CalcBulletRepelEvent += CalcBulletRepelEvent; + } + + public override void OnRemoveItem() + { + Master.RoleState.CalcBulletCountEvent -= CalcBulletCountEvent; + Master.RoleState.CalcBulletDeviationAngleEvent -= CalcBulletDeviationAngleEvent; + Master.RoleState.CalcDamageEvent -= CalcDamageEvent; + Master.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent; + Master.RoleState.CalcBulletRepelEvent -= CalcBulletRepelEvent; + } + + private void CalcBulletCountEvent(Weapon weapon, int originCount, RefValue refValue) + { + refValue.Value += originCount; + } + + private void CalcBulletDeviationAngleEvent(Weapon weapon, float originAngle, RefValue refValue) + { + refValue.Value += Utils.Random.RandomRangeFloat(-8, 8); + } + + private void CalcDamageEvent(int originDamage, RefValue refValue) + { + if (refValue.Value <= 0) + { + return; + } + + refValue.Value = Mathf.Max(1, refValue.Value - Mathf.FloorToInt(refValue.Value * 0.35f)); + } + + private void CalcBulletSpeedEvent(Weapon weapon, float originSpeed, RefValue speed) + { + speed.Value += originSpeed * Utils.Random.RandomRangeFloat(-0.05f, 0.05f); + } + + private void CalcBulletRepelEvent(Weapon weapon, float originRepel, RefValue repel) + { + if (weapon.Attribute.IsMelee || repel.Value < 0) + { + return; + } + + repel.Value = Mathf.Max(1, repel.Value - Mathf.FloorToInt(repel.Value * 0.35f)); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0011.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0011.cs new file mode 100644 index 0000000..025eb43 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0011.cs @@ -0,0 +1,24 @@ + +using Godot; + +/// +/// 弹射子弹 子弹反弹次数 +2 +/// +[Tool] +public partial class BuffProp0011 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.CalcBulletBounceCountEvent += CalcBulletBounceCountEvent; + } + + public override void OnRemoveItem() + { + Master.RoleState.CalcBulletBounceCountEvent -= CalcBulletBounceCountEvent; + } + + private void CalcBulletBounceCountEvent(Weapon weapon, int originBounce, RefValue bounce) + { + bounce.Value += 2; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0012.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0012.cs new file mode 100644 index 0000000..bc65ac3 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0012.cs @@ -0,0 +1,24 @@ + +using Godot; + +/// +/// 穿透子弹 子弹穿透+1 +/// +[Tool] +public partial class BuffProp0012 : BuffProp +{ + public override void OnPickUpItem() + { + Master.RoleState.CalcBulletPenetrationEvent += CalcBulletPenetrationEvent; + } + + public override void OnRemoveItem() + { + Master.RoleState.CalcBulletPenetrationEvent -= CalcBulletPenetrationEvent; + } + + private void CalcBulletPenetrationEvent(Weapon weapon, int origin, RefValue penetration) + { + penetration.Value += 1; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0013.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0013.cs new file mode 100644 index 0000000..05e0202 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0013.cs @@ -0,0 +1,24 @@ +using Godot; + +/// +/// 武器背包 武器容量+1 +/// +[Tool] +public partial class BuffProp0013 : BuffProp +{ + public override void OnPickUpItem() + { + if (Master is AdvancedRole advancedRole) + { + advancedRole.WeaponPack.SetCapacity(advancedRole.WeaponPack.Capacity + 1); + } + } + + public override void OnRemoveItem() + { + if (Master is AdvancedRole advancedRole) + { + advancedRole.WeaponPack.SetCapacity(advancedRole.WeaponPack.Capacity - 1); + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0014.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0014.cs new file mode 100644 index 0000000..b09db41 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffProp0014.cs @@ -0,0 +1,18 @@ +using Godot; + +/// +/// 道具背包 道具容量+1 +/// +[Tool] +public partial class BuffProp0014 : BuffProp +{ + public override void OnPickUpItem() + { + Master.ActivePropsPack.SetCapacity(Master.ActivePropsPack.Capacity + 1); + } + + public override void OnRemoveItem() + { + Master.ActivePropsPack.SetCapacity(Master.ActivePropsPack.Capacity - 1); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0001.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0001.cs deleted file mode 100644 index 5ee7937..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0001.cs +++ /dev/null @@ -1,23 +0,0 @@ - -using Godot; - -/// -/// 移速 buff, 移速 + 3 -/// -[Tool] -public partial class BuffPropProp0001 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.MoveSpeed += 30; - Master.RoleState.Acceleration += 400; - Master.RoleState.Friction += 300; - } - - public override void OnRemoveItem() - { - 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/BuffPropProp0002.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0002.cs deleted file mode 100644 index 198ad79..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0002.cs +++ /dev/null @@ -1,20 +0,0 @@ - -using Godot; - -/// -/// 血量上限buff, 心之容器 + 1 -/// -[Tool] -public partial class BuffPropProp0002 : BuffProp -{ - public override void OnPickUpItem() - { - Master.MaxHp += 2; - Master.Hp += 2; - } - - public override void OnRemoveItem() - { - Master.MaxHp -= 2; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0003.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0003.cs deleted file mode 100644 index 64f9fde..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0003.cs +++ /dev/null @@ -1,20 +0,0 @@ - -using Godot; - -/// -/// 护盾上限buff, 护盾 + 1 -/// -[Tool] -public partial class BuffPropProp0003 : BuffProp -{ - public override void OnPickUpItem() - { - Master.MaxShield += 1; - Master.Shield += 1; - } - - public override void OnRemoveItem() - { - Master.MaxShield -= 1; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0004.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0004.cs deleted file mode 100644 index 306ae09..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0004.cs +++ /dev/null @@ -1,19 +0,0 @@ - -using Godot; - -/// -/// 护盾恢复时间buff, 恢复时间 - 1.5s -/// -[Tool] -public partial class BuffPropProp0004 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.ShieldRecoveryTime -= 1.5f; - } - - public override void OnRemoveItem() - { - Master.RoleState.ShieldRecoveryTime += 1.5f; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0005.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0005.cs deleted file mode 100644 index 8beac22..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0005.cs +++ /dev/null @@ -1,24 +0,0 @@ - -using Godot; - -/// -/// 提升伤害buff, 子弹伤害提升20% -/// -[Tool] -public partial class BuffPropProp0005 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcDamageEvent += CalcDamage; - } - - public override void OnRemoveItem() - { - 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/BuffPropProp0006.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0006.cs deleted file mode 100644 index 4c91d6d..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0006.cs +++ /dev/null @@ -1,19 +0,0 @@ - -using Godot; - -/// -/// 延长无敌时间buff, 受伤后无敌时间 + 2s -/// -[Tool] -public partial class BuffPropProp0006 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.WoundedInvincibleTime += 2f; - } - - public override void OnRemoveItem() - { - Master.RoleState.WoundedInvincibleTime -= 2f; - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0007.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0007.cs deleted file mode 100644 index 7c39b5c..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0007.cs +++ /dev/null @@ -1,27 +0,0 @@ - -using Godot; - -/// -/// 受伤时有15%概率抵消伤害 -/// -[Tool] -public partial class BuffPropProp0007 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcHurtDamageEvent += CalcHurtDamageEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcHurtDamageEvent -= CalcHurtDamageEvent; - } - - private void CalcHurtDamageEvent(int originDamage, RefValue refValue) - { - if (refValue.Value > 0 && Utils.Random.RandomBoolean(0.15f)) - { - refValue.Value = 0; - } - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0008.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0008.cs deleted file mode 100644 index 7946f62..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0008.cs +++ /dev/null @@ -1,31 +0,0 @@ - -using Godot; - -/// -/// 眼镜, 提高武器50%精准度 -/// -[Tool] -public partial class BuffPropProp0008 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcStartScatteringEvent += CalcStartScatteringEvent; - Master.RoleState.CalcFinalScatteringEvent += CalcFinalScatteringEvent; - } - - public override void OnRemoveItem() - { - 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/BuffPropProp0009.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0009.cs deleted file mode 100644 index 38b9e45..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0009.cs +++ /dev/null @@ -1,31 +0,0 @@ - -using Godot; - -/// -/// 高速子弹 子弹速度和射程提升25% -/// -[Tool] -public partial class BuffPropProp0009 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; - Master.RoleState.CalcBulletDistanceEvent += CalcBulletDistanceEvent; - } - - public override void OnRemoveItem() - { - 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/BuffPropProp0010.cs b/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0010.cs deleted file mode 100644 index b359f48..0000000 --- a/DungeonShooting_Godot/src/game/activity/prop/buff/BuffPropProp0010.cs +++ /dev/null @@ -1,50 +0,0 @@ - -using Godot; - -/// -/// 分裂子弹 子弹数量翻倍, 但是精准度和伤害降低 -/// -[Tool] -public partial class BuffPropProp0010 : BuffProp -{ - public override void OnPickUpItem() - { - Master.RoleState.CalcBulletCountEvent += CalcBulletCountEvent; - Master.RoleState.CalcBulletDeviationAngleEvent += CalcBulletDeviationAngleEvent; - Master.RoleState.CalcDamageEvent += CalcDamageEvent; - Master.RoleState.CalcBulletSpeedEvent += CalcBulletSpeedEvent; - } - - public override void OnRemoveItem() - { - Master.RoleState.CalcBulletCountEvent -= CalcBulletCountEvent; - Master.RoleState.CalcBulletDeviationAngleEvent -= CalcBulletDeviationAngleEvent; - Master.RoleState.CalcDamageEvent -= CalcDamageEvent; - Master.RoleState.CalcBulletSpeedEvent -= CalcBulletSpeedEvent; - } - - private void CalcBulletCountEvent(Weapon weapon, int originCount, RefValue refValue) - { - refValue.Value += originCount; - } - - private void CalcBulletDeviationAngleEvent(Weapon weapon, float originAngle, RefValue refValue) - { - refValue.Value += Utils.Random.RandomRangeFloat(-8, 8); - } - - private void CalcDamageEvent(int originDamage, RefValue refValue) - { - if (refValue.Value <= 0) - { - return; - } - - refValue.Value = Mathf.Max(1, refValue.Value - Mathf.FloorToInt(originDamage * 0.4f)); - } - - private void CalcBulletSpeedEvent(Weapon weapon, float originSpeed, RefValue speed) - { - speed.Value += originSpeed * Utils.Random.RandomRangeFloat(-0.05f, 0.05f); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/AdvancedRole.cs b/DungeonShooting_Godot/src/game/activity/role/AdvancedRole.cs new file mode 100644 index 0000000..01d64b3 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/AdvancedRole.cs @@ -0,0 +1,430 @@ +using Godot; + +/// +/// 高级角色,可以拾起和使用武器 +/// +public abstract partial class AdvancedRole : Role +{ + /// + /// 角色携带的武器背包 + /// + public Package WeaponPack { get; private set; } + + /// + /// 武器挂载点 + /// + [Export, ExportFillNode] + public MountRotation MountPoint { get; set; } + /// + /// 背后武器的挂载点 + /// + [Export, ExportFillNode] + public Marker2D BackMountPoint { get; set; } + + /// + /// 近战碰撞检测区域 + /// + [Export, ExportFillNode] + public Area2D MeleeAttackArea { get; set; } + + /// + /// 近战碰撞检测区域的碰撞器 + /// + [Export, ExportFillNode] + public CollisionPolygon2D MeleeAttackCollision { get; set; } + + /// + /// 近战攻击时挥动武器的角度 + /// + [Export] + public float MeleeAttackAngle { get; set; } = 120; + + /// + /// 武器挂载点是否始终指向目标 + /// + public bool MountLookTarget { get; set; } = true; + + /// + /// 是否处于近战攻击中 + /// + public bool IsMeleeAttack { get; private set; } + + /// + /// 当前角色所看向的对象, 也就是枪口指向的对象 + /// + public ActivityObject LookTarget { get; set; } + + //近战计时器 + private float _meleeAttackTimer = 0; + + /// + /// 当拾起某个武器时调用 + /// + protected virtual void OnPickUpWeapon(Weapon weapon) + { + } + + /// + /// 当扔掉某个武器时调用 + /// + protected virtual void OnThrowWeapon(Weapon weapon) + { + } + + /// + /// 当切换到某个武器时调用 + /// + protected virtual void OnExchangeWeapon(Weapon weapon) + { + } + + public override void OnInit() + { + base.OnInit(); + WeaponPack = AddComponent>(); + WeaponPack.SetCapacity(4); + + MountPoint.Master = this; + + MeleeAttackCollision.Disabled = true; + //切换武器回调 + WeaponPack.ChangeActiveItemEvent += OnChangeActiveItem; + //近战区域进入物体 + MeleeAttackArea.BodyEntered += OnMeleeAttackBodyEntered; + } + + protected override void Process(float delta) + { + if (IsDie) + { + return; + } + + if (_meleeAttackTimer > 0) + { + _meleeAttackTimer -= delta; + } + + //看向目标 + if (LookTarget != null && MountLookTarget) + { + var pos = LookTarget.Position; + //脸的朝向 + var gPos = Position; + 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); + } + + base.Process(delta); + } + + /// + /// 当武器放到后背时调用, 用于设置武器位置和角度 + /// + /// 武器实例 + /// 放入武器背包的位置 + 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(AffiliationArea prevArea) + { + //身上的武器的所属区域也得跟着变 + WeaponPack.ForEach((weapon, i) => + { + if (AffiliationArea != null) + { + AffiliationArea.InsertItem(weapon); + } + else if (weapon.AffiliationArea != null) + { + weapon.AffiliationArea.RemoveItem(weapon); + } + }); + } + + public override Vector2 GetCenterPosition() + { + return MountPoint.GlobalPosition; + } + + public override void LookTargetPosition(Vector2 pos) + { + LookTarget = null; + if (MountLookTarget) + { + //脸的朝向 + 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 IsAllWeaponTotalAmmoEmpty() + { + foreach (var weapon in WeaponPack.ItemSlot) + { + if (weapon != null && !weapon.IsTotalAmmoEmpty()) + { + return false; + } + } + + return true; + } + + //------------------------------------------------------------------------------------- + + /// + /// 拾起一个武器, 返回是否成功拾起, 如果不想立刻切换到该武器, exchange 请传 false + /// + /// 武器对象 + /// 是否立即切换到该武器, 默认 true + public bool PickUpWeapon(Weapon weapon, bool exchange = true) + { + if (WeaponPack.PickupItem(weapon, exchange) != -1) + { + //从可互动队列中移除 + InteractiveItemList.Remove(weapon); + OnPickUpWeapon(weapon); + return true; + } + + return false; + } + + /// + /// 切换到下一个武器 + /// + public void ExchangeNextWeapon() + { + var weapon = WeaponPack.ActiveItem; + WeaponPack.ExchangeNext(); + if (WeaponPack.ActiveItem != weapon) + { + OnExchangeWeapon(WeaponPack.ActiveItem); + } + } + + /// + /// 切换到上一个武器 + /// + public void ExchangePrevWeapon() + { + var weapon = WeaponPack.ActiveItem; + WeaponPack.ExchangePrev(); + if (WeaponPack.ActiveItem != weapon) + { + OnExchangeWeapon(WeaponPack.ActiveItem); + } + } + + /// + /// 扔掉当前使用的武器, 切换到上一个武器 + /// + public void ThrowWeapon() + { + ThrowWeapon(WeaponPack.ActiveIndex); + } + + /// + /// 扔掉指定位置的武器 + /// + /// 武器在武器背包中的位置 + public void ThrowWeapon(int index) + { + var weapon = WeaponPack.GetItem(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); + WeaponPack.RemoveItem(index); + //播放抛出效果 + weapon.ThrowWeapon(this, GlobalPosition); + } + + /// + /// 切换到下一个武器 + /// + public void ExchangeNextActiveProp() + { + var prop = ActivePropsPack.ActiveItem; + ActivePropsPack.ExchangeNext(); + if (prop != ActivePropsPack.ActiveItem) + { + OnExchangeActiveProp(ActivePropsPack.ActiveItem); + } + } + + /// + /// 切换到上一个武器 + /// + public void ExchangePrevActiveProp() + { + var prop = ActivePropsPack.ActiveItem; + ActivePropsPack.ExchangePrev(); + if (prop != ActivePropsPack.ActiveItem) + { + OnExchangeActiveProp(ActivePropsPack.ActiveItem); + } + } + + //------------------------------------------------------------------------------------- + + + /// + /// 触发换弹 + /// + public virtual void Reload() + { + if (WeaponPack.ActiveItem != null) + { + WeaponPack.ActiveItem.Reload(); + } + } + + public override void Attack() + { + if (!IsMeleeAttack && WeaponPack.ActiveItem != null) + { + WeaponPack.ActiveItem.Trigger(this); + } + } + + /// + /// 触发近战攻击 + /// + public virtual void MeleeAttack() + { + if (IsMeleeAttack || _meleeAttackTimer > 0) + { + return; + } + + if (WeaponPack.ActiveItem != null && WeaponPack.ActiveItem.Attribute.CanMeleeAttack) + { + IsMeleeAttack = true; + _meleeAttackTimer = RoleState.MeleeAttackTime; + MountLookTarget = false; + + //WeaponPack.ActiveItem.TriggerMeleeAttack(this); + //播放近战动画 + PlayAnimation_MeleeAttack(() => + { + MountLookTarget = true; + IsMeleeAttack = false; + }); + } + } + + /// + /// 切换当前使用的武器的回调 + /// + private void OnChangeActiveItem(Weapon weapon) + { + //这里处理近战区域 + if (weapon != null) + { + MeleeAttackCollision.Polygon = Utils.CreateSectorPolygon( + Utils.ConvertAngle(-MeleeAttackAngle / 2f), + (weapon.GetLocalFirePosition() - weapon.GripPoint.Position).Length() * 1.2f, + MeleeAttackAngle, + 6 + ); + MeleeAttackArea.CollisionMask = AttackLayer | PhysicsLayer.Bullet; + } + } + + /// + /// 近战区域碰到敌人 + /// + private void OnMeleeAttackBodyEntered(Node2D body) + { + var activeWeapon = WeaponPack.ActiveItem; + if (activeWeapon == null) + { + return; + } + var activityObject = body.AsActivityObject(); + if (activityObject != null) + { + if (activityObject is AdvancedRole role) //攻击角色 + { + var damage = Utils.Random.RandomConfigRange(activeWeapon.Attribute.MeleeAttackHarmRange); + damage = RoleState.CalcDamage(damage); + + //击退 + if (role is not Player) //目标不是玩家才会触发击退 + { + var attr = IsAi ? activeWeapon.AiUseAttribute : activeWeapon.PlayerUseAttribute; + var repel = Utils.Random.RandomConfigRange(attr.MeleeAttackRepelRange); + var position = role.GlobalPosition - MountPoint.GlobalPosition; + var v2 = position.Normalized() * repel; + role.MoveController.AddForce(v2); + } + + role.CallDeferred(nameof(Hurt), damage, (role.GetCenterPosition() - GlobalPosition).Angle()); + } + else if (activityObject is Bullet bullet) //攻击子弹 + { + var attackLayer = bullet.AttackLayer; + if (CollisionWithMask(attackLayer)) //是攻击玩家的子弹 + { + bullet.PlayDisappearEffect(); + bullet.Destroy(); + } + } + } + } + + protected override void OnDestroy() + { + base.OnDestroy(); + WeaponPack.Destroy(); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/AdvancedRole_Animation.cs b/DungeonShooting_Godot/src/game/activity/role/AdvancedRole_Animation.cs new file mode 100644 index 0000000..e829a1f --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/AdvancedRole_Animation.cs @@ -0,0 +1,78 @@ + +using System; +using Godot; +using Vector2 = Godot.Vector2; + +public partial class AdvancedRole +{ + /// + /// 播放近战攻击动画 + /// + public virtual void PlayAnimation_MeleeAttack(Action finish) + { + var r = MountPoint.RotationDegrees; + //var gp = MountPoint.GlobalPosition; + var p1 = MountPoint.Position; + var p2 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r - MeleeAttackAngle / 2f)); + var p3 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r + MeleeAttackAngle / 2f)); + + var tween = CreateTween(); + tween.SetParallel(); + + tween.TweenProperty(MountPoint, "rotation_degrees", r - MeleeAttackAngle / 2f, 0.1); + tween.TweenProperty(MountPoint, "position", p2, 0.1); + tween.TweenProperty(MountPoint, "position", p2, 0.1); + tween.Chain(); + + tween.TweenCallback(Callable.From(() => + { + MountPoint.RotationDegrees = r + MeleeAttackAngle / 2f; + MountPoint.Position = p3; + //重新计算武器阴影位置 + var activeItem = WeaponPack.ActiveItem; + activeItem.CalcShadowTransform(); + //创建屏幕抖动 + if (Face == FaceDirection.Right) + { + //GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(r - 90)) * 5); + GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(r - 180)) * 6); + } + else + { + //GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(270 - r)) * 5); + GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(-r)) * 6); + } + //播放特效 + var effect = ObjectManager.GetPoolItem(ResourcePath.prefab_effect_weapon_MeleeAttack1_tscn); + var sprite = (Node2D)effect; + var localFirePosition = activeItem.GetLocalFirePosition() - activeItem.GripPoint.Position; + localFirePosition *= 0.9f; + sprite.Position = p1 + localFirePosition.Rotated(Mathf.DegToRad(r)); + sprite.RotationDegrees = r; + AddChild(sprite); + effect.PlayEffect(); + + //启用近战碰撞区域 + MeleeAttackCollision.Disabled = false; + })); + tween.Chain(); + + tween.TweenInterval(0.1f); + tween.Chain(); + + tween.TweenCallback(Callable.From(() => + { + //关闭近战碰撞区域 + MeleeAttackCollision.Disabled = true; + })); + tween.TweenProperty(MountPoint, "rotation_degrees", r, 0.2); + tween.TweenProperty(MountPoint, "position", p1, 0.2); + tween.Chain(); + + tween.TweenCallback(Callable.From(() => + { + finish(); + })); + tween.Play(); + } +} \ 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 index e265b10..eca09e9 100644 --- a/DungeonShooting_Godot/src/game/activity/role/MountRotation.cs +++ b/DungeonShooting_Godot/src/game/activity/role/MountRotation.cs @@ -15,7 +15,7 @@ /// /// 所在的角色 /// - public Role Master { get; set; } + public AdvancedRole Master { get; set; } /// /// 当前节点真实的旋转角度, 角度制 diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index 7269052..0fda986 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -1,3 +1,4 @@ + using System.Collections; using System.Collections.Generic; using Godot; @@ -20,7 +21,7 @@ /// /// 默认攻击对象层级 /// - public const uint DefaultAttackLayer = PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Wall | PhysicsLayer.Prop; + public const uint DefaultAttackLayer = PhysicsLayer.Player | PhysicsLayer.Enemy | PhysicsLayer.Wall; /// /// 伤害区域 @@ -57,24 +58,8 @@ /// /// 携带的主动道具包裹 /// - public Package ActivePropsPack { get; private set; } - - /// - /// 角色携带的武器背包 - /// - public Package WeaponPack { get; private set; } - - /// - /// 武器挂载点 - /// - [Export, ExportFillNode] - public MountRotation MountPoint { get; set; } - /// - /// 背后武器的挂载点 - /// - [Export, ExportFillNode] - public Marker2D BackMountPoint { get; set; } - + public Package ActivePropsPack { get; private set; } + /// /// 互动碰撞区域 /// @@ -87,30 +72,7 @@ [Export, ExportFillNode] public CollisionShape2D InteractiveCollision { get; set; } - /// - /// 近战碰撞检测区域 - /// - [Export, ExportFillNode] - public Area2D MeleeAttackArea { get; set; } - - /// - /// 近战碰撞检测区域的碰撞器 - /// - [Export, ExportFillNode] - public CollisionPolygon2D MeleeAttackCollision { get; set; } - - /// - /// 近战攻击时挥动武器的角度 - /// - [Export] - public float MeleeAttackAngle { get; set; } = 120; - - /// - /// 武器挂载点是否始终指向目标 - /// - public bool MountLookTarget { get; set; } = true; - - /// + /// /// 脸的朝向 /// public FaceDirection Face { get => _face; set => SetFace(value); } @@ -241,36 +203,22 @@ private bool _invincible = false; /// - /// 当前角色所看向的对象, 也就是枪口指向的对象 - /// - public ActivityObject LookTarget { get; set; } - - /// /// 当前可以互动的物体 /// public ActivityObject InteractiveItem { get; private set; } - - /// - /// 是否可以翻滚 - /// - public bool CanRoll => _rollCoolingTimer <= 0; - - /// - /// 是否处于近战攻击中 - /// - public bool IsMeleeAttack { get; private set; } - + /// /// 瞄准辅助线, 需要手动调用 InitSubLine() 初始化 /// public SubLine SubLine { get; private set; } - //翻滚冷却计时器 - private float _rollCoolingTimer = 0; + /// + /// 所有角色碰撞的物体 + /// + public List InteractiveItemList { get; } = new List(); + //初始缩放 private Vector2 _startScale; - //所有角色碰撞的物体 - private readonly List _interactiveItemList = new List(); //当前可互动的物体 private CheckInteractiveResult _currentResultData; private uint _currentLayer; @@ -282,9 +230,8 @@ private long _invincibleFlashingId = -1; //护盾恢复计时器 private float _shieldRecoveryTimer = 0; - //近战计时器 - private float _meleeAttackTimer = 0; + /// /// 当血量改变时调用 /// @@ -353,28 +300,8 @@ protected virtual void OnDie() { } - - /// - /// 当拾起某个武器时调用 - /// - protected virtual void OnPickUpWeapon(Weapon weapon) - { - } - /// - /// 当扔掉某个武器时调用 - /// - protected virtual void OnThrowWeapon(Weapon weapon) - { - } - - /// - /// 当切换到某个武器时调用 - /// - protected virtual void OnExchangeWeapon(Weapon weapon) - { - } - + /// /// 当拾起某个主动道具时调用 /// @@ -409,16 +336,21 @@ protected virtual void OnRemoveBuffProp(BuffProp buffProp) { } - + + + /// + /// 触发攻击 + /// + public virtual void Attack() + { + } + public override void OnInit() { - ActivePropsPack = AddComponent>(); + ActivePropsPack = AddComponent>(); ActivePropsPack.SetCapacity(1); - WeaponPack = AddComponent>(); - WeaponPack.SetCapacity(4); - + _startScale = Scale; - MountPoint.Master = this; HurtArea.CollisionLayer = CollisionLayer; HurtArea.CollisionMask = 0; @@ -429,54 +361,20 @@ //连接互动物体信号 InteractiveArea.BodyEntered += _OnPropsEnter; InteractiveArea.BodyExited += _OnPropsExit; - - MeleeAttackCollision.Disabled = true; - //切换武器回调 - WeaponPack.ChangeActiveItemEvent += OnChangeActiveItem; - //近战区域进入物体 - MeleeAttackArea.BodyEntered += OnMeleeAttackBodyEntered; } protected override void Process(float delta) - { - if (_rollCoolingTimer > 0) - { - _rollCoolingTimer -= delta; - } - - if (_meleeAttackTimer > 0) - { - _meleeAttackTimer -= delta; - } - - //看向目标 - if (LookTarget != null && MountLookTarget) - { - 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++) + for (int i = 0; i < InteractiveItemList.Count; i++) { - var item = _interactiveItemList[i]; + var item = InteractiveItemList[i]; if (item == null || item.IsDestroyed) { - _interactiveItemList.RemoveAt(i--); + InteractiveItemList.RemoveAt(i--); } - else + else if (!item.IsThrowing) { //找到可互动的物体了 if (!findFlag) @@ -562,16 +460,21 @@ } //主动道具调用更新 - var props = (Prop[])ActivePropsPack.ItemSlot.Clone(); - foreach (var prop in props) + var props = ActivePropsPack.ItemSlot; + if (props.Length > 0) { - if (prop != null && !prop.IsDestroyed) + props = (ActiveProp[])props.Clone(); + foreach (var prop in props) { - prop.PackProcess(delta); + if (prop != null && !prop.IsDestroyed) + { + prop.PackProcess(delta); + } } } + } - + /// /// 初始化瞄准辅助线 /// @@ -585,50 +488,7 @@ SubLine = AddComponent(); } - /// - /// 当武器放到后背时调用, 用于设置武器位置和角度 - /// - /// 武器实例 - /// 放入武器背包的位置 - 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(AffiliationArea prevArea) - { - //身上的武器的所属区域也得跟着变 - WeaponPack.ForEach((weapon, i) => - { - if (AffiliationArea != null) - { - AffiliationArea.InsertItem(weapon); - } - else if (weapon.AffiliationArea != null) - { - weapon.AffiliationArea.RemoveItem(weapon); - } - }); - } - /// /// 是否是满血 /// @@ -640,32 +500,25 @@ /// /// 获取当前角色的中心点坐标 /// - public Vector2 GetCenterPosition() + public virtual Vector2 GetCenterPosition() { - return MountPoint.GlobalPosition; + return AnimatedSprite.GlobalPosition; } - + /// - /// 使角色看向指定的坐标, - /// 注意, 调用该函数会清空 LookTarget, 因为拥有 LookTarget 时也会每帧更新玩家视野位置 + /// 使角色看向指定的坐标的方向 /// - public void LookTargetPosition(Vector2 pos) + public virtual void LookTargetPosition(Vector2 pos) { - LookTarget = null; - if (MountLookTarget) + //脸的朝向 + var gPos = GlobalPosition; + if (pos.X > gPos.X && Face == FaceDirection.Left) { - //脸的朝向 - 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); + Face = FaceDirection.Right; + } + else if (pos.X < gPos.X && Face == FaceDirection.Right) + { + Face = FaceDirection.Left; } } @@ -678,101 +531,9 @@ return (Face == FaceDirection.Left && pos.X <= gps.X) || (Face == FaceDirection.Right && pos.X >= gps.X); } - - /// - /// 返回所有武器是否弹药都打光了 - /// - public bool IsAllWeaponTotalAmmoEmpty() - { - foreach (var weapon in WeaponPack.ItemSlot) - { - if (weapon != null && !weapon.IsTotalAmmoEmpty()) - { - return false; - } - } - - return true; - } - //------------------------------------------------------------------------------------- /// - /// 拾起一个武器, 返回是否成功拾起, 如果不想立刻切换到该武器, exchange 请传 false - /// - /// 武器对象 - /// 是否立即切换到该武器, 默认 true - public bool PickUpWeapon(Weapon weapon, bool exchange = true) - { - if (WeaponPack.PickupItem(weapon, exchange) != -1) - { - //从可互动队列中移除 - _interactiveItemList.Remove(weapon); - OnPickUpWeapon(weapon); - return true; - } - - return false; - } - - /// - /// 切换到下一个武器 - /// - public void ExchangeNextWeapon() - { - var weapon = WeaponPack.ActiveItem; - WeaponPack.ExchangeNext(); - if (WeaponPack.ActiveItem != weapon) - { - OnExchangeWeapon(WeaponPack.ActiveItem); - } - } - - /// - /// 切换到上一个武器 - /// - public void ExchangePrevWeapon() - { - var weapon = WeaponPack.ActiveItem; - WeaponPack.ExchangePrev(); - if (WeaponPack.ActiveItem != weapon) - { - OnExchangeWeapon(WeaponPack.ActiveItem); - } - } - - /// - /// 扔掉当前使用的武器, 切换到上一个武器 - /// - public void ThrowWeapon() - { - ThrowWeapon(WeaponPack.ActiveIndex); - } - - /// - /// 扔掉指定位置的武器 - /// - /// 武器在武器背包中的位置 - public void ThrowWeapon(int index) - { - var weapon = WeaponPack.GetItem(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); - WeaponPack.RemoveItem(index); - //播放抛出效果 - weapon.ThrowWeapon(this, GlobalPosition); - } - - /// /// 拾起主动道具, 返回是否成功拾起, 如果不想立刻切换到该道具, exchange 请传 false /// /// 主动道具对象 @@ -782,7 +543,7 @@ if (ActivePropsPack.PickupItem(activeProp, exchange) != -1) { //从可互动队列中移除 - _interactiveItemList.Remove(activeProp); + InteractiveItemList.Remove(activeProp); OnPickUpActiveProp(activeProp); return true; } @@ -791,32 +552,6 @@ } /// - /// 切换到下一个武器 - /// - public void ExchangeNextActiveProp() - { - var prop = ActivePropsPack.ActiveItem; - ActivePropsPack.ExchangeNext(); - if (prop != ActivePropsPack.ActiveItem) - { - OnExchangeActiveProp(ActivePropsPack.ActiveItem); - } - } - - /// - /// 切换到上一个武器 - /// - public void ExchangePrevActiveProp() - { - var prop = ActivePropsPack.ActiveItem; - ActivePropsPack.ExchangePrev(); - if (prop != ActivePropsPack.ActiveItem) - { - OnExchangeActiveProp(ActivePropsPack.ActiveItem); - } - } - - /// /// 扔掉当前使用的道具 /// public void ThrowActiveProp() @@ -893,8 +628,7 @@ //播放抛出效果 buffProp.ThrowProp(this, GlobalPosition); } - - //------------------------------------------------------------------------------------- + /// /// 返回是否存在可互动的物体 @@ -918,55 +652,8 @@ return null; } - - /// - /// 触发换弹 - /// - public virtual void Reload() - { - if (WeaponPack.ActiveItem != null) - { - WeaponPack.ActiveItem.Reload(); - } - } - - /// - /// 触发攻击 - /// - public virtual void Attack() - { - if (!IsMeleeAttack && WeaponPack.ActiveItem != null) - { - WeaponPack.ActiveItem.Trigger(this); - } - } - - /// - /// 触发近战攻击 - /// - public virtual void MeleeAttack() - { - if (IsMeleeAttack || _meleeAttackTimer > 0) - { - return; - } - - if (WeaponPack.ActiveItem != null && WeaponPack.ActiveItem.Attribute.CanMeleeAttack) - { - IsMeleeAttack = true; - _meleeAttackTimer = RoleState.MeleeAttackTime; - MountLookTarget = false; - - //WeaponPack.ActiveItem.TriggerMeleeAttack(this); - //播放近战动画 - PlayAnimation_MeleeAttack(() => - { - MountLookTarget = true; - IsMeleeAttack = false; - }); - } - } - + + /// /// 触发使用道具 /// @@ -983,7 +670,7 @@ /// 受到伤害, 如果是在碰撞信号处理函数中调用该函数, 请使用 CallDeferred 来延时调用, 否则很有可能导致报错 /// /// 伤害的量 - /// 角度 + /// 伤害角度(弧度制) public virtual void Hurt(int damage, float angle) { //受伤闪烁, 无敌状态 @@ -1001,7 +688,7 @@ } else { - damage = RoleState.CallCalcHurtDamageEvent(damage); + damage = RoleState.CalcHurtDamage(damage); if (damage > 0) { Hp -= damage; @@ -1094,9 +781,9 @@ { if (other is ActivityObject propObject && !propObject.CollisionWithMask(PhysicsLayer.OnHand)) { - if (!_interactiveItemList.Contains(propObject)) + if (!InteractiveItemList.Contains(propObject)) { - _interactiveItemList.Add(propObject); + InteractiveItemList.Add(propObject); } } } @@ -1109,9 +796,9 @@ { if (other is ActivityObject propObject) { - if (_interactiveItemList.Contains(propObject)) + if (InteractiveItemList.Contains(propObject)) { - _interactiveItemList.Remove(propObject); + InteractiveItemList.Remove(propObject); } if (InteractiveItem == propObject) { @@ -1122,87 +809,8 @@ } } } - - /// - /// 切换当前使用的武器的回调 - /// - private void OnChangeActiveItem(Weapon weapon) - { - //这里处理近战区域 - if (weapon != null) - { - MeleeAttackCollision.Polygon = Utils.CreateSectorPolygon( - Utils.ConvertAngle(-MeleeAttackAngle / 2f), - (weapon.GetLocalFirePosition() - weapon.GripPoint.Position).Length() * 1.2f, - MeleeAttackAngle, - 6 - ); - MeleeAttackArea.CollisionMask = AttackLayer | PhysicsLayer.Bullet; - } - } - - /// - /// 近战区域碰到敌人 - /// - private void OnMeleeAttackBodyEntered(Node2D body) - { - var activeWeapon = WeaponPack.ActiveItem; - if (activeWeapon == null) - { - return; - } - var activityObject = body.AsActivityObject(); - if (activityObject != null) - { - if (activityObject is Role role) //攻击角色 - { - var damage = Utils.Random.RandomConfigRange(activeWeapon.Attribute.MeleeAttackHarmRange); - damage = RoleState.CallCalcDamageEvent(damage); - - //击退 - if (role is not Player) //目标不是玩家才会触发击退 - { - var attr = IsAi ? activeWeapon.AiUseAttribute : activeWeapon.PlayerUseAttribute; - var repel = Utils.Random.RandomConfigRange(attr.MeleeAttackRepelRnage); - var position = role.GlobalPosition - MountPoint.GlobalPosition; - var v2 = position.Normalized() * repel; - role.MoveController.AddForce(v2, repel * 2); - } - - role.CallDeferred(nameof(Hurt), damage, (role.GetCenterPosition() - GlobalPosition).Angle()); - } - else if (activityObject is Bullet bullet) //攻击子弹 - { - var attackLayer = bullet.AttackLayer; - if (CollisionWithMask(attackLayer)) //是攻击玩家的子弹 - { - bullet.PlayDisappearEffect(); - bullet.Destroy(); - } - } - } - } - - protected override void OnDestroy() - { - //销毁道具 - foreach (var buffProp in BuffPropPack) - { - buffProp.Destroy(); - } - BuffPropPack.Clear(); - ActivePropsPack.Destroy(); - WeaponPack.Destroy(); - } - - /// - /// 翻滚结束 - /// - public void OverRoll() - { - _rollCoolingTimer = RoleState.RollTime; - } - + + /// /// 返回当前角色是否是玩家 /// @@ -1233,4 +841,15 @@ return Mathf.Pi - rotation; } + + protected override void OnDestroy() + { + //销毁道具 + foreach (var buffProp in BuffPropPack) + { + buffProp.Destroy(); + } + BuffPropPack.Clear(); + ActivePropsPack.Destroy(); + } } \ 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 index c2c629b..7344daf 100644 --- a/DungeonShooting_Godot/src/game/activity/role/RoleState.cs +++ b/DungeonShooting_Godot/src/game/activity/role/RoleState.cs @@ -55,7 +55,7 @@ /// 攻击/发射后计算伤害 /// public event Action> CalcDamageEvent; - public int CallCalcDamageEvent(int damage) + public int CalcDamage(int damage) { if (CalcDamageEvent != null) { @@ -71,7 +71,7 @@ /// 受伤后计算受到的伤害 /// public event Action> CalcHurtDamageEvent; - public int CallCalcHurtDamageEvent(int damage) + public int CalcHurtDamage(int damage) { if (CalcHurtDamageEvent != null) { @@ -87,7 +87,7 @@ /// 武器初始散射值增量 /// public event Action> CalcStartScatteringEvent; - public float CallCalcStartScatteringEvent(Weapon weapon, float value) + public float CalcStartScattering(Weapon weapon, float value) { if (CalcStartScatteringEvent != null) { @@ -103,7 +103,7 @@ /// 武器最终散射值增量 /// public event Action> CalcFinalScatteringEvent; - public float CallCalcFinalScatteringEvent(Weapon weapon, float value) + public float CalcFinalScattering(Weapon weapon, float value) { if (CalcFinalScatteringEvent != null) { @@ -119,7 +119,7 @@ /// 武器开火发射子弹数量 ///
public event Action> CalcBulletCountEvent; - public int CallCalcBulletCountEvent(Weapon weapon, int count) + public int CalcBulletCount(Weapon weapon, int count) { if (CalcBulletCountEvent != null) { @@ -135,7 +135,7 @@ /// 子弹偏移角度, 角度制 ///
public event Action> CalcBulletDeviationAngleEvent; - public float CallCalcBulletDeviationAngleEvent(Weapon weapon, float angle) + public float CalcBulletDeviationAngle(Weapon weapon, float angle) { if (CalcBulletDeviationAngleEvent != null) { @@ -151,7 +151,7 @@ /// 子弹速度 /// public event Action> CalcBulletSpeedEvent; - public float CallCalcBulletSpeedEvent(Weapon weapon, float speed) + public float CalcBulletSpeed(Weapon weapon, float speed) { if (CalcBulletSpeedEvent != null) { @@ -167,7 +167,7 @@ /// 子弹射程 /// public event Action> CalcBulletDistanceEvent; - public float CallCalcBulletDistanceEvent(Weapon weapon, float distance) + public float CalcBulletDistance(Weapon weapon, float distance) { if (CalcBulletDistanceEvent != null) { @@ -178,4 +178,52 @@ return distance; } + + /// + /// 子弹击退 + /// + public event Action> CalcBulletRepelEvent; + public float CalcBulletRepel(Weapon weapon, float distance) + { + if (CalcBulletRepelEvent != null) + { + var result = new RefValue(distance); + CalcBulletRepelEvent(weapon, distance, result); + return result.Value; + } + + return distance; + } + + /// + /// 子弹反弹次数 + /// + public event Action> CalcBulletBounceCountEvent; + public int CalcBulletBounceCount(Weapon weapon, int distance) + { + if (CalcBulletBounceCountEvent != null) + { + var result = new RefValue(distance); + CalcBulletBounceCountEvent(weapon, distance, result); + return result.Value; + } + + return distance; + } + + /// + /// 子弹穿透次数 + /// + public event Action> CalcBulletPenetrationEvent; + public int CalcBulletPenetration(Weapon weapon, int distance) + { + if (CalcBulletPenetrationEvent != null) + { + var result = new RefValue(distance); + CalcBulletPenetrationEvent(weapon, distance, result); + return result.Value; + } + + return distance; + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs b/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs deleted file mode 100644 index 8de62e5..0000000 --- a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs +++ /dev/null @@ -1,76 +0,0 @@ - -using System; -using Godot; -using Vector2 = Godot.Vector2; - -public partial class Role -{ - /// - /// 播放近战攻击动画 - /// - public virtual void PlayAnimation_MeleeAttack(Action finish) - { - var r = MountPoint.RotationDegrees; - //var gp = MountPoint.GlobalPosition; - var p1 = MountPoint.Position; - var p2 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r - MeleeAttackAngle / 2f)); - var p3 = p1 + new Vector2(6, 0).Rotated(Mathf.DegToRad(r + MeleeAttackAngle / 2f)); - - var tween = CreateTween(); - tween.SetParallel(); - - tween.TweenProperty(MountPoint, "rotation_degrees", r - MeleeAttackAngle / 2f, 0.1); - tween.TweenProperty(MountPoint, "position", p2, 0.1); - tween.TweenProperty(MountPoint, "position", p2, 0.1); - tween.Chain(); - - tween.TweenCallback(Callable.From(() => - { - MountPoint.RotationDegrees = r + MeleeAttackAngle / 2f; - MountPoint.Position = p3; - //重新计算武器阴影位置 - var activeItem = WeaponPack.ActiveItem; - activeItem.CalcShadowTransform(); - //创建屏幕抖动 - if (Face == FaceDirection.Right) - { - //GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(r - 90)) * 5); - GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(r - 180)) * 6); - } - else - { - //GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(270 - r)) * 5); - GameCamera.Main.DirectionalShake(Vector2.FromAngle(Mathf.DegToRad(-r)) * 6); - } - //播放特效 - var sprite = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_effect_weapon_MeleeAttack1_tscn); - var localFirePosition = activeItem.GetLocalFirePosition() - activeItem.GripPoint.Position; - localFirePosition *= 0.9f; - sprite.Position = p1 + localFirePosition.Rotated(Mathf.DegToRad(r)); - sprite.RotationDegrees = r; - AddChild(sprite); - - //启用近战碰撞区域 - MeleeAttackCollision.Disabled = false; - })); - tween.Chain(); - - tween.TweenInterval(0.1f); - tween.Chain(); - - tween.TweenCallback(Callable.From(() => - { - //关闭近战碰撞区域 - MeleeAttackCollision.Disabled = true; - })); - tween.TweenProperty(MountPoint, "rotation_degrees", r, 0.2); - tween.TweenProperty(MountPoint, "position", p1, 0.2); - tween.Chain(); - - tween.TweenCallback(Callable.From(() => - { - finish(); - })); - tween.Play(); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/SubLine.cs b/DungeonShooting_Godot/src/game/activity/role/SubLine.cs index 33bd409..03039ac 100644 --- a/DungeonShooting_Godot/src/game/activity/role/SubLine.cs +++ b/DungeonShooting_Godot/src/game/activity/role/SubLine.cs @@ -5,7 +5,7 @@ /// /// 瞄准辅助线 /// -public class SubLine : Component +public class SubLine : Component { /// /// 是否正在播放警告闪烁动画 @@ -115,7 +115,7 @@ StopCoroutine(_cid); _cid = 0; } - _range = Utils.GetConfigRangeEnd(weapon.Attribute.BulletDistanceRange); + _range = Utils.GetConfigRangeEnd(weapon.Attribute.Bullet.DistanceRange); _line2D.DefaultColor = _color; } } diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/AIStateEnum.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/AIStateEnum.cs new file mode 100644 index 0000000..05dbbc5 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/AIStateEnum.cs @@ -0,0 +1,36 @@ + +public enum AiStateEnum +{ + /// + /// Ai 状态, 正常, 未发现目标 + /// + AiNormal, + // /// + // /// 发现目标, 但不知道在哪 + // /// + // AiProbe, + /// + /// 找到玩家,准备通知其他敌人 + /// + AiFind, + /// + /// 收到其他敌人通知, 前往发现目标的位置 + /// + AiLeaveFor, + /// + /// 发现目标, 目标不在视野内, 但是知道位置 + /// + AiTailAfter, + /// + /// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 + /// + AiFollowUp, + /// + /// 距离足够近, 在目标附近随机移动 + /// + AiSurround, + /// + /// Ai 寻找弹药 + /// + AiFindAmmo, +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/AdvancedEnemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/AdvancedEnemy.cs new file mode 100644 index 0000000..46b5c5c --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/AdvancedEnemy.cs @@ -0,0 +1,509 @@ +#region 基础敌人设计思路 +/* +敌人有三种状态: +状态1: 未发现玩家, 视野不可穿墙, 该状态下敌人移动比较规律, 移动速度较慢, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3, 该房间的敌人不能再回到状态1 +状态2: 发现有玩家, 但不知道在哪, 视野不可穿墙, 该情况下敌人移动速度明显加快, 移动不规律, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3 +状态3: 明确知道玩家的位置, 视野允许穿墙, 移动速度与状态2一致, 进入该状态时, 敌人之间会相互告知玩家所在位置, 并朝着玩家位置开火, + 如果有墙格挡, 则有一定概率继续开火, 一旦玩家立刻敌人视野超哥一段时间, 敌人自动切换为状态2 + +敌人状态1只存在于少数房间内, 比如特殊房间, 大部分情况下敌人应该是状态2, 或者玩家进入房间时就被敌人发现 +*/ +#endregion + + +using System; +using AdvancedState; +using Godot; + +/// +/// 高级敌人,可以携带武器 +/// +[Tool] +public partial class AdvancedEnemy : AdvancedRole +{ + /// + /// 目标是否在视野内 + /// + public bool TargetInView { get; set; } = true; + + /// + /// 敌人身上的状态机控制器 + /// + public StateController StateController { get; private set; } + + /// + /// 视野半径, 单位像素, 发现玩家后改视野范围可以穿墙 + /// + public float ViewRange { get; set; } = 250; + + /// + /// 发现玩家后的视野半径 + /// + public float TailAfterViewRange { get; set; } = 400; + + /// + /// 背后的视野半径, 单位像素 + /// + public float BackViewRange { get; set; } = 50; + + /// + /// 视野检测射线, 朝玩家打射线, 检测是否碰到墙 + /// + [Export, ExportFillNode] + public RayCast2D ViewRay { get; private set; } + + /// + /// 导航代理 + /// + [Export, ExportFillNode] + public NavigationAgent2D NavigationAgent2D { get; private set; } + + /// + /// 导航代理中点 + /// + [Export, ExportFillNode] + public Marker2D NavigationPoint { get; private set; } + + /// + /// Ai攻击状态, 调用 Attack() 函数后会刷新 + /// + public AiAttackState AttackState { get; private set; } + + //锁定目标时间 + private float _lockTargetTime = 0; + + public override void OnInit() + { + base.OnInit(); + IsAi = true; + StateController = AddComponent>(); + + AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Player; + EnemyLayer = PhysicsLayer.Player; + Camp = CampEnum.Camp2; + + RoleState.MoveSpeed = 20; + + MaxHp = 20; + Hp = 20; + + //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() + { + if (!World.Enemy_InstanceList.Contains(this)) + { + World.Enemy_InstanceList.Add(this); + } + } + + public override void ExitTree() + { + World.Enemy_InstanceList.Remove(this); + } + + protected override void OnDie() + { + //扔掉所有武器 + var weapons = WeaponPack.GetAndClearItem(); + for (var i = 0; i < weapons.Length; i++) + { + weapons[i].ThrowWeapon(this); + } + + var effPos = Position + new Vector2(0, -Altitude); + //血液特效 + var blood = ObjectManager.GetPoolItem(ResourcePath.prefab_effect_enemy_EnemyBloodEffect_tscn); + blood.Position = effPos - new Vector2(0, 12); + blood.AddToActivityRoot(RoomLayerEnum.NormalLayer); + blood.PlayEffect(); + + //创建敌人碎片 + var count = Utils.Random.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); + if (IsDie) + { + return; + } + //目标在视野内的时间 + var currState = StateController.CurrState; + if (currState == AiStateEnum.AiSurround || currState == AiStateEnum.AiFollowUp) + { + var weapon = WeaponPack.ActiveItem; + if (weapon != null) + { + if (weapon.GetBeLoadedStateState() >= 2 && !weapon.IsAttackIntervalTime()) //必须在可以开火时记录时间 + { + _lockTargetTime += delta; + } + else + { + _lockTargetTime = 0; + } + + if (AttackState == AiAttackState.LockingTime) //锁定玩家状态 + { + var aiLockRemainderTime = weapon.GetAiLockRemainderTime(); + MountLookTarget = aiLockRemainderTime >= weapon.Attribute.AiAttackAttr.LockAngleTime; + //更新瞄准辅助线 + if (weapon.Attribute.AiAttackAttr.ShowSubline) + { + if (SubLine == null) + { + InitSubLine(); + } + else + { + SubLine.Enable = true; + } + + //播放警告删掉动画 + if (!SubLine.IsPlayWarnAnimation && aiLockRemainderTime <= 0.5f) + { + SubLine.PlayWarnAnimation(0.5f); + } + } + } + else + { + //关闭辅助线 + if (SubLine != null) + { + SubLine.Enable = false; + } + + if (AttackState == AiAttackState.Attack || AttackState == AiAttackState.AttackInterval) + { + if (weapon.Attribute.AiAttackAttr.AttackLockAngle) //开火时锁定枪口角度 + { + //连发状态锁定角度 + MountLookTarget = !(weapon.GetContinuousCount() > 0 || weapon.GetAttackTimer() > 0); + } + else + { + MountLookTarget = true; + } + } + else + { + MountLookTarget = true; + } + } + } + else + { + MountLookTarget = true; + _lockTargetTime = 0; + } + } + else + { + MountLookTarget = true; + _lockTargetTime = 0; + } + + //拾起武器操作 + EnemyPickUpWeapon(); + } + + protected override void OnHit(int damage, bool realHarm) + { + //受到伤害 + var state = StateController.CurrState; + if (state == AiStateEnum.AiNormal || state == AiStateEnum.AiLeaveFor) //|| state == AiStateEnum.AiProbe + { + 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; + } + + public override void Attack() + { + var weapon = WeaponPack.ActiveItem; + if (weapon != null) + { + AttackState = weapon.AiTriggerAttackState(); + } + else //没有武器 + { + AttackState = AiAttackState.NoWeapon; + } + } + + /// + /// 获取武器攻击范围 (最大距离值与最小距离的中间值) + /// + /// 从最小到最大距离的过渡量, 0 - 1, 默认 0.5 + public float GetWeaponRange(float weight = 0.5f) + { + if (WeaponPack.ActiveItem != null) + { + var attribute = WeaponPack.ActiveItem.Attribute; + return Mathf.Lerp(Utils.GetConfigRangeStart(attribute.Bullet.DistanceRange), Utils.GetConfigRangeEnd(attribute.Bullet.DistanceRange), 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 (WeaponPack.ActiveItem == null) //手上没有武器, 无论如何也要拾起 + { + TriggerInteractive(); + return; + } + + //没弹药了 + if (weapon.IsTotalAmmoEmpty()) + { + return; + } + + var index = WeaponPack.FindIndex((we, i) => we.ItemConfig.Id == weapon.ItemConfig.Id); + if (index != -1) //与武器背包中武器类型相同, 补充子弹 + { + if (!WeaponPack.GetItem(index).IsAmmoFull()) + { + TriggerInteractive(); + } + + return; + } + + // var index2 = Holster.FindWeapon((we, i) => + // we.Attribute.WeightType == weapon.Attribute.WeightType && we.IsTotalAmmoEmpty()); + var index2 = WeaponPack.FindIndex((we, i) => we.IsTotalAmmoEmpty()); + if (index2 != -1) //扔掉没子弹的武器 + { + ThrowWeapon(index2); + TriggerInteractive(); + return; + } + + // if (Holster.HasVacancy()) //有空位, 拾起武器 + // { + // TriggerInteractive(); + // return; + // } + } + } + + /// + /// 获取锁定目标的时间 + /// + public float GetLockTime() + { + return _lockTargetTime; + } + + /// + /// 强制设置锁定目标时间 + /// + public void SetLockTargetTime(float time) + { + _lockTargetTime = time; + } +} diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs index 4736952..a27cedc 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs @@ -1,18 +1,6 @@ -#region 基础敌人设计思路 -/* -敌人有三种状态: -状态1: 未发现玩家, 视野不可穿墙, 该状态下敌人移动比较规律, 移动速度较慢, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3, 该房间的敌人不能再回到状态1 -状态2: 发现有玩家, 但不知道在哪, 视野不可穿墙, 该情况下敌人移动速度明显加快, 移动不规律, 一旦玩家进入视野或者听到玩家枪声, 立刻切换至状态3 -状态3: 明确知道玩家的位置, 视野允许穿墙, 移动速度与状态2一致, 进入该状态时, 敌人之间会相互告知玩家所在位置, 并朝着玩家位置开火, - 如果有墙格挡, 则有一定概率继续开火, 一旦玩家立刻敌人视野超哥一段时间, 敌人自动切换为状态2 - -敌人状态1只存在于少数房间内, 比如特殊房间, 大部分情况下敌人应该是状态2, 或者玩家进入房间时就被敌人发现 -*/ -#endregion - - -using System; + using Godot; +using NnormalState; /// /// 基础敌人 @@ -48,20 +36,23 @@ /// /// 视野检测射线, 朝玩家打射线, 检测是否碰到墙 /// + [Export, ExportFillNode] public RayCast2D ViewRay { get; private set; } /// /// 导航代理 /// + [Export, ExportFillNode] public NavigationAgent2D NavigationAgent2D { get; private set; } /// /// 导航代理中点 /// + [Export, ExportFillNode] public Marker2D NavigationPoint { get; private set; } /// - /// Ai攻击状态, 调用 EnemyAttack() 函数后会刷新 + /// Ai攻击状态, 调用 Attack() 函数后会刷新 /// public AiAttackState AttackState { get; private set; } @@ -74,7 +65,7 @@ IsAi = true; StateController = AddComponent>(); - AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Prop | PhysicsLayer.Player; + AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Player; EnemyLayer = PhysicsLayer.Player; Camp = CampEnum.Camp2; @@ -82,30 +73,15 @@ 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); + StateController.ChangeState(AiStateEnum.AiNormal); } public override void EnterTree() { - base.EnterTree(); if (!World.Enemy_InstanceList.Contains(this)) { World.Enemy_InstanceList.Add(this); @@ -114,25 +90,33 @@ public override void ExitTree() { - base.ExitTree(); World.Enemy_InstanceList.Remove(this); } + public override void Attack() + { + Debug.Log("触发攻击"); + } + + protected override void OnHit(int damage, bool realHarm) + { + //受到伤害 + var state = StateController.CurrState; + if (state == AiStateEnum.AiNormal || state == AiStateEnum.AiLeaveFor) //|| state == AiStateEnum.AiProbe + { + StateController.ChangeState(AiStateEnum.AiTailAfter); + } + } + protected override void OnDie() { - //扔掉所有武器 - var weapons = WeaponPack.GetAndClearItem(); - 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_enemy_EnemyBloodEffect_tscn); + var blood = ObjectManager.GetPoolItem(ResourcePath.prefab_effect_enemy_EnemyBloodEffect_tscn); blood.Position = effPos - new Vector2(0, 12); blood.AddToActivityRoot(RoomLayerEnum.NormalLayer); - + blood.PlayEffect(); + //创建敌人碎片 var count = Utils.Random.RandomRangeInt(3, 6); for (var i = 0; i < count; i++) @@ -146,197 +130,10 @@ EventManager.EmitEvent(EventEnum.OnEnemyDie, this); Destroy(); } - - protected override void Process(float delta) - { - base.Process(delta); - - //目标在视野内的时间 - var currState = StateController.CurrState; - if (currState == AiStateEnum.AiSurround || currState == AiStateEnum.AiFollowUp) - { - var weapon = WeaponPack.ActiveItem; - if (weapon != null) - { - if (weapon.GetBeLoadedStateState() >= 2 && !weapon.IsAttackIntervalTime()) //必须在可以开火时记录时间 - { - _lockTargetTime += delta; - } - else - { - _lockTargetTime = 0; - } - - if (AttackState == AiAttackState.LockingTime) //锁定玩家状态 - { - var aiLockRemainderTime = weapon.GetAiLockRemainderTime(); - MountLookTarget = aiLockRemainderTime >= weapon.Attribute.AiAttackAttr.LockAngleTime; - //更新瞄准辅助线 - if (weapon.Attribute.AiAttackAttr.ShowSubline) - { - if (SubLine == null) - { - InitSubLine(); - } - else - { - SubLine.Enable = true; - } - - //播放警告删掉动画 - if (!SubLine.IsPlayWarnAnimation && aiLockRemainderTime <= 0.5f) - { - SubLine.PlayWarnAnimation(0.5f); - } - } - } - else - { - //关闭辅助线 - if (SubLine != null) - { - SubLine.Enable = false; - } - - if (AttackState == AiAttackState.Attack || AttackState == AiAttackState.AttackInterval) - { - if (weapon.Attribute.AiAttackAttr.AttackLockAngle) //开火时锁定枪口角度 - { - //连发状态锁定角度 - MountLookTarget = !(weapon.GetContinuousCount() > 0 || weapon.GetAttackTimer() > 0); - } - else - { - MountLookTarget = true; - } - } - else - { - MountLookTarget = true; - } - } - } - else - { - MountLookTarget = true; - _lockTargetTime = 0; - } - } - else - { - MountLookTarget = true; - _lockTargetTime = 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) @@ -345,7 +142,7 @@ } var currState = StateController.CurrState; - if (currState == AiStateEnum.AiNormal || currState == AiStateEnum.AiProbe) + if (currState == AiStateEnum.AiNormal)// || currState == AiStateEnum.AiProbe) { //判断是否在同一个房间内 return World.Enemy_FindTargetAffiliationSet.Contains(AffiliationArea); @@ -355,37 +152,6 @@ } /// - /// Ai触发的攻击 - /// - public void EnemyAttack() - { - var weapon = WeaponPack.ActiveItem; - if (weapon != null) - { - AttackState = weapon.AiTriggerAttackState(); - } - else //没有武器 - { - AttackState = AiAttackState.NoWeapon; - } - } - - /// - /// 获取武器攻击范围 (最大距离值与最小距离的中间值) - /// - /// 从最小到最大距离的过渡量, 0 - 1, 默认 0.5 - public float GetWeaponRange(float weight = 0.5f) - { - if (WeaponPack.ActiveItem != null) - { - var attribute = WeaponPack.ActiveItem.Attribute; - return Mathf.Lerp(Utils.GetConfigRangeStart(attribute.BulletDistanceRange), Utils.GetConfigRangeEnd(attribute.BulletDistanceRange), weight); - } - - return 0; - } - - /// /// 返回目标点是否在视野范围内 /// public bool IsInViewRange(Vector2 target) @@ -437,63 +203,7 @@ { ViewRay.Enabled = false; } - - /// - /// AI 拾起武器操作 - /// - private void EnemyPickUpWeapon() - { - //这几个状态不需要主动拾起武器操作 - var state = StateController.CurrState; - if (state == AiStateEnum.AiNormal) - { - return; - } - - //拾起地上的武器 - if (InteractiveItem is Weapon weapon) - { - if (WeaponPack.ActiveItem == null) //手上没有武器, 无论如何也要拾起 - { - TriggerInteractive(); - return; - } - - //没弹药了 - if (weapon.IsTotalAmmoEmpty()) - { - return; - } - - var index = WeaponPack.FindIndex((we, i) => we.ItemConfig.Id == weapon.ItemConfig.Id); - if (index != -1) //与武器背包中武器类型相同, 补充子弹 - { - if (!WeaponPack.GetItem(index).IsAmmoFull()) - { - TriggerInteractive(); - } - - return; - } - - // var index2 = Holster.FindWeapon((we, i) => - // we.Attribute.WeightType == weapon.Attribute.WeightType && we.IsTotalAmmoEmpty()); - var index2 = WeaponPack.FindIndex((we, i) => we.IsTotalAmmoEmpty()); - if (index2 != -1) //扔掉没子弹的武器 - { - ThrowWeapon(index2); - TriggerInteractive(); - return; - } - - // if (Holster.HasVacancy()) //有空位, 拾起武器 - // { - // TriggerInteractive(); - // return; - // } - } - } - + /// /// 获取锁定目标的时间 /// @@ -509,5 +219,13 @@ { _lockTargetTime = time; } - -} + + /// + /// 获取攻击范围 + /// + /// 从最小到最大距离的过渡量, 0 - 1, 默认 0.5 + public float GetAttackRange(float weight = 0.5f) + { + return 200; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiFindAmmoState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiFindAmmoState.cs new file mode 100644 index 0000000..ab9ef33 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiFindAmmoState.cs @@ -0,0 +1,154 @@ + +using Godot; + +namespace AdvancedState; + +/// +/// 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) + { + Debug.LogError("进入 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/advancedState/AiFollowUpState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiFollowUpState.cs new file mode 100644 index 0000000..904b327 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiFollowUpState.cs @@ -0,0 +1,132 @@ + +using Godot; + +namespace AdvancedState; + +/// +/// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 +/// +public class AiFollowUpState : StateBase +{ + //导航目标点刷新计时器 + 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; + Master.TargetInView = 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.WeaponPack.ActiveItem; + if (weapon != null) + { + inAttackRange = masterPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Master.GetWeaponRange(0.7f), 2); + } + + //枪口指向玩家 + Master.LookTargetPosition(playerPos); + + if (!Master.NavigationAgent2D.IsNavigationFinished()) + { + if (weapon == null || !weapon.Attribute.AiAttackAttr.FiringStand || + (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack)) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - masterPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.AnimatedSprite.Play(AnimatorNames.Idle); + Master.BasisVelocity = Vector2.Zero; + } + } + else + { + Master.BasisVelocity = Vector2.Zero; + } + + //检测玩家是否在视野内 + if (Master.IsInTailAfterViewRange(playerPos)) + { + Master.TargetInView = !Master.TestViewRayCast(playerPos); + //关闭射线检测 + Master.TestViewRayCastOver(); + } + else + { + Master.TargetInView = false; + } + + //在视野中, 或者锁敌状态下, 或者攻击状态下, 继续保持原本逻辑 + if (Master.TargetInView || Master.AttackState == AiAttackState.LockingTime || Master.AttackState == AiAttackState.Attack) + { + if (inAttackRange) //在攻击范围内 + { + //发起攻击 + Master.Attack(); + + //距离够近, 可以切换到环绕模式 + if (Master.GlobalPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Utils.GetConfigRangeStart(weapon.Attribute.Bullet.DistanceRange), 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/advancedState/AiLeaveForState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiLeaveForState.cs new file mode 100644 index 0000000..73e339b --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiLeaveForState.cs @@ -0,0 +1,103 @@ + +using Godot; + +namespace AdvancedState; + +/// +/// 收到其他敌人通知, 前往发现目标的位置 +/// +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/advancedState/AiNormalState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiNormalState.cs new file mode 100644 index 0000000..5f469d1 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiNormalState.cs @@ -0,0 +1,183 @@ + +using Godot; + +namespace AdvancedState; + +/// +/// 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.Random.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 AdvancedRole) //碰到其他角色 + { + _pauseTimer = Utils.Random.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.Random.RandomRangeFloat(_againstWallNormalAngle - Mathf.Pi * 0.5f, + _againstWallNormalAngle + Mathf.Pi * 0.5f); + } + else + { + angle = Utils.Random.RandomRangeFloat(0, Mathf.Pi * 2f); + } + + var len = Utils.Random.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/advancedState/AiProbeState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiProbeState.cs new file mode 100644 index 0000000..3f8a865 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/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/advancedState/AiSurroundState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiSurroundState.cs new file mode 100644 index 0000000..39cdf6c --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiSurroundState.cs @@ -0,0 +1,187 @@ + +using Godot; + +namespace AdvancedState; + +/// +/// 距离目标足够近, 在目标附近随机移动, 并开火 +/// +public class AiSurroundState : StateBase +{ + //是否移动结束 + 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) + { + Master.TargetInView = 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.WeaponPack.ActiveItem; + + //枪口指向玩家 + Master.LookTargetPosition(playerPos); + + //检测玩家是否在视野内 + if (Master.IsInTailAfterViewRange(playerPos)) + { + Master.TargetInView = !Master.TestViewRayCast(playerPos); + //关闭射线检测 + Master.TestViewRayCastOver(); + } + else + { + Master.TargetInView = false; + } + + //在视野中, 或者锁敌状态下, 或者攻击状态下, 继续保持原本逻辑 + if (Master.TargetInView || + (weapon != null && weapon.Attribute.AiAttackAttr.FiringStand && + (Master.AttackState == AiAttackState.LockingTime || Master.AttackState == AiAttackState.Attack) + )) + { + 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.Random.RandomRangeFloat(0f, 0.5f); + _isMoveOver = true; + _moveFlag = false; + Master.BasisVelocity = Vector2.Zero; + } + else if (!_moveFlag) + { + _moveFlag = true; + //计算移动 + 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 AdvancedRole) //碰到其他角色 + { + _pauseTimer = Utils.Random.RandomRangeFloat(0f, 0.3f); + _isMoveOver = true; + _moveFlag = false; + Master.BasisVelocity = Vector2.Zero; + } + else + { + //判断开火状态, 进行移动 + if (weapon == null || !weapon.Attribute.AiAttackAttr.FiringStand || + (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack)) + { //正常移动 + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else //站立不动 + { + Master.AnimatedSprite.Play(AnimatorNames.Idle); + Master.BasisVelocity = Vector2.Zero; + } + } + + 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.Attack(); + } + } + } + } + else //目标离开视野 + { + ChangeState(AiStateEnum.AiTailAfter); + } + } + + private void RunOver(Vector2 targetPos) + { + var weapon = Master.WeaponPack.ActiveItem; + var distance = (int)(weapon == null ? 150 : (Utils.GetConfigRangeStart(weapon.Attribute.Bullet.DistanceRange) * 0.7f)); + _nextPosition = new Vector2( + targetPos.X + Utils.Random.RandomRangeInt(-distance, distance), + targetPos.Y + Utils.Random.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/advancedState/AiTailAfterState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiTailAfterState.cs new file mode 100644 index 0000000..569690e --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/advancedState/AiTailAfterState.cs @@ -0,0 +1,137 @@ + +using Godot; + +namespace AdvancedState; + +/// +/// 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 weapon = Master.WeaponPack.ActiveItem; + if (weapon == null || !weapon.Attribute.AiAttackAttr.FiringStand || + (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack)) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.AnimatedSprite.Play(AnimatorNames.Idle); + Master.BasisVelocity = Vector2.Zero; + } + } + 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/role/enemy/normalState/AiFollowUpState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/normalState/AiFollowUpState.cs new file mode 100644 index 0000000..35c2caa --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/normalState/AiFollowUpState.cs @@ -0,0 +1,108 @@ + +using Godot; + +namespace NnormalState; + +/// +/// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 +/// +public class AiFollowUpState : StateBase +{ + //导航目标点刷新计时器 + 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; + Master.TargetInView = true; + } + + public override void Process(float delta) + { + var playerPos = Player.Current.GetCenterPosition(); + + //更新玩家位置 + if (_navigationUpdateTimer <= 0) + { + //每隔一段时间秒更改目标位置 + _navigationUpdateTimer = _navigationInterval; + Master.NavigationAgent2D.TargetPosition = playerPos; + } + else + { + _navigationUpdateTimer -= delta; + } + + var masterPosition = Master.GlobalPosition; + + //是否在攻击范围内 + var inAttackRange = masterPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Master.GetAttackRange(0.7f), 2); + + //枪口指向玩家 + Master.LookTargetPosition(playerPos); + + if (!Master.NavigationAgent2D.IsNavigationFinished()) + { + if (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - masterPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.AnimatedSprite.Play(AnimatorNames.Idle); + Master.BasisVelocity = Vector2.Zero; + } + } + else + { + Master.BasisVelocity = Vector2.Zero; + } + + //检测玩家是否在视野内 + if (Master.IsInTailAfterViewRange(playerPos)) + { + Master.TargetInView = !Master.TestViewRayCast(playerPos); + //关闭射线检测 + Master.TestViewRayCastOver(); + } + else + { + Master.TargetInView = false; + } + + //在视野中, 或者锁敌状态下, 或者攻击状态下, 继续保持原本逻辑 + if (Master.TargetInView || Master.AttackState == AiAttackState.LockingTime || Master.AttackState == AiAttackState.Attack) + { + if (inAttackRange) //在攻击范围内 + { + //发起攻击 + Master.Attack(); + + //距离够近, 可以切换到环绕模式 + // if (Master.GlobalPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Utils.GetConfigRangeStart(weapon.Attribute.Bullet.DistanceRange), 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/normalState/AiNormalState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/normalState/AiNormalState.cs new file mode 100644 index 0000000..9cf340a --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/normalState/AiNormalState.cs @@ -0,0 +1,177 @@ +using Godot; + +namespace NnormalState; + +/// +/// 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.Random.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 AdvancedRole) //碰到其他角色 + { + _pauseTimer = Utils.Random.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.Random.RandomRangeFloat(_againstWallNormalAngle - Mathf.Pi * 0.5f, + _againstWallNormalAngle + Mathf.Pi * 0.5f); + } + else + { + angle = Utils.Random.RandomRangeFloat(0, Mathf.Pi * 2f); + } + + var len = Utils.Random.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); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/normalState/AiTailAfterState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/normalState/AiTailAfterState.cs new file mode 100644 index 0000000..3d29972 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/normalState/AiTailAfterState.cs @@ -0,0 +1,124 @@ + +using Godot; + +namespace NnormalState; + +/// +/// 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; + } + + 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()) + { + if (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack) + { + //计算移动 + var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); + Master.AnimatedSprite.Play(AnimatorNames.Run); + Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * + Master.RoleState.MoveSpeed; + } + else + { + Master.AnimatedSprite.Play(AnimatorNames.Idle); + Master.BasisVelocity = Vector2.Zero; + } + } + 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/role/enemy/state/AIStateEnum.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AIStateEnum.cs deleted file mode 100644 index 6bb8db4..0000000 --- a/DungeonShooting_Godot/src/game/activity/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/activity/role/enemy/state/AiFindAmmoState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFindAmmoState.cs deleted file mode 100644 index 79cb04e..0000000 --- a/DungeonShooting_Godot/src/game/activity/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) - { - Debug.LogError("进入 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 deleted file mode 100644 index 50003ec..0000000 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs +++ /dev/null @@ -1,130 +0,0 @@ - -using Godot; - -/// -/// 目标在视野内, 跟进目标, 如果距离在子弹有效射程内, 则开火 -/// -public class AiFollowUpState : StateBase -{ - //导航目标点刷新计时器 - 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; - Master.TargetInView = 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.WeaponPack.ActiveItem; - if (weapon != null) - { - inAttackRange = masterPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Master.GetWeaponRange(0.7f), 2); - } - - //枪口指向玩家 - Master.LookTargetPosition(playerPos); - - if (!Master.NavigationAgent2D.IsNavigationFinished()) - { - if (weapon == null || !weapon.Attribute.AiAttackAttr.FiringStand || - (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack)) - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - masterPosition - Master.NavigationPoint.Position).Normalized() * - Master.RoleState.MoveSpeed; - } - else - { - Master.AnimatedSprite.Play(AnimatorNames.Idle); - Master.BasisVelocity = Vector2.Zero; - } - } - else - { - Master.BasisVelocity = Vector2.Zero; - } - - //检测玩家是否在视野内 - if (Master.IsInTailAfterViewRange(playerPos)) - { - Master.TargetInView = !Master.TestViewRayCast(playerPos); - //关闭射线检测 - Master.TestViewRayCastOver(); - } - else - { - Master.TargetInView = false; - } - - //在视野中, 或者锁敌状态下, 或者攻击状态下, 继续保持原本逻辑 - if (Master.TargetInView || Master.AttackState == AiAttackState.LockingTime || Master.AttackState == AiAttackState.Attack) - { - if (inAttackRange) //在攻击范围内 - { - //发起攻击 - Master.EnemyAttack(); - - //距离够近, 可以切换到环绕模式 - if (Master.GlobalPosition.DistanceSquaredTo(playerPos) <= Mathf.Pow(Utils.GetConfigRangeStart(weapon.Attribute.BulletDistanceRange), 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 deleted file mode 100644 index bb1c761..0000000 --- a/DungeonShooting_Godot/src/game/activity/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.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 deleted file mode 100644 index b0a208c..0000000 --- a/DungeonShooting_Godot/src/game/activity/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.Random.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.Random.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.Random.RandomRangeFloat(_againstWallNormalAngle - Mathf.Pi * 0.5f, - _againstWallNormalAngle + Mathf.Pi * 0.5f); - } - else - { - angle = Utils.Random.RandomRangeFloat(0, Mathf.Pi * 2f); - } - - var len = Utils.Random.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 deleted file mode 100644 index 1015095..0000000 --- a/DungeonShooting_Godot/src/game/activity/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/activity/role/enemy/state/AiSurroundState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs deleted file mode 100644 index 321419f..0000000 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs +++ /dev/null @@ -1,185 +0,0 @@ - -using Godot; - -/// -/// 距离目标足够近, 在目标附近随机移动, 并开火 -/// -public class AiSurroundState : StateBase -{ - //是否移动结束 - 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) - { - Master.TargetInView = 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.WeaponPack.ActiveItem; - - //枪口指向玩家 - Master.LookTargetPosition(playerPos); - - //检测玩家是否在视野内 - if (Master.IsInTailAfterViewRange(playerPos)) - { - Master.TargetInView = !Master.TestViewRayCast(playerPos); - //关闭射线检测 - Master.TestViewRayCastOver(); - } - else - { - Master.TargetInView = false; - } - - //在视野中, 或者锁敌状态下, 或者攻击状态下, 继续保持原本逻辑 - if (Master.TargetInView || - (weapon != null && weapon.Attribute.AiAttackAttr.FiringStand && - (Master.AttackState == AiAttackState.LockingTime || Master.AttackState == AiAttackState.Attack) - )) - { - 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.Random.RandomRangeFloat(0f, 0.5f); - _isMoveOver = true; - _moveFlag = false; - Master.BasisVelocity = Vector2.Zero; - } - else if (!_moveFlag) - { - _moveFlag = true; - //计算移动 - 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.Random.RandomRangeFloat(0f, 0.3f); - _isMoveOver = true; - _moveFlag = false; - Master.BasisVelocity = Vector2.Zero; - } - else - { - //判断开火状态, 进行移动 - if (weapon == null || !weapon.Attribute.AiAttackAttr.FiringStand || - (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack)) - { //正常移动 - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - pos - Master.NavigationPoint.Position).Normalized() * - Master.RoleState.MoveSpeed; - } - else //站立不动 - { - Master.AnimatedSprite.Play(AnimatorNames.Idle); - Master.BasisVelocity = Vector2.Zero; - } - } - - 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(); - } - } - } - } - else //目标离开视野 - { - ChangeState(AiStateEnum.AiTailAfter); - } - } - - private void RunOver(Vector2 targetPos) - { - var weapon = Master.WeaponPack.ActiveItem; - var distance = (int)(weapon == null ? 150 : (Utils.GetConfigRangeStart(weapon.Attribute.BulletDistanceRange) * 0.7f)); - _nextPosition = new Vector2( - targetPos.X + Utils.Random.RandomRangeInt(-distance, distance), - targetPos.Y + Utils.Random.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 deleted file mode 100644 index 87b21aa..0000000 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiTailAfterState.cs +++ /dev/null @@ -1,135 +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 weapon = Master.WeaponPack.ActiveItem; - if (weapon == null || !weapon.Attribute.AiAttackAttr.FiringStand || - (Master.AttackState != AiAttackState.LockingTime && Master.AttackState != AiAttackState.Attack)) - { - //计算移动 - var nextPos = Master.NavigationAgent2D.GetNextPathPosition(); - Master.AnimatedSprite.Play(AnimatorNames.Run); - Master.BasisVelocity = (nextPos - Master.GlobalPosition - Master.NavigationPoint.Position).Normalized() * - Master.RoleState.MoveSpeed; - } - else - { - Master.AnimatedSprite.Play(AnimatorNames.Idle); - Master.BasisVelocity = Vector2.Zero; - } - } - 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/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs index e067187..21e4ab7 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -1,3 +1,4 @@ +using System; using Godot; @@ -5,7 +6,7 @@ /// 玩家角色基类, 所有角色都必须继承该类 /// [Tool] -public partial class Player : Role +public partial class Player : AdvancedRole { /// /// 获取当前操作的角色 @@ -16,13 +17,16 @@ /// 玩家身上的状态机控制器 /// public StateController StateController { get; private set; } - - /// - /// 是否翻滚中 - /// - public bool IsRolling { get; private set; } /// + /// 是否可以翻滚 + /// + public bool CanRoll => _rollCoolingTimer <= 0; + + //翻滚冷却计时器 + private float _rollCoolingTimer = 0; + + /// /// 设置当前操作的玩家对象 /// public static void SetCurrentPlayer(Player player) @@ -39,7 +43,7 @@ IsAi = false; StateController = AddComponent>(); - AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Prop | PhysicsLayer.Enemy; + AttackLayer = PhysicsLayer.Wall | PhysicsLayer.Enemy; EnemyLayer = EnemyLayer = PhysicsLayer.Enemy; Camp = CampEnum.Camp1; @@ -56,6 +60,11 @@ // CollisionMask = 0; //GameCamera.Main.Zoom = new Vector2(0.2f, 0.2f); //GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); + // this.CallDelay(0.5f, () => + // { + // var weapon = Create(Ids.Id_weapon0009); + // PickUpWeapon(weapon); + // }); //注册状态机 StateController.Register(new PlayerIdleState()); @@ -69,11 +78,17 @@ protected override void Process(float delta) { + base.Process(delta); if (IsDie) { return; } - base.Process(delta); + + if (_rollCoolingTimer > 0) + { + _rollCoolingTimer -= delta; + } + //脸的朝向 if (LookTarget == null) { @@ -158,6 +173,10 @@ { UseActiveProp(); } + else if (InputManager.ExchangeProp) //切换道具 + { + ExchangeNextActiveProp(); + } else if (InputManager.RemoveProp) //扔掉道具 { ThrowActiveProp(); @@ -174,25 +193,24 @@ var enemyList = AffiliationArea.FindIncludeItems(o => o.CollisionWithMask(PhysicsLayer.Enemy)); foreach (var enemy in enemyList) { - ((Enemy)enemy).Hurt(1000, 0); + ((AdvancedEnemy)enemy).Hurt(1000, 0); } } + // //测试用 + // if (InputManager.Roll) //鼠标处触发互动物体 + // { + // var now = DateTime.Now; + // var mousePosition = GetGlobalMousePosition(); + // var freezeSprites = AffiliationArea.RoomInfo.StaticSprite.CollisionCircle(mousePosition, 25, true); + // Debug.Log("检测数量: " + freezeSprites.Count + ", 用时: " + (DateTime.Now - now).TotalMilliseconds); + // foreach (var freezeSprite in freezeSprites) + // { + // var temp = freezeSprite.Position - mousePosition; + // freezeSprite.ActivityObject.MoveController.AddForce(temp.Normalized() * 300 * (25f - temp.Length()) / 25f); + // } + // } } - // protected override void PhysicsProcess(float delta) - // { - // if (IsDie) - // { - // return; - // } - // - // base.PhysicsProcess(delta); - // //处理移动 - // HandleMoveInput(delta); - // //播放动画 - // PlayAnim(); - // } - protected override void OnPickUpWeapon(Weapon weapon) { EventManager.EmitEvent(EventEnum.OnPlayerPickUpWeapon, weapon); @@ -321,9 +339,17 @@ } } - protected override void DebugDraw() + /// + /// 翻滚结束 + /// + public void OverRoll() { - base.DebugDraw(); - DrawArc(new Vector2(0, -8), 50, 0, Mathf.Pi * 2f, 20, Colors.Red, 1); + _rollCoolingTimer = RoleState.RollTime; } + + // protected override void DebugDraw() + // { + // base.DebugDraw(); + // DrawArc(GetLocalMousePosition(), 25, 0, Mathf.Pi * 2f, 20, Colors.Red, 1); + // } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/shell/Shell.cs b/DungeonShooting_Godot/src/game/activity/shell/Shell.cs index 5b58591..379448d 100644 --- a/DungeonShooting_Godot/src/game/activity/shell/Shell.cs +++ b/DungeonShooting_Godot/src/game/activity/shell/Shell.cs @@ -15,12 +15,12 @@ protected override void Process(float delta) { - //落地后将弹壳变为静态贴图 - if (!IsThrowing) + //落地静止后将弹壳变为静态贴图 + if (!IsThrowing && Altitude <= 0 && MoveController.IsMotionless()) { if (AffiliationArea != null) { - BecomesStaticImage(); + Freeze(); } else { diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index 3bead8a..43295bc 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -6,33 +6,33 @@ /// /// 武器的基类 /// -public abstract partial class Weapon : ActivityObject, IPackageItem +public abstract partial class Weapon : ActivityObject, IPackageItem { /// /// 武器使用的属性数据, 该属性会根据是否是玩家使用武器, 如果是Ai使用武器, 则会返回 AiUseAttribute 的属性对象 /// - public ExcelConfig.Weapon Attribute => _weaponAttribute; + public ExcelConfig.WeaponBase Attribute => _weaponAttribute; /// /// Ai使用该武器的属性 /// - public ExcelConfig.Weapon AiUseAttribute => _aiWeaponAttribute; + public ExcelConfig.WeaponBase AiUseAttribute => _aiWeaponAttribute; /// /// 玩家使用该武器的属性 /// - public ExcelConfig.Weapon PlayerUseAttribute => _playerWeaponAttribute; + public ExcelConfig.WeaponBase PlayerUseAttribute => _playerWeaponAttribute; - private ExcelConfig.Weapon _weaponAttribute; - private ExcelConfig.Weapon _playerWeaponAttribute; - private ExcelConfig.Weapon _aiWeaponAttribute; + private ExcelConfig.WeaponBase _weaponAttribute; + private ExcelConfig.WeaponBase _playerWeaponAttribute; + private ExcelConfig.WeaponBase _aiWeaponAttribute; /// /// 武器攻击的目标阵营 /// public CampEnum TargetCamp { get; set; } - public Role Master { get; set; } + public AdvancedRole Master { get; set; } public int PackageIndex { get; set; } = -1; @@ -146,9 +146,9 @@ public bool NoMasterCanTrigger { get; set; } = true; /// - /// 上一次触发改武器开火的角色是否是Ai + /// 上一次触发改武器开火的角色, 可能为 null /// - public bool TriggerRoleIsAi { get; private set; } + public AdvancedRole TriggerRole { get; private set; } /// /// 上一次触发改武器开火的触发开火攻击的层级, 数据源自于: @@ -232,12 +232,15 @@ //上膛计时器 private float _beLoadedStateTimer = -1; + //换弹投抛弹壳记录 + private bool _reloadShellFlag = false; + // ---------------------------------------------- private uint _tempLayer; private static bool _init = false; - private static Dictionary _weaponAttributeMap = - new Dictionary(); + private static Dictionary _weaponAttributeMap = + new Dictionary(); /// /// 初始化武器属性数据 @@ -250,11 +253,11 @@ } _init = true; - foreach (var weaponAttr in ExcelConfig.Weapon_List) + foreach (var weaponAttr in ExcelConfig.WeaponBase_List) { - if (!string.IsNullOrEmpty(weaponAttr.WeaponId)) + if (weaponAttr.Activity != null) { - if (!_weaponAttributeMap.TryAdd(weaponAttr.WeaponId, weaponAttr)) + if (!_weaponAttributeMap.TryAdd(weaponAttr.Activity.Id, weaponAttr)) { Debug.LogError("发现重复注册的武器属性: " + weaponAttr.Id); } @@ -262,11 +265,18 @@ } } - private static ExcelConfig.Weapon _GetWeaponAttribute(string itemId) + /// + /// 根据 ActivityBase.Id 获取对应武器的属性数据 + /// + public static ExcelConfig.WeaponBase GetWeaponAttribute(string itemId) { + if (itemId == null) + { + return null; + } if (_weaponAttributeMap.TryGetValue(itemId, out var attr)) { - return attr.Clone(); + return attr; } throw new Exception($"武器'{itemId}'没有在 Weapon 表中配置属性数据!"); @@ -274,14 +284,14 @@ public override void OnInit() { - InitWeapon(_GetWeaponAttribute(ItemConfig.Id)); + InitWeapon(GetWeaponAttribute(ItemConfig.Id).Clone()); AnimatedSprite.AnimationFinished += OnAnimationFinished; } /// /// 初始化武器属性 /// - public void InitWeapon(ExcelConfig.Weapon attribute) + public void InitWeapon(ExcelConfig.WeaponBase attribute) { _playerWeaponAttribute = attribute; _weaponAttribute = attribute; @@ -387,7 +397,7 @@ /// 当武器被拾起时调用 /// /// 拾起该武器的角色 - protected virtual void OnPickUp(Role master) + protected virtual void OnPickUp(AdvancedRole master) { } @@ -395,7 +405,7 @@ /// 当武器从武器背包中移除时调用 /// /// 移除该武器的角色 - protected virtual void OnRemove(Role master) + protected virtual void OnRemove(AdvancedRole master) { } @@ -423,7 +433,6 @@ public override void EnterTree() { - base.EnterTree(); //收集落在地上的武器 if (IsInGround()) { @@ -433,7 +442,6 @@ public override void ExitTree() { - base.ExitTree(); World.Weapon_UnclaimedWeapons.Remove(this); } @@ -682,12 +690,12 @@ { return Master == null && GetParent() == GameApplication.Instance.World.NormalLayer; } - + /// /// 扳机函数, 调用即视为按下扳机 /// /// 按下扳机的角色, 如果传 null, 则视为走火 - public void Trigger(Role triggerRole) + public void Trigger(AdvancedRole triggerRole) { //不能触发扳机 if (!NoMasterCanTrigger && Master == null) return; @@ -700,20 +708,20 @@ _triggerRoleFlag = true; if (triggerRole != null) { - TriggerRoleIsAi = triggerRole.IsAi; + TriggerRole = triggerRole; TriggerRoleAttackLayer = triggerRole.AttackLayer; - _weaponAttribute = TriggerRoleIsAi ? _aiWeaponAttribute : _playerWeaponAttribute; + _weaponAttribute = triggerRole.IsAi ? _aiWeaponAttribute : _playerWeaponAttribute; } else if (Master != null) { - TriggerRoleIsAi = Master.IsAi; + TriggerRole = Master; TriggerRoleAttackLayer = Master.AttackLayer; - _weaponAttribute = TriggerRoleIsAi ? _aiWeaponAttribute : _playerWeaponAttribute; + _weaponAttribute = Master.IsAi ? _aiWeaponAttribute : _playerWeaponAttribute; } - + //是否第一帧按下 var justDown = _downTimer == 0; - if (_beLoadedState == 0 || _beLoadedState == -1) //需要执行上膛操作 + if (_beLoadedState == 0 || _beLoadedState == -1) //需要执行上膛操作 { if (justDown && !Reloading && triggerRole != null) { @@ -729,9 +737,9 @@ } } } - else if (_beLoadedState == 1) //上膛中 + else if (_beLoadedState == 1) //上膛中 { - + } else //上膛完成 { @@ -801,6 +809,7 @@ { _delayedTime = Attribute.DelayedTime; } + //扳机按下间隔 _triggerTimer = Attribute.TriggerInterval; //连发数量 @@ -832,6 +841,14 @@ } } } + else //不能开火 + { + if (CurrAmmo <= 0 && justDown && triggerRole != null) //子弹不够 + { + //第一帧按下, 触发换弹 + Reload(); + } + } } } @@ -950,13 +967,16 @@ { _attackFlag = true; _noAttackTime = 0; + _reloadShellFlag = false; //减子弹数量 if (_playerWeaponAttribute != _weaponAttribute) //Ai使用该武器, 有一定概率不消耗弹药 { - if (Utils.Random.RandomRangeFloat(0, 1) < _weaponAttribute.AiAttackAttr.AmmoConsumptionProbability) //触发消耗弹药 + var count = UseAmmoCount(); + CurrAmmo -= count; + if (Utils.Random.RandomRangeFloat(0, 1) >= _weaponAttribute.AiAttackAttr.AmmoConsumptionProbability) //不消耗弹药 { - CurrAmmo -= UseAmmoCount(); + ResidueAmmo += count; } } else @@ -973,7 +993,7 @@ _continuousCount = _continuousCount > 0 ? _continuousCount - 1 : 0; } - //开火间隙 + //开火间隙, 这里的60指的是60秒 _fireInterval = 60 / Attribute.StartFiringSpeed; //攻击冷却 _attackTimer += _fireInterval; @@ -982,13 +1002,14 @@ if (IsAutoPlaySpriteFrames) { PlaySpriteAnimation(AnimatorNames.Fire); + PlayAnimationPlayer(AnimatorNames.Fire); } //播放射击音效 PlayShootSound(); //抛弹 - if ((Attribute.ContinuousShoot || !Attribute.ManualBeLoaded)) + if (!Attribute.ReloadThrowShell && (Attribute.ContinuousShoot || !Attribute.ManualBeLoaded)) { ThrowShellHandler(1f); } @@ -1011,14 +1032,14 @@ var bulletCount = Utils.Random.RandomConfigRange(Attribute.FireBulletCountRange); if (Master != null) { - bulletCount = Master.RoleState.CallCalcBulletCountEvent(this, bulletCount); + bulletCount = Master.RoleState.CalcBulletCount(this, bulletCount); fireRotation += Master.MountPoint.RealRotation; } else { fireRotation += GlobalRotation; } - + //创建子弹 for (var i = 0; i < bulletCount; i++) { @@ -1047,7 +1068,7 @@ else //在地上 { var v = Utils.Random.RandomConfigRange(Attribute.BacklashRange) * 5; - var externalForce = MoveController.AddForce(new Vector2(-v, 0).Rotated(Rotation), v * 2); + var externalForce = MoveController.AddForce(new Vector2(-v, 0).Rotated(Rotation)); externalForce.RotationSpeed = -Mathf.DegToRad(40); externalForce.RotationResistance = Mathf.DegToRad(80); } @@ -1072,6 +1093,19 @@ // { // // } + + /// + /// 根据触扳机的角色对象判断该角色使用的武器数据 + /// + public ExcelConfig.WeaponBase GetUseAttribute(AdvancedRole triggerRole) + { + if (triggerRole == null || !triggerRole.IsAi) + { + return PlayerUseAttribute; + } + + return AiUseAttribute; + } /// /// 获取武器攻击的目标层级 @@ -1083,7 +1117,7 @@ { return (uint)TriggerRoleAttackLayer; } - return Master != null ? Master.AttackLayer : Role.DefaultAttackLayer; + return Master != null ? Master.AttackLayer : AdvancedRole.DefaultAttackLayer; } /// @@ -1185,7 +1219,8 @@ // Debug.Log("开始换弹."); //抛弹 - if (!Attribute.ContinuousShoot && (_beLoadedState == 0 || _beLoadedState == -1) && Attribute.BeLoadedTime > 0) + if (!Attribute.ReloadThrowShell && !Attribute.ContinuousShoot && + (_beLoadedState == 0 || _beLoadedState == -1) && Attribute.BeLoadedTime > 0) { ThrowShellHandler(0.6f); } @@ -1234,15 +1269,13 @@ { if (Attribute.BeginReloadSound != null) { - var position = GameApplication.Instance.ViewToGlobalPosition(GlobalPosition); - var volume = SoundManager.CalcRoleVolume(Attribute.BeginReloadSound.Volume, Master); if (Attribute.BeginReloadSoundDelayTime <= 0) { - SoundManager.PlaySoundEffectPosition(Attribute.BeginReloadSound.Path, position, volume); + SoundManager.PlaySoundByConfig(Attribute.BeginReloadSound, GlobalPosition, TriggerRole); } else { - SoundManager.PlaySoundEffectPositionDelay(Attribute.BeginReloadSound.Path, position, Attribute.BeginReloadSoundDelayTime, volume); + SoundManager.PlaySoundByConfigDelay(Attribute.BeginReloadSound, GlobalPosition, Attribute.BeginReloadSoundDelayTime, TriggerRole); } } } @@ -1252,15 +1285,13 @@ { if (Attribute.ReloadSound != null) { - var position = GameApplication.Instance.ViewToGlobalPosition(GlobalPosition); - var volume = SoundManager.CalcRoleVolume(Attribute.ReloadSound.Volume, Master); if (Attribute.ReloadSoundDelayTime <= 0) { - SoundManager.PlaySoundEffectPosition(Attribute.ReloadSound.Path, position, volume); + SoundManager.PlaySoundByConfig(Attribute.ReloadSound, GlobalPosition, TriggerRole); } else { - SoundManager.PlaySoundEffectPositionDelay(Attribute.ReloadSound.Path, position, Attribute.ReloadSoundDelayTime, volume); + SoundManager.PlaySoundByConfigDelay(Attribute.ReloadSound, GlobalPosition, Attribute.ReloadSoundDelayTime, TriggerRole); } } } @@ -1270,9 +1301,7 @@ { if (Attribute.ReloadFinishSound != null) { - var volume = SoundManager.CalcRoleVolume(Attribute.ReloadFinishSound.Volume, Master); - var position = GameApplication.Instance.ViewToGlobalPosition(GlobalPosition); - SoundManager.PlaySoundEffectPosition(Attribute.ReloadFinishSound.Path, position, volume); + SoundManager.PlaySoundByConfig(Attribute.ReloadFinishSound, GlobalPosition, TriggerRole); } } @@ -1281,9 +1310,7 @@ { if (Attribute.ShootSound != null) { - var volume = SoundManager.CalcRoleVolume(Attribute.ShootSound.Volume, Master); - var position = GameApplication.Instance.ViewToGlobalPosition(GlobalPosition); - SoundManager.PlaySoundEffectPosition(Attribute.ShootSound.Path, position, volume); + SoundManager.PlaySoundByConfig(Attribute.ShootSound, GlobalPosition, TriggerRole); } } @@ -1292,15 +1319,13 @@ { if (Attribute.BeLoadedSound != null) { - var position = GameApplication.Instance.ViewToGlobalPosition(GlobalPosition); - var volume = SoundManager.CalcRoleVolume(Attribute.BeLoadedSound.Volume, Master); if (Attribute.BeLoadedSoundDelayTime <= 0) { - SoundManager.PlaySoundEffectPosition(Attribute.BeLoadedSound.Path, position, volume); + SoundManager.PlaySoundByConfig(Attribute.BeLoadedSound, GlobalPosition, TriggerRole); } else { - SoundManager.PlaySoundEffectPositionDelay(Attribute.BeLoadedSound.Path, position, Attribute.BeLoadedSoundDelayTime, volume); + SoundManager.PlaySoundByConfigDelay(Attribute.BeLoadedSound, GlobalPosition, Attribute.BeLoadedSoundDelayTime, TriggerRole); } } } @@ -1358,11 +1383,18 @@ if (IsAutoPlaySpriteFrames) { PlaySpriteAnimation(AnimatorNames.Reloading); + PlayAnimationPlayer(AnimatorNames.Reloading); } //播放换弹音效 PlayReloadSound(); - + + //抛出弹壳 + if (Attribute.ReloadThrowShell && !_reloadShellFlag) + { + ThrowShellHandler(0.6f); + } + OnReload(); // Debug.Log("装弹."); } @@ -1385,7 +1417,7 @@ private void BeLoadedHandler() { //上膛抛弹 - if (!Attribute.ContinuousShoot && Attribute.BeLoadedTime > 0) + if (!Attribute.ReloadThrowShell && !Attribute.ContinuousShoot && Attribute.BeLoadedTime > 0) { ThrowShellHandler(0.6f); } @@ -1412,10 +1444,15 @@ if (Attribute.BeLoadedSoundDelayTime <= 0) { PlaySpriteAnimation(AnimatorNames.BeLoaded); + PlayAnimationPlayer(AnimatorNames.BeLoaded); } else { - this.CallDelay(Attribute.BeLoadedSoundDelayTime, PlaySpriteAnimation, AnimatorNames.BeLoaded); + this.CallDelay(Attribute.BeLoadedSoundDelayTime, () => + { + PlaySpriteAnimation(AnimatorNames.BeLoaded); + PlayAnimationPlayer(AnimatorNames.BeLoaded); + }); } } @@ -1426,18 +1463,23 @@ //抛弹逻辑 private void ThrowShellHandler(float speedScale) { - if (string.IsNullOrEmpty(Attribute.ShellId)) + if (Attribute.Shell == null) { return; } //创建一个弹壳 if (Attribute.ThrowShellDelayTime > 0) { - this.CallDelay(Attribute.ThrowShellDelayTime, () => ThrowShell(Attribute.ShellId, speedScale)); + this.CallDelay(Attribute.ThrowShellDelayTime, () => + { + _reloadShellFlag = true; + ThrowShell(Attribute.Shell, speedScale); + }); } else if (Attribute.ThrowShellDelayTime == 0) { - ThrowShell(Attribute.ShellId, speedScale); + _reloadShellFlag = true; + ThrowShell(Attribute.Shell, speedScale); } } @@ -1448,8 +1490,8 @@ var finalScatteringRange = Attribute.FinalScatteringRange; if (Master != null) { - startScatteringRange = Master.RoleState.CallCalcStartScatteringEvent(this, startScatteringRange); - finalScatteringRange = Master.RoleState.CallCalcFinalScatteringEvent(this, finalScatteringRange); + startScatteringRange = Master.RoleState.CalcStartScattering(this, startScatteringRange); + finalScatteringRange = Master.RoleState.CalcFinalScattering(this, finalScatteringRange); } if (startScatteringRange <= finalScatteringRange) { @@ -1470,8 +1512,8 @@ var finalScatteringRange = Attribute.FinalScatteringRange; if (Master != null) { - startScatteringRange = Master.RoleState.CallCalcStartScatteringEvent(this, startScatteringRange); - finalScatteringRange = Master.RoleState.CallCalcFinalScatteringEvent(this, finalScatteringRange); + startScatteringRange = Master.RoleState.CalcStartScattering(this, startScatteringRange); + finalScatteringRange = Master.RoleState.CalcFinalScattering(this, finalScatteringRange); } if (startScatteringRange <= finalScatteringRange) { @@ -1543,14 +1585,13 @@ ReloadFinishHandler(); } } - + //播放动画 - private void PlaySpriteAnimation(string name) + private void PlayAnimationPlayer(string name) { - var spriteFrames = AnimatedSprite.SpriteFrames; - if (spriteFrames != null && spriteFrames.HasAnimation(name)) + if (AnimationPlayer != null && AnimationPlayer.HasAnimation(name)) { - AnimatedSprite.Play(name); + AnimationPlayer.Play(name); } } @@ -1565,7 +1606,7 @@ { var result = new CheckInteractiveResult(this); - if (master is Role roleMaster) //碰到角色 + if (master is AdvancedRole roleMaster) //碰到角色 { if (Master == null) { @@ -1611,7 +1652,7 @@ public override void Interactive(ActivityObject master) { - if (master is Role roleMaster) //与role互动 + if (master is AdvancedRole roleMaster) //与role互动 { var holster = roleMaster.WeaponPack; //查找是否有同类型武器 @@ -1686,7 +1727,7 @@ /// 触发扔掉武器时抛出的效果, 并不会管武器是否在武器背包中 /// /// 触发扔掉该武器的的角色 - public void ThrowWeapon(Role master) + public void ThrowWeapon(AdvancedRole master) { ThrowWeapon(master, master.GlobalPosition); } @@ -1696,7 +1737,7 @@ /// /// 触发扔掉该武器的的角色 /// 投抛起始位置 - public void ThrowWeapon(Role master, Vector2 startPosition) + public void ThrowWeapon(AdvancedRole master, Vector2 startPosition) { //阴影偏移 ShadowOffset = new Vector2(0, 2); @@ -1859,80 +1900,7 @@ { return AnimatedSprite.Position + ShellPoint.Position; } - - //-------------------------- ----- 子弹相关 ----------------------------- - /// - /// 投抛弹壳的默认实现方式, shellId为弹壳id - /// - protected ActivityObject ThrowShell(string shellId, float speedScale = 1) - { - var startPos = ShellPoint.GlobalPosition; - float startHeight; - if (Master != null) - { - var shellPosition = (Master != null ? Master.MountPoint.Position : Position) + ShellPoint.Position; - startHeight = -shellPosition.Y; - startPos.Y += startHeight; - } - else - { - startHeight = Altitude; - } - - var direction = GlobalRotationDegrees + Utils.Random.RandomRangeInt(-30, 30) + 180; - var verticalSpeed = Utils.Random.RandomRangeInt((int)(60 * speedScale), (int)(120 * speedScale)); - var velocity = new Vector2(Utils.Random.RandomRangeInt((int)(20 * speedScale), (int)(60 * speedScale)), 0).Rotated(direction * Mathf.Pi / 180); - var rotate = Utils.Random.RandomRangeInt((int)(-720 * speedScale), (int)(720 * speedScale)); - var shell = Create(shellId); - shell.Rotation = (Master != null ? Master.MountPoint.RealRotation : Rotation); - shell.Throw(startPos, startHeight, verticalSpeed, velocity, rotate); - shell.InheritVelocity(Master != null ? Master : this); - if (Master == null) - { - AffiliationArea.InsertItem(shell); - } - else - { - Master.AffiliationArea.InsertItem(shell); - } - - return shell; - } - - /// - /// 发射子弹的默认实现方式, bulletId为子弹id - /// - protected Bullet ShootBullet(float fireRotation, string bulletId) - { - var speed = Utils.Random.RandomConfigRange(Attribute.BulletSpeedRange); - var distance = Utils.Random.RandomConfigRange(Attribute.BulletDistanceRange); - var deviationAngle = Utils.Random.RandomConfigRange(Attribute.BulletDeviationAngleRange); - if (Master != null) - { - speed = Master.RoleState.CallCalcBulletSpeedEvent(this, speed); - distance = Master.RoleState.CallCalcBulletDistanceEvent(this, distance); - deviationAngle = Master.RoleState.CallCalcBulletDeviationAngleEvent(this, deviationAngle); - } - - var attackLayer = GetAttackLayer(); - //创建子弹 - var bullet = Create(bulletId); - bullet.Init( - TriggerRoleIsAi, - this, - speed, - distance, - FirePoint.GlobalPosition, - fireRotation + Mathf.DegToRad(deviationAngle), - attackLayer - ); - bullet.MinHarm = Utils.GetConfigRangeStart(Attribute.HarmRange); - bullet.MaxHarm = Utils.GetConfigRangeEnd(Attribute.HarmRange); - bullet.PutDown(RoomLayerEnum.YSortLayer); - return bullet; - } - //-------------------------------- Ai相关 ----------------------------- /// @@ -1980,7 +1948,7 @@ } else { - var enemy = (Enemy)Master; + var enemy = (AdvancedEnemy)Master; if (enemy.GetLockTime() >= Attribute.AiAttackAttr.LockingTime) //正常射击 { if (GetDelayedAttackTime() > 0) @@ -2059,7 +2027,7 @@ } else { - var enemy = (Enemy)Master; + var enemy = (AdvancedEnemy)Master; if (enemy.GetLockTime() >= Attribute.AiAttackAttr.LockingTime) //正常射击 { if (GetDelayedAttackTime() > 0) @@ -2105,10 +2073,14 @@ /// /// 获取Ai锁定目标的剩余时间 /// - /// public float GetAiLockRemainderTime() { - return Attribute.AiAttackAttr.LockingTime - ((Enemy)Master).GetLockTime(); + if (Master is AdvancedEnemy enemy) + { + return Attribute.AiAttackAttr.LockingTime - enemy.GetLockTime(); + } + + return 0; } // /// diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon_Bullet.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon_Bullet.cs new file mode 100644 index 0000000..2370533 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon_Bullet.cs @@ -0,0 +1,145 @@ + +using System; +using Config; +using Godot; + +public partial class Weapon +{ + //-------------------------------- 子弹相关 ----------------------------- + + /// + /// 投抛弹壳的默认实现方式, shellId为弹壳id + /// + protected ActivityObject ThrowShell(ExcelConfig.ActivityBase shell, float speedScale = 1) + { + var startPos = ShellPoint.GlobalPosition; + float startHeight; + if (Master != null) + { + var shellPosition = (Master != null ? Master.MountPoint.Position : Position) + ShellPoint.Position; + startHeight = -shellPosition.Y; + startPos.Y += startHeight; + } + else + { + startHeight = Altitude; + } + + var direction = GlobalRotationDegrees + Utils.Random.RandomRangeInt(-30, 30) + 180; + var verticalSpeed = Utils.Random.RandomRangeInt((int)(60 * speedScale), (int)(120 * speedScale)); + var velocity = new Vector2(Utils.Random.RandomRangeInt((int)(20 * speedScale), (int)(60 * speedScale)), 0).Rotated(direction * Mathf.Pi / 180); + var rotate = Utils.Random.RandomRangeInt((int)(-720 * speedScale), (int)(720 * speedScale)); + var shellInstance = Create(shell); + shellInstance.Rotation = (Master != null ? Master.MountPoint.RealRotation : Rotation); + shellInstance.Throw(startPos, startHeight, verticalSpeed, velocity, rotate); + shellInstance.InheritVelocity(Master != null ? Master : this); + if (Master == null) + { + AffiliationArea.InsertItem(shellInstance); + } + else + { + Master.AffiliationArea.InsertItem(shellInstance); + } + + return shellInstance; + } + + /// + /// 发射子弹 + /// + protected IBullet ShootBullet(float fireRotation, ExcelConfig.BulletBase bullet) + { + if (bullet.Type == 1) //实体子弹 + { + return ShootSolidBullet(fireRotation, bullet); + } + else if (bullet.Type == 2) //激光子弹 + { + return ShootLaser(fireRotation, bullet); + } + + return null; + } + + /// + /// 发射子弹的默认实现方式 + /// + private Bullet ShootSolidBullet(float fireRotation, ExcelConfig.BulletBase bullet) + { + var data = new BulletData() + { + Weapon = this, + BulletBase = bullet, + TriggerRole = TriggerRole, + Harm = Utils.Random.RandomConfigRange(bullet.HarmRange), + Repel = Utils.Random.RandomConfigRange(bullet.RepelRange), + MaxDistance = Utils.Random.RandomConfigRange(bullet.DistanceRange), + FlySpeed = Utils.Random.RandomConfigRange(bullet.SpeedRange), + VerticalSpeed = Utils.Random.RandomConfigRange(bullet.VerticalSpeed), + BounceCount = Utils.Random.RandomConfigRange(bullet.BounceCount), + Penetration = Utils.Random.RandomConfigRange(bullet.Penetration), + Position = FirePoint.GlobalPosition, + }; + + var deviationAngle = Utils.Random.RandomConfigRange(bullet.DeviationAngleRange); + if (TriggerRole != null) + { + var roleState = TriggerRole.RoleState; + data.Harm = roleState.CalcDamage(data.Harm); + data.Repel = roleState.CalcBulletRepel(this, data.Repel); + data.FlySpeed = roleState.CalcBulletSpeed(this, data.FlySpeed); + data.MaxDistance = roleState.CalcBulletDistance(this, data.MaxDistance); + data.BounceCount = roleState.CalcBulletBounceCount(this, data.BounceCount); + data.Penetration = roleState.CalcBulletPenetration(this, data.Penetration); + deviationAngle = roleState.CalcBulletDeviationAngle(this, deviationAngle); + + if (TriggerRole.IsAi) //只有玩家使用该武器才能获得正常速度的子弹 + { + data.FlySpeed *= AiUseAttribute.AiAttackAttr.BulletSpeedScale; + } + } + + data.Rotation = fireRotation + Mathf.DegToRad(deviationAngle); + //创建子弹 + var bulletInstance = ObjectManager.GetBullet(bullet.Prefab); + bulletInstance.InitData(data, GetAttackLayer()); + return bulletInstance; + } + + /// + /// 发射射线的默认实现方式 + /// + private Laser ShootLaser(float fireRotation, ExcelConfig.BulletBase bullet) + { + var data = new BulletData() + { + Weapon = this, + BulletBase = bullet, + TriggerRole = TriggerRole, + Harm = Utils.Random.RandomConfigRange(bullet.HarmRange), + Repel = Utils.Random.RandomConfigRange(bullet.RepelRange), + MaxDistance = Utils.Random.RandomConfigRange(bullet.DistanceRange), + BounceCount = Utils.Random.RandomConfigRange(bullet.BounceCount), + LifeTime = Utils.Random.RandomConfigRange(bullet.LifeTimeRange), + Position = FirePoint.GlobalPosition, + }; + + var deviationAngle = Utils.Random.RandomConfigRange(bullet.DeviationAngleRange); + if (TriggerRole != null) + { + var roleState = TriggerRole.RoleState; + data.Harm = roleState.CalcDamage(data.Harm); + data.Repel = roleState.CalcBulletRepel(this, data.Repel); + data.BounceCount = roleState.CalcBulletBounceCount(this, data.BounceCount); + deviationAngle = roleState.CalcBulletDeviationAngle(this, deviationAngle); + } + + data.Rotation = fireRotation + Mathf.DegToRad(deviationAngle); + //创建激光 + var laser = ObjectManager.GetLaser(bullet.Prefab); + laser.AddToActivityRoot(RoomLayerEnum.YSortLayer); + laser.InitData(data, GetAttackLayer(), 3); + return laser; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs b/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs index f74575e..76ed43c 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/gun/Gun.cs @@ -15,18 +15,22 @@ } //创建开火特效 - var packedScene = ResourceManager.Load(ResourcePath.prefab_effect_weapon_ShotFire_tscn); - var sprite = packedScene.Instantiate(); - // sprite.GlobalPosition = FirePoint.GlobalPosition; - // sprite.GlobalRotation = FirePoint.GlobalRotation; - // sprite.AddToActivityRoot(RoomLayerEnum.YSortLayer); - sprite.Position = GetLocalFirePosition(); - AddChild(sprite); + if (!string.IsNullOrEmpty(Attribute.FireEffect)) + { + var effect = ObjectManager.GetPoolItem(Attribute.FireEffect); + var sprite = (Node2D)effect; + // sprite.GlobalPosition = FirePoint.GlobalPosition; + // sprite.GlobalRotation = FirePoint.GlobalRotation; + // sprite.AddToActivityRoot(RoomLayerEnum.YSortLayer); + sprite.Position = GetLocalFirePosition(); + AddChild(sprite); + effect.PlayEffect(); + } } protected override void OnShoot(float fireRotation) { - ShootBullet(fireRotation, Attribute.BulletId); + ShootBullet(fireRotation, Attribute.Bullet); } // //测试用, 敌人被消灭时触发手上武器开火 diff --git a/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs b/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs index 462ebed..1df0f76 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/knife/Knife.cs @@ -127,32 +127,49 @@ var activityObject = body.AsActivityObject(); if (activityObject != null) { - if (activityObject is Role role) //碰到角色 + if (activityObject is AdvancedRole role) //碰到角色 { - var damage = Utils.Random.RandomConfigRange(Attribute.HarmRange); - damage = Master.RoleState.CallCalcDamageEvent(damage); - //击退 - if (role is not Player) //目标不是玩家才会触发击退 + var damage = Utils.Random.RandomConfigRange(Attribute.Bullet.HarmRange); + //计算子弹造成的伤害 + if (TriggerRole != null) { - var attr = Master.IsAi ? AiUseAttribute : PlayerUseAttribute; - var repel = Utils.Random.RandomConfigRange(attr.RepelRnage); - var position = role.GlobalPosition - Master.MountPoint.GlobalPosition; + damage = TriggerRole.RoleState.CalcDamage(damage); + } + //击退 + var attr = GetUseAttribute(TriggerRole); + var repel = Utils.Random.RandomConfigRange(attr.Bullet.RepelRange); + //计算击退 + if (TriggerRole != null) + { + repel = TriggerRole.RoleState.CalcBulletRepel(this, repel); + } + if (repel != 0) + { + Vector2 position; + if (TriggerRole != null) + { + position = role.GlobalPosition - TriggerRole.MountPoint.GlobalPosition; + } + else + { + position = role.GlobalPosition - GlobalPosition; + } var v2 = position.Normalized() * repel; - role.MoveController.AddForce(v2, repel * 2); + role.MoveController.AddForce(v2); } //造成伤害 - role.CallDeferred(nameof(Role.Hurt), damage, (role.GetCenterPosition() - GlobalPosition).Angle()); + role.CallDeferred(nameof(AdvancedRole.Hurt), damage, (role.GetCenterPosition() - GlobalPosition).Angle()); } else if (activityObject is Bullet bullet) //攻击子弹 { var attackLayer = bullet.AttackLayer; - if (Master.CollisionWithMask(attackLayer)) //是攻击玩家的子弹 + if (TriggerRole != null && TriggerRole.CollisionWithMask(attackLayer)) //是攻击玩家的子弹 { bullet.PlayDisappearEffect(); bullet.BasisVelocity = bullet.BasisVelocity.Rotated(Mathf.Pi); bullet.Rotation += Mathf.Pi; - bullet.AttackLayer = Master.AttackLayer; + bullet.AttackLayer = TriggerRole.AttackLayer; } } } diff --git a/DungeonShooting_Godot/src/game/camera/GameCamera.cs b/DungeonShooting_Godot/src/game/camera/GameCamera.cs index 4d7918d..74a355b 100644 --- a/DungeonShooting_Godot/src/game/camera/GameCamera.cs +++ b/DungeonShooting_Godot/src/game/camera/GameCamera.cs @@ -7,6 +7,20 @@ /// public partial class GameCamera : Camera2D { + private class ShakeData + { + public Vector2 Value; + public bool Decline; + public float DataDelta; + + public ShakeData(Vector2 value, bool decline, float dataDelta) + { + Value = value; + Decline = decline; + DataDelta = dataDelta; + } + } + /// /// 当前场景的相机对象 /// @@ -36,7 +50,7 @@ /// /// 相机跟随目标 /// - private Role _followTarget; + private AdvancedRole _followTarget; // 3.5 //public Vector2 SubPixelPosition { get; private set; } @@ -46,7 +60,7 @@ private Vector2 _processDistanceSquared = Vector2.Zero; private Vector2 _processDirection = Vector2.Zero; //抖动数据 - private readonly Dictionary _shakeMap = new Dictionary(); + private readonly Dictionary _shakeMap = new Dictionary(); private Vector2 _camPos; private Vector2 _shakeOffset = Vector2.Zero; @@ -60,8 +74,9 @@ { _camPos = GlobalPosition; } - - public override void _Process(double delta) + + //_PhysicsProcess + public override void _PhysicsProcess(double delta) { var newDelta = (float)delta; _Shake(newDelta); @@ -81,23 +96,20 @@ { var mousePosition = InputManager.CursorPosition; var targetPosition = _followTarget.GlobalPosition; - Vector2 targetPos; //if (targetPosition.DistanceSquaredTo(mousePosition) >= 39999.992F) // >= (60 / 0.3f) * (60 / 0.3f) if (targetPosition.DistanceSquaredTo(mousePosition) >= (60 / FollowsMouseAmount) * (60 / FollowsMouseAmount)) { - targetPos = targetPosition.MoveToward(mousePosition, 60); + _camPos = targetPosition.MoveToward(mousePosition, 60); } else { //targetPos = targetPosition.Lerp(mousePosition, 0.3f); //这里的0.3就是上面的 (60 / 0.3f) * (60 / 0.3f) 中的 0.3 - targetPos = targetPosition.Lerp(mousePosition, FollowsMouseAmount); + _camPos = targetPosition.Lerp(mousePosition, FollowsMouseAmount); } - _camPos = _camPos.Lerp(targetPos, 20 * newDelta); + //_camPos = _camPos.Lerp(targetPos, 20 * newDelta); GlobalPosition = _camPos.Round(); Offset = _shakeOffset.Round(); - - //_temp = _camPos - targetPosition; //调用相机更新事件 if (OnPositionUpdateEvent != null) @@ -110,7 +122,7 @@ /// /// 设置相机跟随目标 /// - public void SetFollowTarget(Role target) + public void SetFollowTarget(AdvancedRole target) { _followTarget = target; if (target != null) @@ -123,7 +135,7 @@ /// /// 获取相机跟随目标 /// - public Role GetFollowTarget() + public AdvancedRole GetFollowTarget() { return _followTarget; } @@ -151,7 +163,7 @@ /// /// 创建一个抖动, 并设置抖动时间 /// - public async void CreateShake(Vector2 value, float time) + public async void CreateShake(Vector2 value, float time, bool decline = false) { if (time > 0) { @@ -159,7 +171,15 @@ value.Y = Mathf.Abs(value.Y); var tempIndex = _index++; var sceneTreeTimer = GetTree().CreateTimer(time); - _shakeMap[tempIndex] = value; + if (decline) + { + _shakeMap[tempIndex] = new ShakeData(value, true, value.Length() / time); + } + else + { + _shakeMap[tempIndex] = new ShakeData(value, false, 0); + } + await ToSignal(sceneTreeTimer, Timer.SignalName.Timeout); _shakeMap.Remove(tempIndex); } @@ -178,7 +198,7 @@ { if (EnableShake) { - var distance = _CalculateDistanceSquared(); + var distance = _CalculateDistanceSquared(delta); distance = new Vector2(Mathf.Sqrt(distance.X), Mathf.Sqrt(distance.Y)); _shakeOffset += _processDirection + new Vector2( (float)GD.RandRange(-distance.X, distance.X) - Offset.X, @@ -194,21 +214,28 @@ } //计算相机需要抖动的值 - private Vector2 _CalculateDistanceSquared() + private Vector2 _CalculateDistanceSquared(float delta) { var temp = Vector2.Zero; float length = 0; - + foreach (var keyValuePair in _shakeMap) { - var tempLenght = keyValuePair.Value.LengthSquared(); + var shakeData = keyValuePair.Value; + var tempLenght = shakeData.Value.LengthSquared(); if (tempLenght > length) { length = tempLenght; - temp = keyValuePair.Value; + temp = shakeData.Value; + if (shakeData.Decline) + { + shakeData.Value = shakeData.Value.MoveToward(Vector2.Zero, shakeData.DataDelta * delta); + //Debug.Log("shakeData.Value: " + shakeData.Value + ", _processDistanceSquared: " + _processDistanceSquared); + } } } - + + //return temp; return _processDistanceSquared.LengthSquared() > length ? _processDistanceSquared : temp; } } diff --git a/DungeonShooting_Godot/src/game/data/BulletData.cs b/DungeonShooting_Godot/src/game/data/BulletData.cs new file mode 100644 index 0000000..34547ad --- /dev/null +++ b/DungeonShooting_Godot/src/game/data/BulletData.cs @@ -0,0 +1,74 @@ + +using Config; +using Godot; + +/// +/// 子弹数据 +/// +public class BulletData +{ + /// + /// 发射该子弹的武器 + /// + public Weapon Weapon; + + /// + /// 使用的配置数据 + /// + public ExcelConfig.BulletBase BulletBase; + + /// + /// 发射该子弹的角色 + /// + public AdvancedRole TriggerRole; + + /// + /// 造成的伤害 + /// + public int Harm; + + /// + /// 击退值 + /// + public float Repel; + + /// + /// 最大飞行距离 + /// + public float MaxDistance; + + /// + /// 子弹飞行速度 + /// + public float FlySpeed; + + /// + /// 纵轴速度 + /// + public float VerticalSpeed; + + /// + /// 反弹次数 + /// + public int BounceCount; + + /// + /// 子弹最大穿透次数 + /// + public int Penetration; + + /// + /// 子弹最大存在时间 + /// + public float LifeTime; + + /// + /// 坐标 + /// + public Vector2 Position; + + /// + /// 旋转角度 + /// + public float Rotation; +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/effects/AutoDestroyParticles.cs b/DungeonShooting_Godot/src/game/effects/AutoDestroyParticles.cs index e7aba73..05ed68f 100644 --- a/DungeonShooting_Godot/src/game/effects/AutoDestroyParticles.cs +++ b/DungeonShooting_Godot/src/game/effects/AutoDestroyParticles.cs @@ -1,10 +1,11 @@  using Godot; +using Godot.Collections; /// /// 到期自动销毁的粒子特效 /// -public partial class AutoDestroyParticles : GpuParticles2D +public partial class AutoDestroyParticles : GpuParticles2D, IEffect { /// /// 延时销毁时间 @@ -12,11 +13,75 @@ [Export] public float DelayTime { get; set; } = 1f; - public override async void _Ready() + /// + /// 子节点包含的例子特效, 在创建完成后自动播放 + /// + [Export] + public Array Particles2D { get; set; } + + public bool IsDestroyed { get; private set; } + public bool IsRecycled { get; set; } + public string Logotype { get; set; } + + private double _timer; + private bool _isPlay; + + public virtual void PlayEffect() { Emitting = true; - var sceneTreeTimer = GetTree().CreateTimer(DelayTime); - await ToSignal(sceneTreeTimer, Timer.SignalName.Timeout); + if (Particles2D != null) + { + foreach (var gpuParticles2D in Particles2D) + { + gpuParticles2D.Emitting = true; + } + } + _timer = 0; + _isPlay = true; + } + + public override void _Process(double delta) + { + if (!_isPlay) + { + return; + } + _timer += delta; + if (_timer >= DelayTime) + { + Emitting = false; + if (Particles2D != null) + { + foreach (var gpuParticles2D in Particles2D) + { + gpuParticles2D.Emitting = false; + } + } + _isPlay = false; + ObjectPool.Reclaim(this); + } + } + + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; QueueFree(); } + + + public void OnReclaim() + { + GetParent().RemoveChild(this); + } + + public void OnLeavePool() + { + + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs b/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs index a24db0c..ad8d15d 100644 --- a/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs +++ b/DungeonShooting_Godot/src/game/effects/AutoDestroySprite.cs @@ -4,23 +4,35 @@ /// /// 到期自动销毁的帧动画 /// -public partial class AutoDestroySprite : AnimatedSprite2D +public partial class AutoDestroySprite : AnimatedSprite2D, IEffect { /// + /// 播放的动画名称 + /// + [Export] + public string AnimationName { get; set; } = "default"; + + /// /// 延时销毁时间 /// [Export] public float DelayTime { get; set; } = 1f; - + /// /// 子节点包含的例子特效, 在创建完成后自动播放 /// [Export] public Array Particles2D { get; set; } - public override async void _Ready() + public bool IsDestroyed { get; private set; } + public bool IsRecycled { get; set; } + public string Logotype { get; set; } + + private double _timer; + private bool _isPlay; + + public virtual void PlayEffect() { - var sceneTreeTimer = GetTree().CreateTimer(DelayTime); if (Particles2D != null) { foreach (var gpuParticles2D in Particles2D) @@ -28,7 +40,51 @@ gpuParticles2D.Emitting = true; } } - await ToSignal(sceneTreeTimer, Timer.SignalName.Timeout); + _timer = 0; + _isPlay = true; + Play(AnimationName); + } + + public override void _Process(double delta) + { + if (!_isPlay) + { + return; + } + _timer += delta; + if (_timer >= DelayTime) + { + if (Particles2D != null) + { + foreach (var gpuParticles2D in Particles2D) + { + gpuParticles2D.Emitting = false; + } + } + _isPlay = false; + ObjectPool.Reclaim(this); + } + } + + public void Destroy() + { + if (IsDestroyed) + { + return; + } + + IsDestroyed = true; QueueFree(); } + + + public void OnReclaim() + { + GetParent().RemoveChild(this); + } + + public void OnLeavePool() + { + + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/effects/Blood.cs b/DungeonShooting_Godot/src/game/effects/Blood.cs index 51c9832..ff21809 100644 --- a/DungeonShooting_Godot/src/game/effects/Blood.cs +++ b/DungeonShooting_Godot/src/game/effects/Blood.cs @@ -1,7 +1,7 @@ using Godot; /// -/// 血液溅射效果 +/// 血液溅射效果, 暂未用到 /// public partial class Blood : CpuParticles2D { diff --git a/DungeonShooting_Godot/src/game/effects/Effect1.cs b/DungeonShooting_Godot/src/game/effects/Effect1.cs deleted file mode 100644 index 485bd80..0000000 --- a/DungeonShooting_Godot/src/game/effects/Effect1.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Godot; - -public partial class Effect1 : AutoDestroyParticles -{ - public override void _Ready() - { - var c = GetNode("GPUParticles2D"); - c.Amount = Utils.Random.RandomRangeInt(2, 6); - c.Emitting = true; - - base._Ready(); - } - -} diff --git a/DungeonShooting_Godot/src/game/effects/EnemyDebris.cs b/DungeonShooting_Godot/src/game/effects/EnemyDebris.cs deleted file mode 100644 index 4e975ee..0000000 --- a/DungeonShooting_Godot/src/game/effects/EnemyDebris.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using System.Collections; -using Godot; - -[Tool] -public partial class EnemyDebris : ActivityObject -{ - - private GpuParticles2D _gpuParticles2D; - - public override void OnInit() - { - var frameCount = AnimatedSprite.SpriteFrames.GetFrameCount(AnimatorNames.Default); - AnimatedSprite.Frame = Utils.Random.RandomRangeInt(0, frameCount - 1); - - Throw( - Utils.Random.RandomRangeInt(0, 16), - Utils.Random.RandomRangeInt(10, 60), - new Vector2(Utils.Random.RandomRangeInt(-25, 25), Utils.Random.RandomRangeInt(-25, 25)), - Utils.Random.RandomRangeInt(-360, 360) - ); - - StartCoroutine(EmitParticles()); - } - - public IEnumerator EmitParticles() - { - var gpuParticles2D = GetNode("GPUParticles2D"); - gpuParticles2D.Emitting = true; - yield return new WaitForSeconds(Utils.Random.RandomRangeFloat(1f, 2.5f)); - gpuParticles2D.Emitting = false; - yield return new WaitForSeconds(1); - BecomesStaticImage(); - } -} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/effects/IEffect.cs b/DungeonShooting_Godot/src/game/effects/IEffect.cs new file mode 100644 index 0000000..2c0e231 --- /dev/null +++ b/DungeonShooting_Godot/src/game/effects/IEffect.cs @@ -0,0 +1,11 @@ + +/// +/// 特效接口 +/// +public interface IEffect : IPoolItem +{ + /// + /// 播放特效 + /// + void PlayEffect(); +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/effects/enemy/EnemyDebris.cs b/DungeonShooting_Godot/src/game/effects/enemy/EnemyDebris.cs new file mode 100644 index 0000000..d96d1c2 --- /dev/null +++ b/DungeonShooting_Godot/src/game/effects/enemy/EnemyDebris.cs @@ -0,0 +1,48 @@ + +using System.Collections; +using Godot; + +/// +/// 敌人死亡碎片 +/// +[Tool] +public partial class EnemyDebris : ActivityObject +{ + + private GpuParticles2D _gpuParticles2D; + private bool _playOver = false; + + public override void OnInit() + { + var frameCount = AnimatedSprite.SpriteFrames.GetFrameCount(AnimatorNames.Default); + AnimatedSprite.Frame = Utils.Random.RandomRangeInt(0, frameCount - 1); + + Throw( + Utils.Random.RandomRangeInt(0, 16), + Utils.Random.RandomRangeInt(10, 60), + new Vector2(Utils.Random.RandomRangeInt(-25, 25), Utils.Random.RandomRangeInt(-25, 25)), + Utils.Random.RandomRangeInt(-360, 360) + ); + + StartCoroutine(EmitParticles()); + } + + protected override void Process(float delta) + { + if (_playOver && !IsThrowing && Altitude <= 0 && MoveController.IsMotionless()) + { + MoveController.SetAllVelocity(Vector2.Zero); + Freeze(); + } + } + + public IEnumerator EmitParticles() + { + var gpuParticles2D = GetNode("GPUParticles2D"); + gpuParticles2D.Emitting = true; + yield return new WaitForSeconds(Utils.Random.RandomRangeFloat(1f, 2.5f)); + gpuParticles2D.Emitting = false; + yield return new WaitForSeconds(1); + _playOver = true; + } +} \ 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 632b0cb..28dd63a 100644 --- a/DungeonShooting_Godot/src/game/event/EventEnum.cs +++ b/DungeonShooting_Godot/src/game/event/EventEnum.cs @@ -7,7 +7,7 @@ public enum EventEnum { /// - /// 敌人死亡, 参数为死亡的敌人的实例, 参数类型为 + /// 敌人死亡, 参数为死亡的敌人的实例, 参数类型为 /// OnEnemyDie, /// diff --git a/DungeonShooting_Godot/src/game/manager/EditorWindowManager.cs b/DungeonShooting_Godot/src/game/manager/EditorWindowManager.cs index 878db9c..35f7451 100644 --- a/DungeonShooting_Godot/src/game/manager/EditorWindowManager.cs +++ b/DungeonShooting_Godot/src/game/manager/EditorWindowManager.cs @@ -332,7 +332,7 @@ /// 查找的类型, 如果为 none, 则查找所有类型数据 /// 选中物体时回调 /// 所属父级Ui - public static void ShowSelectObject(ActivityType findType, Action onSelectObject, UiBase parentUi = null) + public static void ShowSelectObject(ActivityType findType, Action onSelectObject, UiBase parentUi = null) { var window = CreateWindowInstance(parentUi); window.S_Window.Instance.Size = new Vector2I(1000, 700); diff --git a/DungeonShooting_Godot/src/game/manager/ObjectManager.cs b/DungeonShooting_Godot/src/game/manager/ObjectManager.cs new file mode 100644 index 0000000..4c5336e --- /dev/null +++ b/DungeonShooting_Godot/src/game/manager/ObjectManager.cs @@ -0,0 +1,61 @@ + +using Godot; + +public static class ObjectManager +{ + /// + /// 根据资源路径获取实例对象, 该对象必须实现 IPoolItem 接口 + /// + /// 资源路径 + public static IPoolItem GetPoolItem(string resPath) + { + var item = ObjectPool.GetItem(resPath); + if (item == null) + { + item = (IPoolItem)ResourceManager.LoadAndInstantiate(resPath); + item.Logotype = resPath; + } + + return item; + } + + /// + /// 根据资源路径获取实例对象, 该对象必须实现 IPoolItem 接口 + /// + /// 资源路径 + public static T GetPoolItem(string resPath) where T : IPoolItem + { + var item = ObjectPool.GetItem(resPath); + if (item == null) + { + item = (T)(IPoolItem)ResourceManager.LoadAndInstantiate(resPath); + item.Logotype = resPath; + } + + return item; + } + + public static Bullet GetBullet(string id) + { + var bullet = ObjectPool.GetItem(id); + if (bullet == null) + { + bullet = ActivityObject.Create(id); + bullet.Logotype = id; + } + + return bullet; + } + + public static Laser GetLaser(string resPath) + { + var bullet = ObjectPool.GetItem(resPath); + if (bullet == null) + { + bullet = ResourceManager.LoadAndInstantiate(resPath); + bullet.Logotype = resPath; + } + + return bullet; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs index 008031b..c4d4962 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs @@ -29,6 +29,8 @@ } private static ShaderMaterial _shadowMaterial; + + public static ShaderMaterial NewBlendMaterial => Load(ResourcePath.resource_material_Blend_tres, false); /// /// 颜色混合Shader @@ -128,6 +130,17 @@ /// /// 场景路径 /// 是否使用缓存中的资源 + public static Node LoadAndInstantiate(string path, bool useCache = true) + { + var packedScene = Load(path, useCache); + return packedScene.Instantiate(); + } + + /// + /// 加载并且实例化场景, 并返回 + /// + /// 场景路径 + /// 是否使用缓存中的资源 public static T LoadAndInstantiate(string path, bool useCache = true) where T : Node { var packedScene = Load(path, useCache); diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 40f2ec7..8ad701a 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -9,19 +9,22 @@ public const string excel_DungeonShooting_ExcelTool_deps_json = "res://excel/DungeonShooting_ExcelTool.deps.json"; public const string excel_DungeonShooting_ExcelTool_runtimeconfig_json = "res://excel/DungeonShooting_ExcelTool.runtimeconfig.json"; public const string prefab_Cursor_tscn = "res://prefab/Cursor.tscn"; - public const string prefab_bullet_Bullet0001_tscn = "res://prefab/bullet/Bullet0001.tscn"; - public const string prefab_bullet_Bullet0002_tscn = "res://prefab/bullet/Bullet0002.tscn"; - public const string prefab_bullet_Bullet0003_tscn = "res://prefab/bullet/Bullet0003.tscn"; + public const string prefab_bullet_explode_Explode0001_tscn = "res://prefab/bullet/explode/Explode0001.tscn"; + public const string prefab_bullet_laser_Laser0001_tscn = "res://prefab/bullet/laser/Laser0001.tscn"; + public const string prefab_bullet_normal_Bullet0001_tscn = "res://prefab/bullet/normal/Bullet0001.tscn"; + public const string prefab_bullet_normal_Bullet0002_tscn = "res://prefab/bullet/normal/Bullet0002.tscn"; + public const string prefab_bullet_normal_Bullet0003_tscn = "res://prefab/bullet/normal/Bullet0003.tscn"; + public const string prefab_bullet_normal_Bullet0004_tscn = "res://prefab/bullet/normal/Bullet0004.tscn"; public const string prefab_effect_Blood_tscn = "res://prefab/effect/Blood.tscn"; public const string prefab_effect_common_Effect1_tscn = "res://prefab/effect/common/Effect1.tscn"; public const string prefab_effect_enemy_Effect0001_tscn = "res://prefab/effect/enemy/Effect0001.tscn"; public const string prefab_effect_enemy_EnemyBloodEffect_tscn = "res://prefab/effect/enemy/EnemyBloodEffect.tscn"; public const string prefab_effect_weapon_BulletDisappear_tscn = "res://prefab/effect/weapon/BulletDisappear.tscn"; public const string prefab_effect_weapon_BulletSmoke_tscn = "res://prefab/effect/weapon/BulletSmoke.tscn"; - public const string prefab_effect_weapon_FirePart_tscn = "res://prefab/effect/weapon/FirePart.tscn"; public const string prefab_effect_weapon_MeleeAttack1_tscn = "res://prefab/effect/weapon/MeleeAttack1.tscn"; public const string prefab_effect_weapon_MeleeAttack2_tscn = "res://prefab/effect/weapon/MeleeAttack2.tscn"; public const string prefab_effect_weapon_ShotFire_tscn = "res://prefab/effect/weapon/ShotFire.tscn"; + public const string prefab_effect_weapon_ShotFire2_tscn = "res://prefab/effect/weapon/ShotFire2.tscn"; public const string prefab_map_RoomDoor_E_tscn = "res://prefab/map/RoomDoor_E.tscn"; 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"; @@ -39,12 +42,14 @@ public const string prefab_prop_buff_BuffProp0008_tscn = "res://prefab/prop/buff/BuffProp0008.tscn"; public const string prefab_prop_buff_BuffProp0009_tscn = "res://prefab/prop/buff/BuffProp0009.tscn"; public const string prefab_prop_buff_BuffProp0010_tscn = "res://prefab/prop/buff/BuffProp0010.tscn"; + public const string prefab_prop_buff_BuffProp0011_tscn = "res://prefab/prop/buff/BuffProp0011.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"; public const string prefab_shell_Shell0001_tscn = "res://prefab/shell/Shell0001.tscn"; public const string prefab_shell_Shell0002_tscn = "res://prefab/shell/Shell0002.tscn"; public const string prefab_shell_Shell0003_tscn = "res://prefab/shell/Shell0003.tscn"; + public const string prefab_shell_Shell0004_tscn = "res://prefab/shell/Shell0004.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"; @@ -75,10 +80,15 @@ public const string prefab_weapon_Weapon0005_tscn = "res://prefab/weapon/Weapon0005.tscn"; public const string prefab_weapon_Weapon0006_tscn = "res://prefab/weapon/Weapon0006.tscn"; public const string prefab_weapon_Weapon0007_tscn = "res://prefab/weapon/Weapon0007.tscn"; + public const string prefab_weapon_Weapon0008_tscn = "res://prefab/weapon/Weapon0008.tscn"; + public const string prefab_weapon_Weapon0009_tscn = "res://prefab/weapon/Weapon0009.tscn"; public const string prefab_weapon_WeaponTemplate_tscn = "res://prefab/weapon/WeaponTemplate.tscn"; - public const string resource_config_ActivityObject_json = "res://resource/config/ActivityObject.json"; + public const string resource_config_ActivityBase_json = "res://resource/config/ActivityBase.json"; + public const string resource_config_ActivityMaterial_json = "res://resource/config/ActivityMaterial.json"; + public const string resource_config_AiAttackAttr_json = "res://resource/config/AiAttackAttr.json"; + public const string resource_config_BulletBase_json = "res://resource/config/BulletBase.json"; public const string resource_config_Sound_json = "res://resource/config/Sound.json"; - public const string resource_config_Weapon_json = "res://resource/config/Weapon.json"; + public const string resource_config_WeaponBase_json = "res://resource/config/WeaponBase.json"; public const string resource_curve_Curve1_tres = "res://resource/curve/Curve1.tres"; public const string resource_font_DinkieBitmap7pxDemo_ttf = "res://resource/font/DinkieBitmap-7pxDemo.ttf"; public const string resource_font_DinkieBitmap9pxDemo_ttf = "res://resource/font/DinkieBitmap-9pxDemo.ttf"; @@ -110,11 +120,13 @@ public const string resource_sound_sfx_beLoaded_BeLoaded0015_ogg = "res://resource/sound/sfx/beLoaded/BeLoaded0015.ogg"; public const string resource_sound_sfx_beLoaded_BeLoaded0016_ogg = "res://resource/sound/sfx/beLoaded/BeLoaded0016.ogg"; public const string resource_sound_sfx_beLoaded_BeLoaded0017_ogg = "res://resource/sound/sfx/beLoaded/BeLoaded0017.ogg"; + public const string resource_sound_sfx_collision_Collision0001_ogg = "res://resource/sound/sfx/collision/Collision0001.ogg"; public const string resource_sound_sfx_explosion_Explosion0001_ogg = "res://resource/sound/sfx/explosion/Explosion0001.ogg"; public const string resource_sound_sfx_explosion_Explosion0002_ogg = "res://resource/sound/sfx/explosion/Explosion0002.ogg"; public const string resource_sound_sfx_explosion_Explosion0003_ogg = "res://resource/sound/sfx/explosion/Explosion0003.ogg"; public const string resource_sound_sfx_reloading_Reloading0001_ogg = "res://resource/sound/sfx/reloading/Reloading0001.ogg"; public const string resource_sound_sfx_reloading_Reloading0002_ogg = "res://resource/sound/sfx/reloading/Reloading0002.ogg"; + public const string resource_sound_sfx_reloading_Reloading0003_ogg = "res://resource/sound/sfx/reloading/Reloading0003.ogg"; public const string resource_sound_sfx_reloading_Reloading_begin0001_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0001.ogg"; public const string resource_sound_sfx_reloading_Reloading_begin0002_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0002.ogg"; public const string resource_sound_sfx_reloading_Reloading_begin0003_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0003.ogg"; @@ -125,8 +137,12 @@ public const string resource_sound_sfx_reloading_Reloading_begin0008_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0008.ogg"; public const string resource_sound_sfx_reloading_Reloading_begin0009_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0009.ogg"; public const string resource_sound_sfx_reloading_Reloading_begin0010_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0010.ogg"; + public const string resource_sound_sfx_reloading_Reloading_begin0011_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0011.ogg"; + public const string resource_sound_sfx_reloading_Reloading_begin0012_ogg = "res://resource/sound/sfx/reloading/Reloading_begin0012.ogg"; public const string resource_sound_sfx_reloading_Reloading_finish0001_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0001.ogg"; public const string resource_sound_sfx_reloading_Reloading_finish0002_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0002.ogg"; + public const string resource_sound_sfx_reloading_Reloading_finish0003_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0003.ogg"; + public const string resource_sound_sfx_reloading_Reloading_finish0004_ogg = "res://resource/sound/sfx/reloading/Reloading_finish0004.ogg"; public const string resource_sound_sfx_shooting_Shooting0001_ogg = "res://resource/sound/sfx/shooting/Shooting0001.ogg"; public const string resource_sound_sfx_shooting_Shooting0002_ogg = "res://resource/sound/sfx/shooting/Shooting0002.ogg"; public const string resource_sound_sfx_shooting_Shooting0003_ogg = "res://resource/sound/sfx/shooting/Shooting0003.ogg"; @@ -135,20 +151,31 @@ public const string resource_sound_sfx_shooting_Shooting0006_ogg = "res://resource/sound/sfx/shooting/Shooting0006.ogg"; public const string resource_sound_sfx_shooting_Shooting0007_ogg = "res://resource/sound/sfx/shooting/Shooting0007.ogg"; public const string resource_sound_sfx_shooting_Shooting0008_ogg = "res://resource/sound/sfx/shooting/Shooting0008.ogg"; - public const string resource_sprite_bullet_arrow_png = "res://resource/sprite/bullet/arrow.png"; - public const string resource_sprite_bullet_bullet0001_png = "res://resource/sprite/bullet/bullet0001.png"; - public const string resource_sprite_bullet_bullet0002_png = "res://resource/sprite/bullet/bullet0002.png"; - public const string resource_sprite_bullet_bullet0003_png = "res://resource/sprite/bullet/bullet0003.png"; - public const string resource_sprite_bullet_bullet2_png = "res://resource/sprite/bullet/bullet2.png"; + public const string resource_sound_sfx_shooting_Shooting0009_ogg = "res://resource/sound/sfx/shooting/Shooting0009.ogg"; + public const string resource_sound_sfx_shooting_Shooting0010_ogg = "res://resource/sound/sfx/shooting/Shooting0010.ogg"; + public const string resource_sound_sfx_shooting_Shooting0011_ogg = "res://resource/sound/sfx/shooting/Shooting0011.ogg"; + public const string resource_sprite_bullet_laser_Laser0001_png = "res://resource/sprite/bullet/laser/Laser0001.png"; + public const string resource_sprite_bullet_normal_arrow_png = "res://resource/sprite/bullet/normal/arrow.png"; + public const string resource_sprite_bullet_normal_bullet0001_png = "res://resource/sprite/bullet/normal/bullet0001.png"; + public const string resource_sprite_bullet_normal_bullet0002_png = "res://resource/sprite/bullet/normal/bullet0002.png"; + public const string resource_sprite_bullet_normal_bullet0003_png = "res://resource/sprite/bullet/normal/bullet0003.png"; + public const string resource_sprite_bullet_normal_bullet0004_png = "res://resource/sprite/bullet/normal/bullet0004.png"; + public const string resource_sprite_bullet_normal_bullet2_png = "res://resource/sprite/bullet/normal/bullet2.png"; public const string resource_sprite_effects_Circle_png = "res://resource/sprite/effects/Circle.png"; + public const string resource_sprite_effects_Circle2_png = "res://resource/sprite/effects/Circle2.png"; public const string resource_sprite_effects_debug_arrows_png = "res://resource/sprite/effects/debug_arrows.png"; public const string resource_sprite_effects_Explosion_png = "res://resource/sprite/effects/Explosion.png"; public const string resource_sprite_effects_common_Effect1_png = "res://resource/sprite/effects/common/Effect1.png"; public const string resource_sprite_effects_common_Smoke_png = "res://resource/sprite/effects/common/Smoke.png"; + public const string resource_sprite_effects_common_Smoke2_png = "res://resource/sprite/effects/common/Smoke2.png"; + public const string resource_sprite_effects_explode_Explode_circle0001_png = "res://resource/sprite/effects/explode/Explode_circle0001.png"; + public const string resource_sprite_effects_explode_Explode_line0001_png = "res://resource/sprite/effects/explode/Explode_line0001.png"; + public const string resource_sprite_effects_explode_Explode_pit0001_png = "res://resource/sprite/effects/explode/Explode_pit0001.png"; public const string resource_sprite_effects_weapon_Collision1_png = "res://resource/sprite/effects/weapon/Collision1.png"; public const string resource_sprite_effects_weapon_KnifeHit1_png = "res://resource/sprite/effects/weapon/KnifeHit1.png"; public const string resource_sprite_effects_weapon_MeleeAttack1_png = "res://resource/sprite/effects/weapon/MeleeAttack1.png"; public const string resource_sprite_effects_weapon_ShotFire_png = "res://resource/sprite/effects/weapon/ShotFire.png"; + public const string resource_sprite_effects_weapon_ShotFire2_png = "res://resource/sprite/effects/weapon/ShotFire2.png"; public const string resource_sprite_map_door_png = "res://resource/sprite/map/door.png"; public const string resource_sprite_map_door1_down_png = "res://resource/sprite/map/door1_down.png"; public const string resource_sprite_map_PreviewTransition_png = "res://resource/sprite/map/PreviewTransition.png"; @@ -168,6 +195,7 @@ public const string resource_sprite_prop_buff_BuffProp0008_png = "res://resource/sprite/prop/buff/BuffProp0008.png"; public const string resource_sprite_prop_buff_BuffProp0009_png = "res://resource/sprite/prop/buff/BuffProp0009.png"; public const string resource_sprite_prop_buff_BuffProp0010_png = "res://resource/sprite/prop/buff/BuffProp0010.png"; + public const string resource_sprite_prop_buff_BuffProp0011_png = "res://resource/sprite/prop/buff/BuffProp0011.png"; public const string resource_sprite_role_role10_png = "res://resource/sprite/role/role10.png"; public const string resource_sprite_role_role3_png = "res://resource/sprite/role/role3.png"; public const string resource_sprite_role_role4_png = "res://resource/sprite/role/role4.png"; @@ -179,6 +207,7 @@ public const string resource_sprite_role_enemy0001_enemy0001_png = "res://resource/sprite/role/enemy0001/enemy0001.png"; public const string resource_sprite_role_enemy0001_enemy0001_Debris_png = "res://resource/sprite/role/enemy0001/enemy0001_Debris.png"; public const string resource_sprite_role_enemy0001_enemy0001_Icon_png = "res://resource/sprite/role/enemy0001/enemy0001_Icon.png"; + public const string resource_sprite_role_enemy0002_Enemy0002_png = "res://resource/sprite/role/enemy0002/Enemy0002.png"; public const string resource_sprite_role_role0001_Role0001_png = "res://resource/sprite/role/role0001/Role0001.png"; public const string resource_sprite_role_role0001_Role0001_Icon_png = "res://resource/sprite/role/role0001/Role0001_Icon.png"; public const string resource_sprite_role_role0001_idle_Sprite0002_png = "res://resource/sprite/role/role0001/idle/Sprite-0002.png"; @@ -207,6 +236,7 @@ public const string resource_sprite_shell_Shell0001_png = "res://resource/sprite/shell/Shell0001.png"; public const string resource_sprite_shell_Shell0002_png = "res://resource/sprite/shell/Shell0002.png"; public const string resource_sprite_shell_Shell0003_png = "res://resource/sprite/shell/Shell0003.png"; + public const string resource_sprite_shell_Shell0004_png = "res://resource/sprite/shell/Shell0004.png"; public const string resource_sprite_ui_font_bg_png = "res://resource/sprite/ui/font_bg.png"; public const string resource_sprite_ui_GUI_png = "res://resource/sprite/ui/GUI.png"; public const string resource_sprite_ui_commonIcon_Add_png = "res://resource/sprite/ui/commonIcon/Add.png"; @@ -276,9 +306,14 @@ 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_sprite_weapon_weapon0007_Weapon0007_png = "res://resource/sprite/weapon/weapon0007/Weapon0007.png"; + public const string resource_sprite_weapon_weapon0008_Weapon0008_png = "res://resource/sprite/weapon/weapon0008/Weapon0008.png"; + public const string resource_sprite_weapon_weapon0008_Weapon0008_reloading_png = "res://resource/sprite/weapon/weapon0008/Weapon0008_reloading.png"; + public const string resource_sprite_weapon_weapon0009_weapon0009_png = "res://resource/sprite/weapon/weapon0009/weapon0009.png"; + public const string resource_sprite_weapon_weapon0009_Weapon0009_reload_png = "res://resource/sprite/weapon/weapon0009/Weapon0009_reload.png"; 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_bullet_Bullet0003_tres = "res://resource/spriteFrames/bullet/Bullet0003.tres"; + public const string resource_spriteFrames_bullet_Bullet0004_tres = "res://resource/spriteFrames/bullet/Bullet0004.tres"; public const string resource_spriteFrames_effect_KnifeHit1_tres = "res://resource/spriteFrames/effect/KnifeHit1.tres"; public const string resource_spriteFrames_other_RoomDoor_E_Down_tres = "res://resource/spriteFrames/other/RoomDoor_E_Down.tres"; public const string resource_spriteFrames_other_RoomDoor_E_Up_tres = "res://resource/spriteFrames/other/RoomDoor_E_Up.tres"; @@ -298,11 +333,14 @@ public const string resource_spriteFrames_prop_buff_BuffProp0008_tres = "res://resource/spriteFrames/prop/buff/BuffProp0008.tres"; public const string resource_spriteFrames_prop_buff_BuffProp0009_tres = "res://resource/spriteFrames/prop/buff/BuffProp0009.tres"; public const string resource_spriteFrames_prop_buff_BuffProp0010_tres = "res://resource/spriteFrames/prop/buff/BuffProp0010.tres"; + public const string resource_spriteFrames_prop_buff_BuffProp0011_tres = "res://resource/spriteFrames/prop/buff/BuffProp0011.tres"; + public const string resource_spriteFrames_role_Enemy0001_tres = "res://resource/spriteFrames/role/Enemy0001.tres"; + public const string resource_spriteFrames_role_Enemy0002_tres = "res://resource/spriteFrames/role/Enemy0002.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_shell_Shell0004_tres = "res://resource/spriteFrames/shell/Shell0004.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"; @@ -310,20 +348,20 @@ 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_spriteFrames_weapon_Weapon0007_tres = "res://resource/spriteFrames/weapon/Weapon0007.tres"; + public const string resource_spriteFrames_weapon_Weapon0008_tres = "res://resource/spriteFrames/weapon/Weapon0008.tres"; + public const string resource_spriteFrames_weapon_Weapon0009_tres = "res://resource/spriteFrames/weapon/Weapon0009.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_Main_tscn = "res://scene/Main.tscn"; public const string scene_World_tscn = "res://scene/World.tscn"; - public const string scene_test_TestCommpont_tscn = "res://scene/test/TestCommpont.tscn"; public const string scene_test_TestCreateSector_tscn = "res://scene/test/TestCreateSector.tscn"; - public const string scene_test_TestExpression_tscn = "res://scene/test/TestExpression.tscn"; - public const string scene_test_TestGenerateDungeon_tscn = "res://scene/test/TestGenerateDungeon.tscn"; + public const string scene_test_TestDrawSprite_tscn = "res://scene/test/TestDrawSprite.tscn"; + public const string scene_test_TestGridData_tscn = "res://scene/test/TestGridData.tscn"; public const string scene_test_TestNavigation2_tscn = "res://scene/test/TestNavigation2.tscn"; public const string scene_test_TestNavigationPolygon_tscn = "res://scene/test/TestNavigationPolygon.tscn"; public const string scene_test_TestNewTileMap_tscn = "res://scene/test/TestNewTileMap.tscn"; public const string scene_test_TestOptimizeSprite_tscn = "res://scene/test/TestOptimizeSprite.tscn"; public const string scene_test_TestOutline_tscn = "res://scene/test/TestOutline.tscn"; - public const string scene_test_TestReadExcel_tscn = "res://scene/test/TestReadExcel.tscn"; public const string scene_test_TestRoomFog_tscn = "res://scene/test/TestRoomFog.tscn"; public const string scene_test_TestTileLayer_tscn = "res://scene/test/TestTileLayer.tscn"; } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/SoundManager.cs b/DungeonShooting_Godot/src/game/manager/SoundManager.cs index 679cb32..80790b0 100644 --- a/DungeonShooting_Godot/src/game/manager/SoundManager.cs +++ b/DungeonShooting_Godot/src/game/manager/SoundManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using Config; using Godot; /// @@ -190,6 +191,63 @@ soundNode.PlaySoundByResource(soundName, delayTime); return soundNode; } + + /// + /// 根据音效配置表Id播放音效 + /// + /// 音效Id + /// 播放音效的位置, 该位置为 SubViewport 下的坐标, 也就是 使用的坐标 + /// 触发播放音效的角色, 因为 Npc 产生的音效声音更小, 可以传 null + public static GameAudioPlayer2D PlaySoundByConfig(string id, Vector2 viewPosition, AdvancedRole triggerRole = null) + { + var sound = ExcelConfig.Sound_Map[id]; + return PlaySoundByConfig(sound, viewPosition, triggerRole); + } + + /// + /// 根据音效配置播放音效 + /// + /// 音效数据 + /// 播放音效的位置, 该位置为 SubViewport 下的坐标, 也就是 使用的坐标 + /// 触发播放音效的角色, 因为 Npc 产生的音效声音更小, 可以传 null + public static GameAudioPlayer2D PlaySoundByConfig(ExcelConfig.Sound sound, Vector2 viewPosition, AdvancedRole triggerRole = null) + { + return PlaySoundEffectPosition( + sound.Path, + GameApplication.Instance.ViewToGlobalPosition(viewPosition), + CalcRoleVolume(sound.Volume, triggerRole) + ); + } + + /// + /// 根据音效配置表Id延时播放音效 + /// + /// 音效Id + /// 播放音效的位置, 该位置为 SubViewport 下的坐标, 也就是 使用的坐标 + /// 延时时间 + /// 触发播放音效的角色, 因为 Npc 产生的音效声音更小, 可以传 null + public static GameAudioPlayer2D PlaySoundByConfigDelay(string id, Vector2 viewPosition, float delayTime, AdvancedRole triggerRole = null) + { + var sound = ExcelConfig.Sound_Map[id]; + return PlaySoundByConfigDelay(sound, viewPosition, delayTime, triggerRole); + } + + /// + /// 根据音效配置延时播放音效 + /// + /// 音效数据 + /// 播放音效的位置, 该位置为 SubViewport 下的坐标, 也就是 使用的坐标 + /// 延时时间 + /// 触发播放音效的角色, 因为 Npc 产生的音效声音更小, 可以传 null + public static GameAudioPlayer2D PlaySoundByConfigDelay(ExcelConfig.Sound sound, Vector2 viewPosition, float delayTime, AdvancedRole triggerRole = null) + { + return PlaySoundEffectPositionDelay( + sound.Path, + GameApplication.Instance.ViewToGlobalPosition(viewPosition), + delayTime, + CalcRoleVolume(sound.Volume, triggerRole) + ); + } /// /// 获取2D音频播放节点 @@ -245,7 +303,7 @@ /// /// 计算指定角色播放音效使用的音量 /// - public static float CalcRoleVolume(float volume, Role role) + public static float CalcRoleVolume(float volume, AdvancedRole role) { if (role is not Player) { diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index 822e63e..09a0576 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -185,7 +185,7 @@ //更新敌人视野 UpdateEnemiesView(); - if (GameApplication.Instance.Debug) + if (ActivityObject.IsDebug) { QueueRedraw(); } @@ -325,6 +325,8 @@ CreateDoor(roomInfo); //创建房间归属区域 CreateRoomAffiliation(roomInfo); + //创建 RoomStaticSprite + CreateRoomStaticSprite(roomInfo); //创建静态精灵画布 CreateRoomStaticSpriteCanvas(roomInfo); //创建迷雾遮罩 @@ -411,24 +413,31 @@ World.AffiliationAreaRoot.AddChild(affiliation); } + //创建 RoomStaticSprite + private void CreateRoomStaticSprite(RoomInfo roomInfo) + { + var spriteRoot = new RoomStaticSprite(roomInfo); + spriteRoot.Name = "SpriteRoot"; + World.Current.StaticSpriteRoot.AddChild(spriteRoot); + roomInfo.StaticSprite = spriteRoot; + } + //创建静态精灵画布 private void CreateRoomStaticSpriteCanvas(RoomInfo roomInfo) { var worldPos = roomInfo.GetWorldPosition(); var rect = roomInfo.OuterRange; - int minX = rect.Position.X - GameConfig.TileCellSize; - int minY = rect.Position.Y - GameConfig.TileCellSize; - int maxX = rect.End.X + GameConfig.TileCellSize; - int maxY = rect.End.Y + GameConfig.TileCellSize; + var minX = rect.Position.X - GameConfig.TileCellSize; + var minY = rect.Position.Y - GameConfig.TileCellSize; + var maxX = rect.End.X + GameConfig.TileCellSize; + var maxY = rect.End.Y + GameConfig.TileCellSize; - var staticSpriteCanvas = new RoomStaticImageCanvas( - World.StaticSpriteRoot, - new Vector2I(minX, minY), - maxX - minX, maxY - minY - ); - staticSpriteCanvas.RoomOffset = new Vector2I(worldPos.X - minX, worldPos.Y - minY); - roomInfo.StaticImageCanvas = staticSpriteCanvas; + var canvasSprite = new ImageCanvas(maxX - minX, maxY - minY); + canvasSprite.Position = new Vector2I(minX, minY); + roomInfo.RoomOffset = new Vector2I(worldPos.X - minX, worldPos.Y - minY); + roomInfo.StaticImageCanvas = canvasSprite; + roomInfo.StaticSprite.AddChild(canvasSprite); } //创建迷雾遮罩 @@ -558,9 +567,23 @@ //不与玩家处于同一个房间 if (enemy.AffiliationArea != playerAffiliationArea) { - if (enemy.StateController.CurrState != AiStateEnum.AiNormal) + if (enemy is Enemy e) { - enemy.StateController.ChangeState(AiStateEnum.AiNormal); + if (e.StateController.CurrState != AiStateEnum.AiNormal) + { + e.StateController.ChangeState(AiStateEnum.AiNormal); + } + } + else if (enemy is AdvancedEnemy ae) + { + if (ae.StateController.CurrState != AiStateEnum.AiNormal) + { + ae.StateController.ChangeState(AiStateEnum.AiNormal); + } + } + else + { + throw new Exception("World.Enemy_InstanceList 混入了非 Enemy 和 AdvancedEnemy 类型的对象!"); } } } @@ -621,7 +644,19 @@ for (var i = 0; i < World.Enemy_InstanceList.Count; i++) { var enemy = World.Enemy_InstanceList[i]; - var state = enemy.StateController.CurrState; + AiStateEnum state; + if (enemy is Enemy e) + { + state = e.StateController.CurrState; + } + else if (enemy is AdvancedEnemy ae) + { + state = ae.StateController.CurrState; + } + else + { + throw new Exception("World.Enemy_InstanceList 混入了非 Enemy 和 AdvancedEnemy 类型的对象!"); + } if (state == AiStateEnum.AiFollowUp || state == AiStateEnum.AiSurround) //目标在视野内 { if (!World.Enemy_IsFindTarget) @@ -642,9 +677,9 @@ public override void _Draw() { - if (GameApplication.Instance.Debug) + if (ActivityObject.IsDebug) { - if (_dungeonTileMap != null) + if (_dungeonTileMap != null && _roomStaticNavigationList != null) { //绘制ai寻路区域 Utils.DrawNavigationPolygon(this, _roomStaticNavigationList.ToArray()); diff --git a/DungeonShooting_Godot/src/game/room/World.cs b/DungeonShooting_Godot/src/game/room/World.cs index 00ca2eb..30a6676 100644 --- a/DungeonShooting_Godot/src/game/room/World.cs +++ b/DungeonShooting_Godot/src/game/room/World.cs @@ -62,7 +62,7 @@ /// /// 记录所有存活的敌人 /// - public List Enemy_InstanceList { get; } = new List(); + public List Enemy_InstanceList { get; } = new List(); /// /// 公共属性, 敌人是否找到目标, 如果找到目标, 则与目标同房间的所有敌人都会知道目标的位置 @@ -84,6 +84,8 @@ public override void _Ready() { + Color = Colors.Black; + //临时处理, 加载TileSet var tileSet = ResourceManager.Load(ResourcePath.resource_map_tileSet_map1_TileSet1_tres); var tileSetAtlasSource = (TileSetAtlasSource)tileSet.GetSource(0); @@ -95,10 +97,7 @@ public override void _Process(double delta) { //协程更新 - if (_coroutineList != null) - { - ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, (float)delta); - } + ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, (float)delta); } /// diff --git a/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTipsPanel.cs b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTipsPanel.cs index ff23c3e..a7bba64 100644 --- a/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTipsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/bottomTips/BottomTipsPanel.cs @@ -69,7 +69,7 @@ yield return 0; //向上移动 - var frame = 60 * _animationTime; + var frame = GameApplication.Instance.TargetFps * _animationTime; var stepPixel = _movePixel / frame; for (var i = 0; i < frame; i++) { diff --git a/DungeonShooting_Godot/src/game/ui/debugger/Debugger.cs b/DungeonShooting_Godot/src/game/ui/debugger/Debugger.cs index e63e0d4..f663a64 100644 --- a/DungeonShooting_Godot/src/game/ui/debugger/Debugger.cs +++ b/DungeonShooting_Godot/src/game/ui/debugger/Debugger.cs @@ -31,6 +31,19 @@ } private HoverButton _L_HoverButton; + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Debugger.Fps + /// + public Fps L_Fps + { + get + { + if (_L_Fps == null) _L_Fps = new Fps((DebuggerPanel)this, GetNode("Fps")); + return _L_Fps; + } + } + private Fps _L_Fps; + public Debugger() : base(nameof(Debugger)) { @@ -147,6 +160,15 @@ public override HoverButton Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } + /// + /// 类型: , 路径: Debugger.Fps + /// + public class Fps : UiNode + { + public Fps(DebuggerPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Fps Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.Bg.Clear @@ -178,4 +200,9 @@ /// public HoverButton S_HoverButton => L_HoverButton; + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Debugger.Fps + /// + public Fps S_Fps => L_Fps; + } diff --git a/DungeonShooting_Godot/src/game/ui/debugger/DebuggerPanel.cs b/DungeonShooting_Godot/src/game/ui/debugger/DebuggerPanel.cs index 68d13f4..62c13bb 100644 --- a/DungeonShooting_Godot/src/game/ui/debugger/DebuggerPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/debugger/DebuggerPanel.cs @@ -51,6 +51,8 @@ } } } + + S_Fps.Instance.Text = "FPS:" + Engine.GetFramesPerSecond(); } private void OnMouseDown() diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs index bf3436d..28c78f3 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorTools.cs @@ -8,801 +8,529 @@ /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer /// - public EditorTools_ScrollContainer L_ScrollContainer + public ScrollContainer L_ScrollContainer { get { - if (_L_ScrollContainer == null) _L_ScrollContainer = new EditorTools_ScrollContainer(this, GetNodeOrNull("ScrollContainer")); + if (_L_ScrollContainer == null) _L_ScrollContainer = new ScrollContainer((EditorToolsPanel)this, GetNode("ScrollContainer")); return _L_ScrollContainer; } } - private EditorTools_ScrollContainer _L_ScrollContainer; + private ScrollContainer _L_ScrollContainer; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.Confirm /// - public EditorTools_Confirm L_Confirm + public Confirm L_Confirm { get { - if (_L_Confirm == null) _L_Confirm = new EditorTools_Confirm(this, GetNodeOrNull("Confirm")); + if (_L_Confirm == null) _L_Confirm = new Confirm((EditorToolsPanel)this, GetNode("Confirm")); return _L_Confirm; } } - private EditorTools_Confirm _L_Confirm; + private Confirm _L_Confirm; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.Tips /// - public EditorTools_Tips L_Tips + public Tips L_Tips { get { - if (_L_Tips == null) _L_Tips = new EditorTools_Tips(this, GetNodeOrNull("Tips")); + if (_L_Tips == null) _L_Tips = new Tips((EditorToolsPanel)this, GetNode("Tips")); return _L_Tips; } } - private EditorTools_Tips _L_Tips; + private Tips _L_Tips; public EditorTools() : base(nameof(EditorTools)) { } + public sealed override void OnInitNestedUi() + { + + } + /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer.Label /// - public class EditorTools_Label : UiNode + public class Label : UiNode { - public EditorTools_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + public Label(EditorToolsPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer.Button /// - public class EditorTools_Button : UiNode + public class Button : UiNode { - public EditorTools_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override EditorTools_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Button(EditorToolsPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer /// - public class EditorTools_HBoxContainer : UiNode + public class HBoxContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label /// - public EditorTools_Label L_Label + public Label L_Label { get { - if (_L_Label == null) _L_Label = new EditorTools_Label(UiPanel, Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new Label(UiPanel, Instance.GetNode("Label")); return _L_Label; } } - private EditorTools_Label _L_Label; + private Label _L_Label; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button /// - public EditorTools_Button L_Button + public Button L_Button { get { - if (_L_Button == null) _L_Button = new EditorTools_Button(UiPanel, Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new Button(UiPanel, Instance.GetNode("Button")); return _L_Button; } } - private EditorTools_Button _L_Button; + private Button _L_Button; - public EditorTools_HBoxContainer(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + public HBoxContainer(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3.Label /// - public class EditorTools1_Label : UiNode + public class Label_1 : UiNode { - public EditorTools1_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools1_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + public Label_1(EditorToolsPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label_1 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3.LineEdit /// - public class EditorTools_LineEdit : UiNode + public class LineEdit : UiNode { - public EditorTools_LineEdit(EditorTools uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } - public override EditorTools_LineEdit Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); + public LineEdit(EditorToolsPanel uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } + public override LineEdit Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3.Button /// - public class EditorTools1_Button : UiNode + public class Button_1 : UiNode { - public EditorTools1_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override EditorTools1_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Button_1(EditorToolsPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Button_1 Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3 /// - public class EditorTools_HBoxContainer3 : UiNode + public class HBoxContainer3 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label /// - public EditorTools1_Label L_Label + public Label_1 L_Label { get { - if (_L_Label == null) _L_Label = new EditorTools1_Label(UiPanel, Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new Label_1(UiPanel, Instance.GetNode("Label")); return _L_Label; } } - private EditorTools1_Label _L_Label; + private Label_1 _L_Label; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.LineEdit /// - public EditorTools_LineEdit L_LineEdit + public LineEdit L_LineEdit { get { - if (_L_LineEdit == null) _L_LineEdit = new EditorTools_LineEdit(UiPanel, Instance.GetNodeOrNull("LineEdit")); + if (_L_LineEdit == null) _L_LineEdit = new LineEdit(UiPanel, Instance.GetNode("LineEdit")); return _L_LineEdit; } } - private EditorTools_LineEdit _L_LineEdit; + private LineEdit _L_LineEdit; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button /// - public EditorTools1_Button L_Button + public Button_1 L_Button { get { - if (_L_Button == null) _L_Button = new EditorTools1_Button(UiPanel, Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new Button_1(UiPanel, Instance.GetNode("Button")); return _L_Button; } } - private EditorTools1_Button _L_Button; + private Button_1 _L_Button; - public EditorTools_HBoxContainer3(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_HBoxContainer3 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + public HBoxContainer3(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer3 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer4.Label /// - public class EditorTools2_Label : UiNode + public class Label_2 : UiNode { - public EditorTools2_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools2_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + public Label_2(EditorToolsPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label_2 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer4.Button /// - public class EditorTools2_Button : UiNode + public class Button_2 : UiNode { - public EditorTools2_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override EditorTools2_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Button_2(EditorToolsPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Button_2 Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer4 /// - public class EditorTools_HBoxContainer4 : UiNode + public class HBoxContainer4 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label /// - public EditorTools2_Label L_Label + public Label_2 L_Label { get { - if (_L_Label == null) _L_Label = new EditorTools2_Label(UiPanel, Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new Label_2(UiPanel, Instance.GetNode("Label")); return _L_Label; } } - private EditorTools2_Label _L_Label; + private Label_2 _L_Label; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button /// - public EditorTools2_Button L_Button + public Button_2 L_Button { get { - if (_L_Button == null) _L_Button = new EditorTools2_Button(UiPanel, Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new Button_2(UiPanel, Instance.GetNode("Button")); return _L_Button; } } - private EditorTools2_Button _L_Button; + private Button_2 _L_Button; - public EditorTools_HBoxContainer4(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_HBoxContainer4 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + public HBoxContainer4(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer4 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer5.Label /// - public class EditorTools3_Label : UiNode + public class Label_3 : UiNode { - public EditorTools3_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools3_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + public Label_3(EditorToolsPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label_3 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer5.Button /// - public class EditorTools3_Button : UiNode + public class Button_3 : UiNode { - public EditorTools3_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override EditorTools3_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Button_3(EditorToolsPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Button_3 Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer5 /// - public class EditorTools_HBoxContainer5 : UiNode + public class HBoxContainer5 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label /// - public EditorTools3_Label L_Label + public Label_3 L_Label { get { - if (_L_Label == null) _L_Label = new EditorTools3_Label(UiPanel, Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new Label_3(UiPanel, Instance.GetNode("Label")); return _L_Label; } } - private EditorTools3_Label _L_Label; + private Label_3 _L_Label; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button /// - public EditorTools3_Button L_Button + public Button_3 L_Button { get { - if (_L_Button == null) _L_Button = new EditorTools3_Button(UiPanel, Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new Button_3(UiPanel, Instance.GetNode("Button")); return _L_Button; } } - private EditorTools3_Button _L_Button; + private Button_3 _L_Button; - public EditorTools_HBoxContainer5(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_HBoxContainer5 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label - /// - public class EditorTools4_Label : UiNode - { - public EditorTools4_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools4_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomNameInput - /// - public class EditorTools_RoomNameInput : UiNode - { - public EditorTools_RoomNameInput(EditorTools uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } - public override EditorTools_RoomNameInput Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label2 - /// - public class EditorTools_Label2 : UiNode - { - public EditorTools_Label2(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools_Label2 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomGroupSelect - /// - public class EditorTools_RoomGroupSelect : UiNode - { - public EditorTools_RoomGroupSelect(EditorTools uiPanel, Godot.OptionButton node) : base(uiPanel, node) { } - public override EditorTools_RoomGroupSelect Clone() => new (UiPanel, (Godot.OptionButton)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label3 - /// - public class EditorTools_Label3 : UiNode - { - public EditorTools_Label3(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools_Label3 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomTypeSelect - /// - public class EditorTools_RoomTypeSelect : UiNode - { - public EditorTools_RoomTypeSelect(EditorTools uiPanel, Godot.OptionButton node) : base(uiPanel, node) { } - public override EditorTools_RoomTypeSelect Clone() => new (UiPanel, (Godot.OptionButton)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Button - /// - public class EditorTools4_Button : UiNode - { - public EditorTools4_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override EditorTools4_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6 - /// - public class EditorTools_HBoxContainer6 : UiNode - { - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label - /// - public EditorTools4_Label L_Label - { - get - { - if (_L_Label == null) _L_Label = new EditorTools4_Label(UiPanel, Instance.GetNodeOrNull("Label")); - return _L_Label; - } - } - private EditorTools4_Label _L_Label; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.RoomNameInput - /// - public EditorTools_RoomNameInput L_RoomNameInput - { - get - { - if (_L_RoomNameInput == null) _L_RoomNameInput = new EditorTools_RoomNameInput(UiPanel, Instance.GetNodeOrNull("RoomNameInput")); - return _L_RoomNameInput; - } - } - private EditorTools_RoomNameInput _L_RoomNameInput; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label2 - /// - public EditorTools_Label2 L_Label2 - { - get - { - if (_L_Label2 == null) _L_Label2 = new EditorTools_Label2(UiPanel, Instance.GetNodeOrNull("Label2")); - return _L_Label2; - } - } - private EditorTools_Label2 _L_Label2; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.RoomGroupSelect - /// - public EditorTools_RoomGroupSelect L_RoomGroupSelect - { - get - { - if (_L_RoomGroupSelect == null) _L_RoomGroupSelect = new EditorTools_RoomGroupSelect(UiPanel, Instance.GetNodeOrNull("RoomGroupSelect")); - return _L_RoomGroupSelect; - } - } - private EditorTools_RoomGroupSelect _L_RoomGroupSelect; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label3 - /// - public EditorTools_Label3 L_Label3 - { - get - { - if (_L_Label3 == null) _L_Label3 = new EditorTools_Label3(UiPanel, Instance.GetNodeOrNull("Label3")); - return _L_Label3; - } - } - private EditorTools_Label3 _L_Label3; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.RoomTypeSelect - /// - public EditorTools_RoomTypeSelect L_RoomTypeSelect - { - get - { - if (_L_RoomTypeSelect == null) _L_RoomTypeSelect = new EditorTools_RoomTypeSelect(UiPanel, Instance.GetNodeOrNull("RoomTypeSelect")); - return _L_RoomTypeSelect; - } - } - private EditorTools_RoomTypeSelect _L_RoomTypeSelect; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button - /// - public EditorTools4_Button L_Button - { - get - { - if (_L_Button == null) _L_Button = new EditorTools4_Button(UiPanel, Instance.GetNodeOrNull("Button")); - return _L_Button; - } - } - private EditorTools4_Button _L_Button; - - public EditorTools_HBoxContainer6(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_HBoxContainer6 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer2.Label - /// - public class EditorTools5_Label : UiNode - { - public EditorTools5_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools5_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer2.Button - /// - public class EditorTools5_Button : UiNode - { - public EditorTools5_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override EditorTools5_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); - } - - /// - /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer2 - /// - public class EditorTools_HBoxContainer2 : UiNode - { - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label - /// - public EditorTools5_Label L_Label - { - get - { - if (_L_Label == null) _L_Label = new EditorTools5_Label(UiPanel, Instance.GetNodeOrNull("Label")); - return _L_Label; - } - } - private EditorTools5_Label _L_Label; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button - /// - public EditorTools5_Button L_Button - { - get - { - if (_L_Button == null) _L_Button = new EditorTools5_Button(UiPanel, Instance.GetNodeOrNull("Button")); - return _L_Button; - } - } - private EditorTools5_Button _L_Button; - - public EditorTools_HBoxContainer2(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_HBoxContainer2 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + public HBoxContainer5(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer5 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Label /// - public class EditorTools6_Label : UiNode + public class Label_4 : UiNode { - public EditorTools6_Label(EditorTools uiPanel, Godot.Label node) : base(uiPanel, node) { } - public override EditorTools6_Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + public Label_4(EditorToolsPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label_4 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7.Button /// - public class EditorTools6_Button : UiNode + public class Button_4 : UiNode { - public EditorTools6_Button(EditorTools uiPanel, Godot.Button node) : base(uiPanel, node) { } - public override EditorTools6_Button Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + public Button_4(EditorToolsPanel uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override Button_4 Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7 /// - public class EditorTools_HBoxContainer7 : UiNode + public class HBoxContainer7 : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Label /// - public EditorTools6_Label L_Label + public Label_4 L_Label { get { - if (_L_Label == null) _L_Label = new EditorTools6_Label(UiPanel, Instance.GetNodeOrNull("Label")); + if (_L_Label == null) _L_Label = new Label_4(UiPanel, Instance.GetNode("Label")); return _L_Label; } } - private EditorTools6_Label _L_Label; + private Label_4 _L_Label; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.Button /// - public EditorTools6_Button L_Button + public Button_4 L_Button { get { - if (_L_Button == null) _L_Button = new EditorTools6_Button(UiPanel, Instance.GetNodeOrNull("Button")); + if (_L_Button == null) _L_Button = new Button_4(UiPanel, Instance.GetNode("Button")); return _L_Button; } } - private EditorTools6_Button _L_Button; + private Button_4 _L_Button; - public EditorTools_HBoxContainer7(EditorTools uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_HBoxContainer7 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + public HBoxContainer7(EditorToolsPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer7 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer /// - public class EditorTools_VBoxContainer : UiNode + public class VBoxContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer /// - public EditorTools_HBoxContainer L_HBoxContainer + public HBoxContainer L_HBoxContainer { get { - if (_L_HBoxContainer == null) _L_HBoxContainer = new EditorTools_HBoxContainer(UiPanel, Instance.GetNodeOrNull("HBoxContainer")); + if (_L_HBoxContainer == null) _L_HBoxContainer = new HBoxContainer(UiPanel, Instance.GetNode("HBoxContainer")); return _L_HBoxContainer; } } - private EditorTools_HBoxContainer _L_HBoxContainer; + private HBoxContainer _L_HBoxContainer; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer3 /// - public EditorTools_HBoxContainer3 L_HBoxContainer3 + public HBoxContainer3 L_HBoxContainer3 { get { - if (_L_HBoxContainer3 == null) _L_HBoxContainer3 = new EditorTools_HBoxContainer3(UiPanel, Instance.GetNodeOrNull("HBoxContainer3")); + if (_L_HBoxContainer3 == null) _L_HBoxContainer3 = new HBoxContainer3(UiPanel, Instance.GetNode("HBoxContainer3")); return _L_HBoxContainer3; } } - private EditorTools_HBoxContainer3 _L_HBoxContainer3; + private HBoxContainer3 _L_HBoxContainer3; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer4 /// - public EditorTools_HBoxContainer4 L_HBoxContainer4 + public HBoxContainer4 L_HBoxContainer4 { get { - if (_L_HBoxContainer4 == null) _L_HBoxContainer4 = new EditorTools_HBoxContainer4(UiPanel, Instance.GetNodeOrNull("HBoxContainer4")); + if (_L_HBoxContainer4 == null) _L_HBoxContainer4 = new HBoxContainer4(UiPanel, Instance.GetNode("HBoxContainer4")); return _L_HBoxContainer4; } } - private EditorTools_HBoxContainer4 _L_HBoxContainer4; + private HBoxContainer4 _L_HBoxContainer4; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer5 /// - public EditorTools_HBoxContainer5 L_HBoxContainer5 + public HBoxContainer5 L_HBoxContainer5 { get { - if (_L_HBoxContainer5 == null) _L_HBoxContainer5 = new EditorTools_HBoxContainer5(UiPanel, Instance.GetNodeOrNull("HBoxContainer5")); + if (_L_HBoxContainer5 == null) _L_HBoxContainer5 = new HBoxContainer5(UiPanel, Instance.GetNode("HBoxContainer5")); return _L_HBoxContainer5; } } - private EditorTools_HBoxContainer5 _L_HBoxContainer5; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer6 - /// - public EditorTools_HBoxContainer6 L_HBoxContainer6 - { - get - { - if (_L_HBoxContainer6 == null) _L_HBoxContainer6 = new EditorTools_HBoxContainer6(UiPanel, Instance.GetNodeOrNull("HBoxContainer6")); - return _L_HBoxContainer6; - } - } - private EditorTools_HBoxContainer6 _L_HBoxContainer6; - - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer2 - /// - public EditorTools_HBoxContainer2 L_HBoxContainer2 - { - get - { - if (_L_HBoxContainer2 == null) _L_HBoxContainer2 = new EditorTools_HBoxContainer2(UiPanel, Instance.GetNodeOrNull("HBoxContainer2")); - return _L_HBoxContainer2; - } - } - private EditorTools_HBoxContainer2 _L_HBoxContainer2; + private HBoxContainer5 _L_HBoxContainer5; /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.HBoxContainer7 /// - public EditorTools_HBoxContainer7 L_HBoxContainer7 + public HBoxContainer7 L_HBoxContainer7 { get { - if (_L_HBoxContainer7 == null) _L_HBoxContainer7 = new EditorTools_HBoxContainer7(UiPanel, Instance.GetNodeOrNull("HBoxContainer7")); + if (_L_HBoxContainer7 == null) _L_HBoxContainer7 = new HBoxContainer7(UiPanel, Instance.GetNode("HBoxContainer7")); return _L_HBoxContainer7; } } - private EditorTools_HBoxContainer7 _L_HBoxContainer7; + private HBoxContainer7 _L_HBoxContainer7; - public EditorTools_VBoxContainer(EditorTools uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } - public override EditorTools_VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + public VBoxContainer(EditorToolsPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer.MarginContainer /// - public class EditorTools_MarginContainer : UiNode + public class MarginContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.ScrollContainer.VBoxContainer /// - public EditorTools_VBoxContainer L_VBoxContainer + public VBoxContainer L_VBoxContainer { get { - if (_L_VBoxContainer == null) _L_VBoxContainer = new EditorTools_VBoxContainer(UiPanel, Instance.GetNodeOrNull("VBoxContainer")); + if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer(UiPanel, Instance.GetNode("VBoxContainer")); return _L_VBoxContainer; } } - private EditorTools_VBoxContainer _L_VBoxContainer; + private VBoxContainer _L_VBoxContainer; - public EditorTools_MarginContainer(EditorTools uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } - public override EditorTools_MarginContainer Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); + public MarginContainer(EditorToolsPanel uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } + public override MarginContainer Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.ScrollContainer /// - public class EditorTools_ScrollContainer : UiNode + public class ScrollContainer : UiNode { /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: EditorTools.MarginContainer /// - public EditorTools_MarginContainer L_MarginContainer + public MarginContainer L_MarginContainer { get { - if (_L_MarginContainer == null) _L_MarginContainer = new EditorTools_MarginContainer(UiPanel, Instance.GetNodeOrNull("MarginContainer")); + if (_L_MarginContainer == null) _L_MarginContainer = new MarginContainer(UiPanel, Instance.GetNode("MarginContainer")); return _L_MarginContainer; } } - private EditorTools_MarginContainer _L_MarginContainer; + private MarginContainer _L_MarginContainer; - public EditorTools_ScrollContainer(EditorTools uiPanel, Godot.ScrollContainer node) : base(uiPanel, node) { } - public override EditorTools_ScrollContainer Clone() => new (UiPanel, (Godot.ScrollContainer)Instance.Duplicate()); + public ScrollContainer(EditorToolsPanel uiPanel, Godot.ScrollContainer node) : base(uiPanel, node) { } + public override ScrollContainer Clone() => new (UiPanel, (Godot.ScrollContainer)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.Confirm /// - public class EditorTools_Confirm : UiNode + public class Confirm : UiNode { - public EditorTools_Confirm(EditorTools uiPanel, Godot.ConfirmationDialog node) : base(uiPanel, node) { } - public override EditorTools_Confirm Clone() => new (UiPanel, (Godot.ConfirmationDialog)Instance.Duplicate()); + public Confirm(EditorToolsPanel uiPanel, Godot.ConfirmationDialog node) : base(uiPanel, node) { } + public override Confirm Clone() => new (UiPanel, (Godot.ConfirmationDialog)Instance.Duplicate()); } /// /// 类型: , 路径: EditorTools.Tips /// - public class EditorTools_Tips : UiNode + public class Tips : UiNode { - public EditorTools_Tips(EditorTools uiPanel, Godot.AcceptDialog node) : base(uiPanel, node) { } - public override EditorTools_Tips Clone() => new (UiPanel, (Godot.AcceptDialog)Instance.Duplicate()); + public Tips(EditorToolsPanel uiPanel, Godot.AcceptDialog node) : base(uiPanel, node) { } + public override Tips Clone() => new (UiPanel, (Godot.AcceptDialog)Instance.Duplicate()); } /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer /// - public EditorTools_HBoxContainer S_HBoxContainer => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer; + public HBoxContainer S_HBoxContainer => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3.LineEdit /// - public EditorTools_LineEdit S_LineEdit => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer3.L_LineEdit; + public LineEdit S_LineEdit => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer3.L_LineEdit; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer3 /// - public EditorTools_HBoxContainer3 S_HBoxContainer3 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer3; + public HBoxContainer3 S_HBoxContainer3 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer3; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer4 /// - public EditorTools_HBoxContainer4 S_HBoxContainer4 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer4; + public HBoxContainer4 S_HBoxContainer4 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer4; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer5 /// - public EditorTools_HBoxContainer5 S_HBoxContainer5 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer5; - - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomNameInput - /// - public EditorTools_RoomNameInput S_RoomNameInput => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6.L_RoomNameInput; - - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label2 - /// - public EditorTools_Label2 S_Label2 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6.L_Label2; - - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomGroupSelect - /// - public EditorTools_RoomGroupSelect S_RoomGroupSelect => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6.L_RoomGroupSelect; - - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.Label3 - /// - public EditorTools_Label3 S_Label3 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6.L_Label3; - - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6.RoomTypeSelect - /// - public EditorTools_RoomTypeSelect S_RoomTypeSelect => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6.L_RoomTypeSelect; - - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer6 - /// - public EditorTools_HBoxContainer6 S_HBoxContainer6 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6; - - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer2 - /// - public EditorTools_HBoxContainer2 S_HBoxContainer2 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer2; + public HBoxContainer5 S_HBoxContainer5 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer5; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer.HBoxContainer7 /// - public EditorTools_HBoxContainer7 S_HBoxContainer7 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer7; + public HBoxContainer7 S_HBoxContainer7 => L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer7; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer.VBoxContainer /// - public EditorTools_VBoxContainer S_VBoxContainer => L_ScrollContainer.L_MarginContainer.L_VBoxContainer; + public VBoxContainer S_VBoxContainer => L_ScrollContainer.L_MarginContainer.L_VBoxContainer; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer.MarginContainer /// - public EditorTools_MarginContainer S_MarginContainer => L_ScrollContainer.L_MarginContainer; + public MarginContainer S_MarginContainer => L_ScrollContainer.L_MarginContainer; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.ScrollContainer /// - public EditorTools_ScrollContainer S_ScrollContainer => L_ScrollContainer; + public ScrollContainer S_ScrollContainer => L_ScrollContainer; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.Confirm /// - public EditorTools_Confirm S_Confirm => L_Confirm; + public Confirm S_Confirm => L_Confirm; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: EditorTools.Tips /// - public EditorTools_Tips S_Tips => L_Tips; + public Tips S_Tips => L_Tips; } diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs index 7e9eaf8..9116891 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs @@ -46,22 +46,16 @@ L_Confirm.Instance.Canceled += OnCanceled; L_Confirm.Instance.CloseRequested += OnCanceled; L_Confirm.Instance.Confirmed += OnConfirm; - - InitSelectOptions(); var container = L_ScrollContainer.L_MarginContainer.L_VBoxContainer; //重新生成 ResourcePath container.L_HBoxContainer.L_Button.Instance.Pressed += GenerateResourcePath; - //重新打包房间配置 - container.L_HBoxContainer2.L_Button.Instance.Pressed += GenerateRoomConfig; //重新生成ui代码 container.L_HBoxContainer4.L_Button.Instance.Pressed += OnGenerateCurrentUiCode; //创建ui container.L_HBoxContainer3.L_Button.Instance.Pressed += OnCreateUI; //重新生成UiManagerMethods.cs代码 container.L_HBoxContainer5.L_Button.Instance.Pressed += GenerateUiManagerMethods; - //创建地牢房间 - container.L_HBoxContainer6.L_Button.Instance.Pressed += GenerateDungeonRoom; //导出excel表 container.L_HBoxContainer7.L_Button.Instance.Pressed += ExportExcel; } @@ -78,52 +72,12 @@ var container = L_ScrollContainer.L_MarginContainer.L_VBoxContainer; container.L_HBoxContainer.L_Button.Instance.Pressed -= GenerateResourcePath; - container.L_HBoxContainer2.L_Button.Instance.Pressed -= GenerateRoomConfig; container.L_HBoxContainer4.L_Button.Instance.Pressed -= OnGenerateCurrentUiCode; container.L_HBoxContainer3.L_Button.Instance.Pressed -= OnCreateUI; container.L_HBoxContainer5.L_Button.Instance.Pressed -= GenerateUiManagerMethods; - container.L_HBoxContainer6.L_Button.Instance.Pressed -= GenerateDungeonRoom; container.L_HBoxContainer7.L_Button.Instance.Pressed -= ExportExcel; } - public override void Process(float delta) - { - if (_createRoomGroupValueMap == null || _createRoomTypeValueMap == null) - { - InitSelectOptions(); - } - } - - //创建ui的下拉框数据 - private void InitSelectOptions() - { - _createRoomGroupValueMap = new Dictionary(); - _createRoomTypeValueMap = new Dictionary(); - var container = L_ScrollContainer.L_MarginContainer.L_VBoxContainer; - var select1 = container.L_HBoxContainer6.L_RoomGroupSelect.Instance; - select1.Clear(); - var directoryInfo = new DirectoryInfo(GameConfig.RoomTileDir); - var directoryInfoArray = directoryInfo.GetDirectories(); - for (var i = 0; i < directoryInfoArray.Length; i++) - { - var text = directoryInfoArray[i].Name; - select1.AddItem(text, i); - _createRoomGroupValueMap.Add(i, text); - } - - var select2 = container.L_HBoxContainer6.L_RoomTypeSelect.Instance; - select2.Clear(); - var dungeonRoomTypes = Enum.GetValues(); - for (var i = 0; i < dungeonRoomTypes.Length; i++) - { - var typeName = DungeonManager.DungeonRoomTypeToString(dungeonRoomTypes[i]); - var text = typeName + " (" + - DungeonManager.DungeonRoomTypeToDescribeString(dungeonRoomTypes[i]) + ")"; - select2.AddItem(text, i); - _createRoomTypeValueMap.Add(i, typeName); - } - } - /// /// Tips 关闭信号回调 /// @@ -315,22 +269,7 @@ ShowTips("错误", "ResourcePath.cs生成失败! 前往控制台查看错误日志!"); } } - - /// - /// 重新打包房间配置 - /// - private void GenerateRoomConfig() - { - if (DungeonRoomGenerator.GenerateRoomConfig()) - { - ShowTips("提示", "打包地牢房间配置执行完成!"); - } - else - { - ShowTips("错误", "打包地牢房间配置执行失败! 前往控制台查看错误日志!"); - } - } - + /// /// 重新生成UiManagerMethods.cs代码 /// @@ -345,52 +284,7 @@ ShowTips("错误", "生成UiManagerMethods.cs代码执行失败! 前往控制台查看错误日志!"); } } - - /// - /// 创建地牢房间 - /// - private void GenerateDungeonRoom() - { - var node = L_ScrollContainer.L_MarginContainer.L_VBoxContainer.L_HBoxContainer6; - var group = _createRoomGroupValueMap[node.L_RoomGroupSelect.Instance.Selected]; - var type = _createRoomTypeValueMap[node.L_RoomTypeSelect.Instance.Selected]; - var roomName = node.L_RoomNameInput.Instance.Text; - - var pathName = group + "/" + type + "/" + roomName; - - ShowConfirm("提示", "是否创建房间:" + pathName, (result) => - { - if (result) - { - //检查名称是否合规 - if (!Regex.IsMatch(roomName, "^\\w+$")) - { - ShowTips("错误", "房间名称'" + roomName + "'不符合名称约束, 房间名称只允许包含大写字母和数字!"); - return; - } - - //检查是否有同名的Ui - var path = GameConfig.RoomTileDir + pathName + ".tscn"; - if (File.Exists(path)) - { - ShowTips("错误", "已经存在相同名称'" + pathName + "'的房间了, 不能重复创建!"); - return; - } - - //执行创建操作 - if (DungeonRoomGenerator.CreateDungeonRoom(group, type, roomName, true)) - { - ShowTips("提示", "创建房间成功!"); - } - else - { - ShowTips("错误", "创建房间失败! 前往控制台查看错误日志!"); - } - - } - }); - } - + /// /// 导出excel表 /// diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs index ca97690..0dce3e9 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs @@ -201,7 +201,7 @@ } //选中物体回调, 创建标记数据 - private void OnSelectObject(ExcelConfig.ActivityObject activityObject) + private void OnSelectObject(ExcelConfig.ActivityBase activityObject) { _grid.Add(new MarkInfoItem() { diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs index aefa59c..b42ac54 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs @@ -11,7 +11,7 @@ private MapEditorCreateMark.ExpandPanel _expandPanel; //自定义额外属性 private List _attributeBases; - private ExcelConfig.ActivityObject _activityObject; + private ExcelConfig.ActivityBase _activityObject; private MapEditorCreateMark.NumberBar _altitude; private MapEditorCreateMark.NumberBar _vSpeed; @@ -25,7 +25,7 @@ public override void OnSetData(MarkInfoItem data) { //记得判断随机对象, 后面再做 - _activityObject = ExcelConfig.ActivityObject_Map[data.Id]; + _activityObject = ExcelConfig.ActivityBase_Map[data.Id]; //图标 if (string.IsNullOrEmpty(_activityObject.Icon)) { @@ -161,7 +161,7 @@ } } - private void CreateExpandPanel(ExcelConfig.ActivityObject activityObject, MarkInfoItem markInfoItem) + private void CreateExpandPanel(ExcelConfig.ActivityBase activityObject, MarkInfoItem markInfoItem) { if (_expandPanel != null) { @@ -218,7 +218,7 @@ numberBar.L_NumInput.Instance.MinValue = 0; numberBar2.L_NumInput.Instance.MinValue = 0; //武器配置数据 - var weapon = ExcelConfig.Weapon_List.Find(weapon => weapon.WeaponId == activityObject.Id); + var weapon = Weapon.GetWeaponAttribute(activityObject.Id); if (weapon != null) { numberBar.L_NumInput.Instance.MaxValue = weapon.AmmoCapacity; //弹夹上限 @@ -276,7 +276,7 @@ } if (markInfoItem.Attr.TryGetValue("Weapon", out var weaponId)) //武器 { - weaponBar.Instance.SelectWeapon(ExcelConfig.Weapon_List.Find(w => w.WeaponId == weaponId)); + weaponBar.Instance.SelectWeapon(Weapon.GetWeaponAttribute(weaponId)); } if (markInfoItem.Attr.TryGetValue("CurrAmmon", out var currAmmon)) //弹夹弹药量 { diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/attribute/ObjectAttribute.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/attribute/ObjectAttribute.cs index 0761a9a..b3d23ae 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/attribute/ObjectAttribute.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/attribute/ObjectAttribute.cs @@ -10,7 +10,7 @@ public ActivityType ActivityType { get; set; } private MapEditorCreateMark.ObjectBar _objectBar; //选择的武器数据 - private ExcelConfig.Weapon _selectWeapon; + private ExcelConfig.WeaponBase _selectWeapon; //关联属性 private MapEditorCreateMark.NumberBar _currAmmonAttr; private MapEditorCreateMark.NumberBar _residueAmmoAttr; @@ -33,7 +33,7 @@ { return null; } - return _selectWeapon.WeaponId; + return _selectWeapon.Activity.Id; } //点击编辑按钮 @@ -48,9 +48,9 @@ SelectWeapon(null); } - private void OnSelectObject(ExcelConfig.ActivityObject activityObject) + private void OnSelectObject(ExcelConfig.ActivityBase activityObject) { - var weapon = ExcelConfig.Weapon_List.Find(weapon => weapon.WeaponId == activityObject.Id); + var weapon = Weapon.GetWeaponAttribute(activityObject.Id); if (weapon != null) { SelectWeapon(weapon); @@ -60,7 +60,7 @@ /// /// 设置选择的武器物体 /// - public void SelectWeapon(ExcelConfig.Weapon weapon) + public void SelectWeapon(ExcelConfig.WeaponBase weapon) { if (weapon == null) { @@ -76,7 +76,7 @@ { _objectBar.L_HBoxContainer.L_DeleteButton.Instance.Visible = true; _selectWeapon = weapon; - var o = ExcelConfig.ActivityObject_Map[weapon.WeaponId]; + var o = weapon.Activity; //显示关联属性 _currAmmonAttr.Instance.Visible = true; _residueAmmoAttr.Instance.Visible = true; diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs index c36e547..8f96ec5 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs @@ -30,7 +30,7 @@ str += ","; } - str += ExcelConfig.ActivityObject_Map[markInfoItem.Id].Name; + str += ExcelConfig.ActivityBase_Map[markInfoItem.Id].Name; } text += str; } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs index c06f20b..5776073 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs @@ -10,7 +10,7 @@ /// /// 双击选中物体事件 /// - public event Action SelectObjectEvent; + public event Action SelectObjectEvent; public class TypeButtonData { @@ -32,7 +32,7 @@ //类型网格组件 private UiGrid _typeGrid; //物体网格组件 - private UiGrid _objectGrid; + private UiGrid _objectGrid; //允许出现在该面板中的物体类型 private int[] _typeArray = new[] { 4, 5, 9 }; @@ -45,7 +45,7 @@ _typeGrid.SetHorizontalExpand(true); _typeGrid.SetCellOffset(new Vector2I(0, 5)); - _objectGrid = new UiGrid(S_ObjectButton, typeof(ObjectButtonCell)); + _objectGrid = new UiGrid(S_ObjectButton, typeof(ObjectButtonCell)); _objectGrid.SetAutoColumns(true); _objectGrid.SetHorizontalExpand(true); _objectGrid.SetCellOffset(new Vector2I(10, 10)); @@ -97,7 +97,7 @@ } //搜索结果 - var arr = ExcelConfig.ActivityObject_List.Where( + var arr = ExcelConfig.ActivityBase_List.Where( o => { return o.ShowInMapEditor && @@ -111,7 +111,7 @@ /// /// 选中对象 /// - public void SelectCell(ExcelConfig.ActivityObject activityObject) + public void SelectCell(ExcelConfig.ActivityBase activityObject) { if (SelectObjectEvent != null) { @@ -122,7 +122,7 @@ /// /// 获取选中的数据 /// - public ExcelConfig.ActivityObject GetSelectData() + public ExcelConfig.ActivityBase GetSelectData() { return _objectGrid.SelectData; } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/ObjectButtonCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/ObjectButtonCell.cs index 9c4e03f..3b325c5 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/ObjectButtonCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/ObjectButtonCell.cs @@ -3,14 +3,14 @@ namespace UI.MapEditorSelectObject; -public class ObjectButtonCell : UiCell +public class ObjectButtonCell : UiCell { public override void OnInit() { CellNode.L_Select.Instance.Visible = false; } - public override void OnSetData(ExcelConfig.ActivityObject data) + public override void OnSetData(ExcelConfig.ActivityBase data) { CellNode.L_ObjectName.Instance.Text = data.Name; if (!string.IsNullOrEmpty(data.Icon)) diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs b/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs index 85eb7da..3203984 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/InteractiveTipBar.cs @@ -46,7 +46,7 @@ /// 显示图标 public void ShowBar(ActivityObject target, string showText, Texture2D icon) { - _interactiveTipBar.Instance.GlobalPosition = target.GlobalPosition; + _interactiveTipBar.Instance.GlobalPosition = GameApplication.Instance.ViewToGlobalPosition(_interactiveTarget.GlobalPosition); _interactiveTipBar.L_Icon.Instance.Texture = icon; _interactiveTipBar.Instance.Visible = true; _interactiveTipBar.L_NameLabel.Instance.Text = showText; diff --git a/DungeonShooting_Godot/src/test/TestDrawSprite.cs b/DungeonShooting_Godot/src/test/TestDrawSprite.cs new file mode 100644 index 0000000..c7a0729 --- /dev/null +++ b/DungeonShooting_Godot/src/test/TestDrawSprite.cs @@ -0,0 +1,99 @@ +using Godot; +using System; +using System.Collections.Generic; + +public partial class TestDrawSprite : Node2D +{ + [Export] + public Label FpsLabel; + + [Export] + public PathFollow2D PathFollow2D; + + public override void _Ready() + { + // for (var i = 0; i < 10000; i++) + // { + // var image = Image.Create(50, 50, false, Image.Format.Rgba8); + // image.Fill(new Color(Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1), + // Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1))); + // var imageTexture = ImageTexture.CreateFromImage(image); + // var proxySprite = new ProxySprite(); + // proxySprite.SetTexture( + // this, + // imageTexture, + // new Vector2(Utils.Random.RandomRangeInt(0, 1600), Utils.Random.RandomRangeInt(0, 900)), + // Utils.Random.RandomRangeFloat(0, Mathf.Pi), + // new Vector2(Utils.Random.RandomRangeFloat(0.2f, 2f), Utils.Random.RandomRangeFloat(0.2f, 2f)), + // new Vector2(0, 5) + // ); + // } + } + + public override void _Process(double delta) + { + FpsLabel.Text = "FPS: " + 1 / delta; + PathFollow2D.Progress += 200 * (float)delta; + } + + //------------------------------------------------------------------------------------------------------------------------------- + + //使用sprite2d绘制精灵 + // public override void _Ready() + // { + // for (int i = 0; i < 20000; i++) + // { + // var image = Image.Create(50, 50, false, Image.Format.Rgba8); + // image.Fill(new Color(Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1))); + // var imageTexture = ImageTexture.CreateFromImage(image); + // var sprite2D = new Sprite2D(); + // sprite2D.Texture = imageTexture; + // sprite2D.Centered = false; + // sprite2D.Scale = new Vector2(Utils.Random.RandomRangeFloat(0.2f, 2f), Utils.Random.RandomRangeFloat(0.2f, 2f)); + // sprite2D.Rotation = Utils.Random.RandomRangeFloat(0, Mathf.Pi); + // sprite2D.Position = new Vector2(Utils.Random.RandomRangeInt(0, 1600), Utils.Random.RandomRangeInt(0, 900)); + // AddChild(sprite2D); + // } + // } + + //尝试使用DrawTexture绘制texture,结果发现性比sprite2d还差 + // private class DrawTextureData + // { + // public Texture2D Texture2D; + // public Vector2 Position; + // public float Rotation; + // public Vector2 Scale; + // } + // private List _texture2Ds = new List(); + + // public override void _Ready() + // { + // for (int i = 0; i < 10000; i++) + // { + // var image = Image.Create(100, 100, false, Image.Format.Rgba8); + // image.Fill(new Color(Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1), Utils.Random.RandomRangeFloat(0, 1))); + // var imageTexture = ImageTexture.CreateFromImage(image); + // _texture2Ds.Add(new DrawTextureData() + // { + // Texture2D = imageTexture, + // Position = new Vector2(Utils.Random.RandomRangeInt(0, 1600), Utils.Random.RandomRangeInt(0, 900)), + // Rotation = Utils.Random.RandomRangeFloat(0, Mathf.Pi), + // Scale = new Vector2(Utils.Random.RandomRangeFloat(0.2f, 2f), Utils.Random.RandomRangeFloat(0.2f, 2f)) + // }); + // } + // } + // + // public override void _Process(double delta) + // { + // QueueRedraw(); + // } + // + // public override void _Draw() + // { + // foreach (var texture2D in _texture2Ds) + // { + // DrawSetTransform(texture2D.Position, texture2D.Rotation, texture2D.Scale); + // DrawTexture(texture2D.Texture2D, Vector2.Zero); + // } + // } +} diff --git a/DungeonShooting_Godot/src/test/TestGridData.cs b/DungeonShooting_Godot/src/test/TestGridData.cs new file mode 100644 index 0000000..b7db7cb --- /dev/null +++ b/DungeonShooting_Godot/src/test/TestGridData.cs @@ -0,0 +1,104 @@ +using Godot; +using System; +using System.Collections.Generic; + +public partial class TestGridData : Node2D +{ + + public class TestGrid + { + public TestGrid(int width) + { + Width = width; + } + + public int Width { get; } + private Dictionary _dictionary = new Dictionary(); + + public void Set(int x, int y, T data) + { + if (x <= Width) + { + _dictionary[y * Width + x] = data; + } + } + + public T Get(int x, int y) + { + if (x <= Width && _dictionary.TryGetValue(y * Width + x, out var value)) + { + return value; + } + + return default; + } + + public void ForEach(Action callback) + { + foreach (var keyValuePair in _dictionary) + { + var index = keyValuePair.Key; + callback(index % Width, index / Width, keyValuePair.Value); + } + } + } + + public override void _Ready() + { + var time = DateTime.Now; + var testGrid = new TestGrid(100000); + for (int i = 0; i < 1000; i++) + { + for (int j = 0; j < 1000; j++) + { + testGrid.Set(i, j, i + j); + } + } + Debug.Log("TestGrid设置值用时: " + (DateTime.Now - time).Milliseconds); + + time = DateTime.Now; + var testGrid2 = new Grid(); + for (int i = 0; i < 1000; i++) + { + for (int j = 0; j < 1000; j++) + { + testGrid2.Set(i, j, i + j); + } + } + Debug.Log("Grid设置值用时: " + (DateTime.Now - time).Milliseconds); + + time = DateTime.Now; + for (int i = 0; i < 1000; i++) + { + for (int j = 0; j < 1000; j++) + { + testGrid.Get(i, j); + } + } + Debug.Log("TestGrid取值用时: " + (DateTime.Now - time).Milliseconds); + + time = DateTime.Now; + for (int i = 0; i < 1000; i++) + { + for (int j = 0; j < 1000; j++) + { + testGrid2.Get(i, j); + } + } + Debug.Log("Grid取值用时: " + (DateTime.Now - time).Milliseconds); + + time = DateTime.Now; + testGrid.ForEach((i, i1, arg3) => + { + + }); + Debug.Log("TestGrid遍历用时: " + (DateTime.Now - time).Milliseconds); + + time = DateTime.Now; + testGrid2.ForEach((i, i1, arg3) => + { + + }); + Debug.Log("Grid遍历用时: " + (DateTime.Now - time).Milliseconds); + } +} diff --git a/README.md b/README.md index 8949983..ddf21a1 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,5 @@ --- ### 其他 **开发日志:** [开发日志.md](DungeonShooting_Document/开发日志.md) -**项目看板:** https://trello.com/b/a8UGxnTl/dungeonshooting **哔哩哔哩:** https://space.bilibili.com/259437820 **项目Ui插件:** https://github.com/xlljc/Ds_Ui \ No newline at end of file diff --git "a/\351\241\271\347\233\256\347\234\213\346\235\277.html" "b/\351\241\271\347\233\256\347\234\213\346\235\277.html" deleted file mode 100644 index bb1170f..0000000 --- "a/\351\241\271\347\233\256\347\234\213\346\235\277.html" +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file