diff --git a/DungeonShooting_Godot/excel/ActivityBase.xlsx b/DungeonShooting_Godot/excel/ActivityBase.xlsx index a839ad2..1f538f6 100644 --- a/DungeonShooting_Godot/excel/ActivityBase.xlsx +++ b/DungeonShooting_Godot/excel/ActivityBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/BulletBase.xlsx b/DungeonShooting_Godot/excel/BulletBase.xlsx index e3f1e11..093a10d 100644 --- a/DungeonShooting_Godot/excel/BulletBase.xlsx +++ b/DungeonShooting_Godot/excel/BulletBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/WeaponBase.xlsx b/DungeonShooting_Godot/excel/WeaponBase.xlsx index d4ad41a..3d8473e 100644 --- a/DungeonShooting_Godot/excel/WeaponBase.xlsx +++ b/DungeonShooting_Godot/excel/WeaponBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/bullet/normal/Bullet0009.tscn b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0009.tscn new file mode 100644 index 0000000..a1c9e3e --- /dev/null +++ b/DungeonShooting_Godot/prefab/bullet/normal/Bullet0009.tscn @@ -0,0 +1,65 @@ +[gd_scene load_steps=8 format=3 uid="uid://c4puxmnan51ds"] + +[ext_resource type="Script" path="res://src/game/activity/bullet/normal/Bullet.cs" id="1_dmdyg"] +[ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_tscmb"] +[ext_resource type="SpriteFrames" uid="uid://cyg3uvbakan08" path="res://resource/spriteFrames/bullet/Bullet0009.tres" id="3_l58ff"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"] +resource_local_to_scene = true +shader = ExtResource("2_tscmb") +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 +shader_parameter/grey = 0.0 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_jypdq"] +resource_local_to_scene = true +shader = ExtResource("2_tscmb") +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 = false +shader_parameter/grey = 0.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_5x14b"] +size = Vector2(26, 3) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_72d75"] +size = Vector2(26, 3) + +[node name="Bullet0009" type="CharacterBody2D" node_paths=PackedStringArray("CollisionArea", "CollisionShape2D", "Particles2D", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 2 +collision_mask = 0 +script = ExtResource("1_dmdyg") +CollisionArea = NodePath("AnimatedSprite/CollisionArea") +CollisionShape2D = NodePath("AnimatedSprite/CollisionArea/CollisionShape2D") +Particles2D = [] +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_jypdq") +sprite_frames = ExtResource("3_l58ff") + +[node name="CollisionArea" type="Area2D" parent="AnimatedSprite"] +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="AnimatedSprite/CollisionArea"] +shape = SubResource("RectangleShape2D_5x14b") + +[node name="Collision" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_72d75") diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon0016.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon0016.tscn index c4abbd2..3e1648b 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon0016.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon0016.tscn @@ -1,9 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://b7s3fvpkltk1d"] +[gd_scene load_steps=11 format=3 uid="uid://b7s3fvpkltk1d"] -[ext_resource type="PackedScene" uid="uid://cxltmhhp4rbyk" path="res://prefab/weapon/WeaponTemplate.tscn" id="1_af50b"] -[ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="2_01rgi"] +[ext_resource type="Script" path="res://src/game/activity/weapon/bow/Bow.cs" id="1_k4gvs"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_cui8l"] -[ext_resource type="SpriteFrames" uid="uid://taxfr2lcy0f3" path="res://resource/spriteFrames/weapon/Weapon0014.tres" id="4_h5mn6"] +[ext_resource type="SpriteFrames" uid="uid://ccrflh6pjmq7r" path="res://resource/spriteFrames/weapon/Weapon0016.tres" id="4_buwa4"] +[ext_resource type="Animation" uid="uid://v3dltmdstqad" path="res://resource/animation/weapon/Weapon_floodlight.res" id="4_nl06y"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_sy2aq"] resource_local_to_scene = true @@ -30,10 +30,110 @@ shader_parameter/grey = 0.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_4pn1i"] -size = Vector2(10.75, 7.75) +size = Vector2(10.1875, 15.9375) -[node name="Weapon0014" node_paths=PackedStringArray("FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision") instance=ExtResource("1_af50b")] -script = ExtResource("2_01rgi") +[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.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": [&"pull_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), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("AnimatedSprite/ArrowPoint:position") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(8, 0)] +} + +[sub_resource type="Animation" id="Animation_njx7h"] +resource_name = "pull" +length = 0.5 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite:animation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"pull_frame"] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("AnimatedSprite: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, 10] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("AnimatedSprite/ArrowPoint:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.5), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector2(8, 0), Vector2(-3, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"] +_data = { +"RESET": SubResource("Animation_x136i"), +"floodlight": ExtResource("4_nl06y"), +"pull": SubResource("Animation_njx7h") +} + +[node name="Weapon0016" type="CharacterBody2D" node_paths=PackedStringArray("ArrowPoint", "FirePoint", "ShellPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")] +collision_layer = 4 +script = ExtResource("1_k4gvs") +ArrowPoint = NodePath("AnimatedSprite/ArrowPoint") FirePoint = NodePath("AnimatedSprite/FirePoint") ShellPoint = NodePath("AnimatedSprite/ShellPoint") AnimationPlayer = NodePath("AnimationPlayer") @@ -41,21 +141,30 @@ AnimatedSprite = NodePath("AnimatedSprite") Collision = NodePath("Collision") -[node name="ShadowSprite" parent="." index="0"] +[node name="ShadowSprite" type="Sprite2D" parent="."] +z_index = -1 material = SubResource("ShaderMaterial_sy2aq") -[node name="AnimatedSprite" parent="." index="1"] +[node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_x2qcg") -position = Vector2(4, 0) -sprite_frames = ExtResource("4_h5mn6") +position = Vector2(6, -2) +sprite_frames = ExtResource("4_buwa4") +animation = &"pull_frame" -[node name="ShellPoint" parent="AnimatedSprite" index="0"] -position = Vector2(-3, -2) +[node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"] -[node name="FirePoint" parent="AnimatedSprite" index="1"] -position = Vector2(9, -2) +[node name="FirePoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(9, 0) -[node name="Collision" parent="." index="2"] -visible = true -position = Vector2(4, 0) +[node name="ArrowPoint" type="Marker2D" parent="AnimatedSprite"] +position = Vector2(8, 0) + +[node name="Collision" type="CollisionShape2D" parent="."] +visible = false +position = Vector2(1, 0) shape = SubResource("RectangleShape2D_4pn1i") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_trkjd") +} diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json index f4b0604..f029543 100644 --- a/DungeonShooting_Godot/resource/config/ActivityBase.json +++ b/DungeonShooting_Godot/resource/config/ActivityBase.json @@ -213,7 +213,7 @@ "Id": "weapon0014", "Type": 5, "Name": "\u5DE6\u8F6E", - "Quality": 4, + "Quality": 2, "Price": 0, "Intro": "", "Details": "", @@ -224,6 +224,20 @@ "ShowInMapEditor": true }, { + "Id": "weapon0016", + "Type": 5, + "Name": "\u6728\u8D28\u77ED\u5F13", + "Quality": 2, + "Price": 0, + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "", + "Prefab": "res://prefab/weapon/Weapon0016.tscn", + "Icon": "res://resource/sprite/weapon/weapon0016/weapon0016.png", + "ShowInMapEditor": true + }, + { "Id": "bullet0001", "Type": 6, "Name": "", @@ -336,6 +350,20 @@ "ShowInMapEditor": false }, { + "Id": "bullet0009", + "Type": 6, + "Name": "\u5F13\u7BAD", + "Quality": 0, + "Price": 0, + "Intro": "", + "Details": "", + "IsStatic": false, + "__Material": "0003", + "Prefab": "res://prefab/bullet/normal/Bullet0009.tscn", + "Icon": "", + "ShowInMapEditor": false + }, + { "Id": "shell0001", "Type": 7, "Name": "", diff --git a/DungeonShooting_Godot/resource/config/BulletBase.json b/DungeonShooting_Godot/resource/config/BulletBase.json index 6c5d4f9..8a23d51 100644 --- a/DungeonShooting_Godot/resource/config/BulletBase.json +++ b/DungeonShooting_Godot/resource/config/BulletBase.json @@ -316,6 +316,41 @@ ] }, { + "Id": "0010", + "Name": "\u5F13\u7BAD", + "Type": 1, + "Prefab": "bullet0009", + "HarmRange": [ + 12 + ], + "RepelRange": [ + 55 + ], + "DeviationAngleRange": [ + 0 + ], + "SpeedRange": [ + 450, + 480 + ], + "LifeTimeRange": [ + -1 + ], + "DistanceRange": [ + 300, + 350 + ], + "VerticalSpeed": [ + 0 + ], + "BounceCount": [ + 0 + ], + "Penetration": [ + 0 + ] + }, + { "Id": "1001", "Name": "\u6FC0\u51491", "Type": 2, diff --git a/DungeonShooting_Godot/resource/config/WeaponBase.json b/DungeonShooting_Godot/resource/config/WeaponBase.json index 357052f..6105f83 100644 --- a/DungeonShooting_Godot/resource/config/WeaponBase.json +++ b/DungeonShooting_Godot/resource/config/WeaponBase.json @@ -10,6 +10,8 @@ "AmmoCapacity": 30, "MaxAmmoCapacity": 420, "StandbyAmmoCapacity": 390, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -84,6 +86,8 @@ "AmmoCapacity": 30, "MaxAmmoCapacity": 420, "StandbyAmmoCapacity": 390, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -158,6 +162,8 @@ "AmmoCapacity": 7, "MaxAmmoCapacity": 140, "StandbyAmmoCapacity": 133, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 0.26, "AloneReload": true, "AloneReloadCount": 1, @@ -232,6 +238,8 @@ "AmmoCapacity": 7, "MaxAmmoCapacity": 140, "StandbyAmmoCapacity": 133, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 0.26, "AloneReload": true, "AloneReloadCount": 1, @@ -306,6 +314,8 @@ "AmmoCapacity": 12, "MaxAmmoCapacity": 180, "StandbyAmmoCapacity": 168, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.4, "AloneReload": false, "AloneReloadCount": 1, @@ -380,6 +390,8 @@ "AmmoCapacity": 12, "MaxAmmoCapacity": 180, "StandbyAmmoCapacity": 168, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.4, "AloneReload": false, "AloneReloadCount": 1, @@ -454,6 +466,8 @@ "AmmoCapacity": 180, "MaxAmmoCapacity": 180, "StandbyAmmoCapacity": 180, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -527,6 +541,8 @@ "AmmoCapacity": 180, "MaxAmmoCapacity": 180, "StandbyAmmoCapacity": 180, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -600,6 +616,8 @@ "AmmoCapacity": 10, "MaxAmmoCapacity": 80, "StandbyAmmoCapacity": 70, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2.8, "AloneReload": false, "AloneReloadCount": 1, @@ -674,6 +692,8 @@ "AmmoCapacity": 10, "MaxAmmoCapacity": 80, "StandbyAmmoCapacity": 70, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2.8, "AloneReload": false, "AloneReloadCount": 1, @@ -748,6 +768,8 @@ "AmmoCapacity": 20, "MaxAmmoCapacity": 600, "StandbyAmmoCapacity": 580, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.8, "AloneReload": false, "AloneReloadCount": 1, @@ -822,6 +844,8 @@ "AmmoCapacity": 20, "MaxAmmoCapacity": 600, "StandbyAmmoCapacity": 580, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.8, "AloneReload": false, "AloneReloadCount": 1, @@ -896,6 +920,8 @@ "AmmoCapacity": 60, "MaxAmmoCapacity": 600, "StandbyAmmoCapacity": 540, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2.2, "AloneReload": false, "AloneReloadCount": 1, @@ -970,6 +996,8 @@ "AmmoCapacity": 60, "MaxAmmoCapacity": 600, "StandbyAmmoCapacity": 540, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2.2, "AloneReload": false, "AloneReloadCount": 1, @@ -1044,6 +1072,8 @@ "AmmoCapacity": 10, "MaxAmmoCapacity": 240, "StandbyAmmoCapacity": 120, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.8, "AloneReload": false, "AloneReloadCount": 1, @@ -1118,6 +1148,8 @@ "AmmoCapacity": 10, "MaxAmmoCapacity": 240, "StandbyAmmoCapacity": 120, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.8, "AloneReload": false, "AloneReloadCount": 1, @@ -1192,6 +1224,8 @@ "AmmoCapacity": 1, "MaxAmmoCapacity": 50, "StandbyAmmoCapacity": 25, + "ShowReloadBar": true, + "AutoReload": true, "ReloadTime": 1.5, "AloneReload": false, "AloneReloadCount": 1, @@ -1207,8 +1241,8 @@ 1 ], "TriggerInterval": 0, - "StartFiringSpeed": 60, - "FinalFiringSpeed": 60, + "StartFiringSpeed": 180, + "FinalFiringSpeed": 180, "FiringSpeedAddSpeed": 0, "FiringSpeedBackSpeed": 0, "FiringSpeedBackTime": 0, @@ -1266,6 +1300,8 @@ "AmmoCapacity": 1, "MaxAmmoCapacity": 50, "StandbyAmmoCapacity": 25, + "ShowReloadBar": true, + "AutoReload": true, "ReloadTime": 1.5, "AloneReload": false, "AloneReloadCount": 1, @@ -1281,8 +1317,8 @@ 1 ], "TriggerInterval": 4, - "StartFiringSpeed": 60, - "FinalFiringSpeed": 60, + "StartFiringSpeed": 180, + "FinalFiringSpeed": 180, "FiringSpeedAddSpeed": 0, "FiringSpeedBackSpeed": 0, "FiringSpeedBackTime": 0, @@ -1340,6 +1376,8 @@ "AmmoCapacity": 5, "MaxAmmoCapacity": 150, "StandbyAmmoCapacity": 80, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -1414,6 +1452,8 @@ "AmmoCapacity": 5, "MaxAmmoCapacity": 150, "StandbyAmmoCapacity": 80, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -1488,6 +1528,8 @@ "AmmoCapacity": 20, "MaxAmmoCapacity": 600, "StandbyAmmoCapacity": 580, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.8, "AloneReload": false, "AloneReloadCount": 1, @@ -1562,6 +1604,8 @@ "AmmoCapacity": 20, "MaxAmmoCapacity": 600, "StandbyAmmoCapacity": 580, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1.8, "AloneReload": false, "AloneReloadCount": 1, @@ -1636,6 +1680,8 @@ "AmmoCapacity": 50, "MaxAmmoCapacity": 500, "StandbyAmmoCapacity": 350, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -1710,6 +1756,8 @@ "AmmoCapacity": 50, "MaxAmmoCapacity": 500, "StandbyAmmoCapacity": 350, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 2, "AloneReload": false, "AloneReloadCount": 1, @@ -1784,6 +1832,8 @@ "AmmoCapacity": 5, "MaxAmmoCapacity": 120, "StandbyAmmoCapacity": 80, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1, "AloneReload": false, "AloneReloadCount": 1, @@ -1858,6 +1908,8 @@ "AmmoCapacity": 5, "MaxAmmoCapacity": 120, "StandbyAmmoCapacity": 80, + "ShowReloadBar": true, + "AutoReload": false, "ReloadTime": 1, "AloneReload": false, "AloneReloadCount": 1, @@ -1920,5 +1972,157 @@ "BeLoadedSoundDelayTime": 0, "__OtherSoundMap": null, "__AiAttackAttr": "0003" + }, + { + "Id": "0016", + "Remark": "\u6728\u8D28\u77ED\u5F13", + "__Activity": "weapon0016", + "Weight": 20, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 1, + "MaxAmmoCapacity": 120, + "StandbyAmmoCapacity": 80, + "ShowReloadBar": false, + "AutoReload": true, + "ReloadTime": 0.5, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": true, + "MinChargeTime": 0.5, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0.05, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0, + "StartFiringSpeed": 600, + "FinalFiringSpeed": 600, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FiringSpeedBackTime": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 5, + "FinalScatteringRange": 40, + "ScatteringRangeAddValue": 40, + "ScatteringRangeBackSpeed": 50, + "ScatteringRangeBackDelayTime": 0.4, + "CameraShake": 4, + "BacklashRange": [ + -2, + -2 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 0, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "", + "__Bullet": "0010", + "__Shell": "", + "ReloadThrowShell": false, + "ThrowShellCount": 0, + "ThrowShellDelayTime": 0, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "", + "__BeginReloadSound": "", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "", + "ReloadFinishSoundAdvanceTime": 0.43, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiAttackAttr": "" + }, + { + "Id": "0016_ai", + "Remark": "\u6728\u8D28\u77ED\u5F13", + "__Activity": "", + "Weight": 20, + "WeightType": 1, + "IsMelee": false, + "ContinuousShoot": false, + "AmmoCapacity": 1, + "MaxAmmoCapacity": 120, + "StandbyAmmoCapacity": 80, + "ShowReloadBar": false, + "AutoReload": true, + "ReloadTime": 0.5, + "AloneReload": false, + "AloneReloadCount": 1, + "AloneReloadBeginIntervalTime": 0, + "AloneReloadFinishIntervalTime": 0, + "AloneReloadCanShoot": false, + "LooseShoot": true, + "MinChargeTime": 0.5, + "ManualBeLoaded": false, + "AutoManualBeLoaded": false, + "BeLoadedTime": 0.05, + "ContinuousCountRange": [ + 1 + ], + "TriggerInterval": 0.8, + "StartFiringSpeed": 300, + "FinalFiringSpeed": 300, + "FiringSpeedAddSpeed": 0, + "FiringSpeedBackSpeed": 0, + "FiringSpeedBackTime": 0, + "FireBulletCountRange": [ + 1 + ], + "DelayedTime": 0, + "StartScatteringRange": 5, + "FinalScatteringRange": 40, + "ScatteringRangeAddValue": 40, + "ScatteringRangeBackSpeed": 50, + "ScatteringRangeBackDelayTime": 0.4, + "CameraShake": 4, + "BacklashRange": [ + -2, + -2 + ], + "BacklashRegressionSpeed": 35, + "UpliftAngle": 0, + "DefaultAngle": 0, + "UpliftAngleRestore": 1, + "FireEffect": "", + "__Bullet": "0010", + "__Shell": "", + "ReloadThrowShell": false, + "ThrowShellCount": 0, + "ThrowShellDelayTime": 0, + "CanMeleeAttack": true, + "MeleeAttackHarmRange": [ + 10 + ], + "MeleeAttackRepelRange": [ + 100 + ], + "__ShootSound": "", + "__BeginReloadSound": "", + "BeginReloadSoundDelayTime": 0, + "__ReloadSound": "", + "ReloadSoundDelayTime": 0, + "__ReloadFinishSound": "", + "ReloadFinishSoundAdvanceTime": 0.43, + "__BeLoadedSound": "", + "BeLoadedSoundDelayTime": 0, + "__OtherSoundMap": null, + "__AiAttackAttr": "0003" } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json index 69075d2..df10eda 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":false,"WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":6},"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":66,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0010","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":47,"Y":-32},"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":23,"Y":37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0005","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":24,"Y":-30},"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":40,"Y":-10},"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":2,"Y":-37},"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":-2,"Y":47},"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":29,"Y":63},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0013","Weight":100,"Attr":{"CurrAmmon":"50","ResidueAmmo":"250"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-30,"Y":39},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-19,"Y":71},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":48,"Y":29},"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":20,"Y":94},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0014","Weight":100,"Attr":{"CurrAmmon":"5","ResidueAmmo":"60"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-14,"Y":97},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0011","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":9,"Y":-7},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0011","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":false,"WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":6},"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":66,"Y":47},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0010","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":47,"Y":-32},"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":23,"Y":37},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0005","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":24,"Y":-30},"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":40,"Y":-10},"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":2,"Y":-37},"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":-2,"Y":47},"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":29,"Y":63},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0013","Weight":100,"Attr":{"CurrAmmon":"50","ResidueAmmo":"250"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-30,"Y":39},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-19,"Y":71},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":48,"Y":29},"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":20,"Y":94},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0014","Weight":100,"Attr":{"CurrAmmon":"5","ResidueAmmo":"60"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-14,"Y":97},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0011","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":9,"Y":-7},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0011","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-41,"Y":61},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0016","Weight":100,"Attr":{"CurrAmmon":"5","ResidueAmmo":"60"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png deleted file mode 100644 index 4baebfb..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png +++ /dev/null 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 deleted file mode 100644 index ffa58c4..0000000 --- a/DungeonShooting_Godot/resource/sprite/bullet/normal/arrow.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[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/bullet0009.png b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0009.png new file mode 100644 index 0000000..a9bf9a4 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0009.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0009.png.import b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0009.png.import new file mode 100644 index 0000000..ac77e77 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/bullet/normal/bullet0009.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c5b2dmsxgv1p8" +path="res://.godot/imported/bullet0009.png-97565aeda60064867828dff1a7fe009a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/bullet/normal/bullet0009.png" +dest_files=["res://.godot/imported/bullet0009.png-97565aeda60064867828dff1a7fe009a.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/Bullet0009.tres b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0009.tres new file mode 100644 index 0000000..40aaa93 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/bullet/Bullet0009.tres @@ -0,0 +1,14 @@ +[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://cyg3uvbakan08"] + +[ext_resource type="Texture2D" uid="uid://c5b2dmsxgv1p8" path="res://resource/sprite/bullet/normal/bullet0009.png" id="1_v33wk"] + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_v33wk") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0016.tres b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0016.tres new file mode 100644 index 0000000..57712f9 --- /dev/null +++ b/DungeonShooting_Godot/resource/spriteFrames/weapon/Weapon0016.tres @@ -0,0 +1,97 @@ +[gd_resource type="SpriteFrames" load_steps=14 format=3 uid="uid://ccrflh6pjmq7r"] + +[ext_resource type="Texture2D" uid="uid://5yvr8ylxhqtf" path="res://resource/sprite/weapon/weapon0016/weapon0016.png" id="1_tbusc"] +[ext_resource type="Texture2D" uid="uid://3nqcx8tshjpd" path="res://resource/sprite/weapon/weapon0016/weapon0016_pull.png" id="2_a4jp6"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_355pd"] +atlas = ExtResource("2_a4jp6") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xe11p"] +atlas = ExtResource("2_a4jp6") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tvcy5"] +atlas = ExtResource("2_a4jp6") +region = Rect2(64, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3mfbu"] +atlas = ExtResource("2_a4jp6") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_08e07"] +atlas = ExtResource("2_a4jp6") +region = Rect2(0, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_50vyq"] +atlas = ExtResource("2_a4jp6") +region = Rect2(32, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ufb5n"] +atlas = ExtResource("2_a4jp6") +region = Rect2(64, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qdq04"] +atlas = ExtResource("2_a4jp6") +region = Rect2(96, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_co5vl"] +atlas = ExtResource("2_a4jp6") +region = Rect2(0, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_chj45"] +atlas = ExtResource("2_a4jp6") +region = Rect2(32, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gf76j"] +atlas = ExtResource("2_a4jp6") +region = Rect2(64, 64, 32, 32) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_tbusc") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_355pd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xe11p") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tvcy5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3mfbu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_08e07") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_50vyq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ufb5n") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qdq04") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_co5vl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_chj45") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gf76j") +}], +"loop": false, +"name": &"pull_frame", +"speed": 5.0 +}] diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_WeaponBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_WeaponBase.cs index ba3d942..57323b4 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig_WeaponBase.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig_WeaponBase.cs @@ -70,6 +70,18 @@ public int StandbyAmmoCapacity; /// + /// 换弹是否显示换弹进度 + /// + [JsonInclude] + public bool ShowReloadBar; + + /// + /// 弹夹打空是否自动换弹 + /// + [JsonInclude] + public bool AutoReload; + + /// /// 装弹时间 (单位: 秒) /// [JsonInclude] @@ -389,6 +401,8 @@ inst.AmmoCapacity = AmmoCapacity; inst.MaxAmmoCapacity = MaxAmmoCapacity; inst.StandbyAmmoCapacity = StandbyAmmoCapacity; + inst.ShowReloadBar = ShowReloadBar; + inst.AutoReload = AutoReload; inst.ReloadTime = ReloadTime; inst.AloneReload = AloneReload; inst.AloneReloadCount = AloneReloadCount; diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs index b3955d7..f872352 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Init.cs @@ -89,6 +89,11 @@ /// public const string Id_weapon0014 = "weapon0014"; /// + /// 名称: 木质短弓
+ /// 简介: + ///
+ public const string Id_weapon0016 = "weapon0016"; + /// /// 名称:
/// 简介: ///
@@ -129,6 +134,11 @@ /// public const string Id_bullet0008 = "bullet0008"; /// + /// 名称: 弓箭
+ /// 简介: + ///
+ public const string Id_bullet0009 = "bullet0009"; + /// /// 名称:
/// 简介: ///
diff --git a/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs b/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs index 77c8d38..b0183c2 100644 --- a/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs +++ b/DungeonShooting_Godot/src/game/activity/bullet/normal/Bullet.cs @@ -42,6 +42,9 @@ set => CollisionArea.CollisionMask = value; } + /// + /// 子弹使用的数据 + /// public BulletData BulletData { get; private set; } /// @@ -112,7 +115,7 @@ MoveController.AddForce(new Vector2(data.FlySpeed, 0).Rotated(Rotation)); //如果子弹会对玩家造成伤害, 则显示红色描边 - if (Player.Current.CollisionWithMask(attackLayer)) + if (Player.Current != null && Player.Current.CollisionWithMask(attackLayer)) { if (!IsEnemyBullet) { @@ -296,10 +299,13 @@ CollisionShape2D.Disabled = Altitude >= 16; } //距离太大, 自动销毁 - CurrFlyDistance += BulletData.FlySpeed * delta; - if (CurrFlyDistance >= BulletData.MaxDistance) + if (MoveController.Enable) { - OnMaxDistance(); + CurrFlyDistance += BulletData.FlySpeed * delta; + if (CurrFlyDistance >= BulletData.MaxDistance) + { + OnMaxDistance(); + } } } diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index 4499111..f7a38b1 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -241,6 +241,15 @@ //换弹投抛弹壳记录 private bool _reloadShellFlag = false; + //抖动强度 + private float _shakeStrength = 0; + + //抖动间隔 + private float _shakeInterval = 1 / 60f; + + //抖动计时器 + private float _shakeTimer = 0; + // ---------------------------------------------- private uint _tempLayer; @@ -388,6 +397,31 @@ } /// + /// 结束蓄力时调用 + /// 注意, 该函数仅在 Attribute.LooseShoot == false 时才能被调用 + /// + protected virtual void OnEndCharge() + { + } + + /// + /// 蓄力完成时调用 + /// + protected virtual void OnChargeFinish() + { + } + + /// + /// 蓄力时每帧调用 + /// 注意, 该函数仅在 Attribute.LooseShoot == false 时才能被调用 + /// + /// + /// 蓄力时长 + protected virtual void OnChargeProcess(float delta, float charge) + { + } + + /// /// 当换弹时调用, 如果设置单独装弹, 则每装一次弹调用一次该函数 /// protected virtual void OnReload() @@ -469,6 +503,24 @@ protected override void Process(float delta) { + //抖动 AnimatedSprite + if (_shakeStrength != 0) + { + _shakeTimer += delta; + if (_shakeTimer >= _shakeInterval) + { + _shakeTimer = 0; + AnimatedSprite.Offset = new Vector2( + Utils.Random.RandomRangeFloat(-_shakeStrength, _shakeStrength), + Utils.Random.RandomRangeFloat(-_shakeStrength, _shakeStrength) + ); + } + } + else + { + _shakeTimer = 0; + } + //未开火时间 _noAttackTime += delta; @@ -630,6 +682,12 @@ { BeLoaded(); } + + //子弹换弹 + if (CurrAmmo <= 0 && Attribute.AutoReload) + { + Reload(); + } } } else if (_delayedTime > 0) //攻击延时 @@ -646,7 +704,14 @@ { if (_looseShootFlag) //蓄力时长 { + var pv = _chargeTime; _chargeTime += delta; + OnChargeProcess(delta, _chargeTime); + //蓄力完成 + if (pv < Attribute.MinChargeTime && _chargeTime >= Attribute.MinChargeTime) + { + OnChargeFinish(); + } } _downTimer += delta; @@ -716,6 +781,22 @@ } /// + /// 设置抖动强度 + /// + public void SetShake(float strength) + { + _shakeStrength = strength; + } + + /// + /// 设置抖动间隔 + /// + public void SetShakeInterval(float interval) + { + _shakeInterval = interval; + } + + /// /// 返回武器是否在地上 /// /// @@ -911,6 +992,15 @@ } /// + /// 获取蓄力是否结束 + /// 注意, 该函数仅在 Attribute.LooseShoot == false 时有正确的返回值, 否则返回 false + /// + public bool IsChargeFinish() + { + return _chargeTime >= Attribute.MinChargeTime; + } + + /// /// 获取延时射击倒计时, 单位: 秒 /// public float GetDelayedAttackTime() @@ -996,6 +1086,7 @@ _continuousCount = 0; } _chargeTime = 0; + OnEndCharge(); } OnUpTrigger(); diff --git a/DungeonShooting_Godot/src/game/activity/weapon/bow/Bow.cs b/DungeonShooting_Godot/src/game/activity/weapon/bow/Bow.cs new file mode 100644 index 0000000..bff0b22 --- /dev/null +++ b/DungeonShooting_Godot/src/game/activity/weapon/bow/Bow.cs @@ -0,0 +1,92 @@ +using Godot; + +/// +/// 弓箭 +/// +[Tool] +public partial class Bow : Weapon +{ + /// + /// 弓箭挂载点 + /// + [Export, ExportFillNode] + public Marker2D ArrowPoint { get; set; } + + //正在使用的弓箭 + private Bullet _activeArrow; + + private void InitActiveArrow() + { + if (_activeArrow == null) + { + _activeArrow = (Bullet)FireManager.ShootBullet(this, 0, Attribute.Bullet); + _activeArrow.Pickup(); + _activeArrow.MoveController.Enable = false; + _activeArrow.CollisionArea.Monitoring = false; + _activeArrow.Collision.Disabled = true; + _activeArrow.Position = Vector2.Zero; + ArrowPoint.AddChild(_activeArrow); + } + } + + protected override void OnBeginCharge() + { + //拉弓开始蓄力 + AnimationPlayer.Play(AnimatorNames.Pull); + } + + protected override void OnChargeProcess(float delta, float charge) + { + if (Master.IsPlayer() && IsChargeFinish()) + { + //蓄力完成抖动屏幕 + GameCamera.Main.Shake(new Vector2(Utils.Random.RandomRangeFloat(-1, 1), Utils.Random.RandomRangeFloat(-1, 1))); + } + } + + protected override void OnEndCharge() + { + //结束蓄力 + AnimationPlayer.Play(AnimatorNames.Reset); + } + + protected override void OnFire() + { + if (Master.IsPlayer()) + { + //创建抖动 + GameCamera.Main.DirectionalShake(Vector2.Right.Rotated(GlobalRotation) * Attribute.CameraShake); + } + } + + protected override void OnShoot(float fireRotation) + { + FireManager.ShootBullet(this, fireRotation, Attribute.Bullet); + } + + protected override void OnPickUp(Role master) + { + base.OnPickUp(master); + InitActiveArrow(); + } + + protected override void OnRemove(Role master) + { + base.OnRemove(master); + if (_activeArrow != null) + { + _activeArrow.DoReclaim(); + _activeArrow = null; + } + } + + protected override void OnDestroy() + { + base.OnDestroy(); + if (_activeArrow != null) + { + _activeArrow.Destroy(); + _activeArrow = null; + } + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/camera/GameCamera.cs b/DungeonShooting_Godot/src/game/camera/GameCamera.cs index fed8fd1..513d058 100644 --- a/DungeonShooting_Godot/src/game/camera/GameCamera.cs +++ b/DungeonShooting_Godot/src/game/camera/GameCamera.cs @@ -202,7 +202,7 @@ } else { - distance = new Vector2(Mathf.Sqrt(distance.X), Mathf.Sqrt(distance.Y)); + distance = new Vector2(Mathf.Sqrt(Mathf.Abs(distance.X)), Mathf.Sqrt(Mathf.Abs(distance.Y))); var offset = Offset; _shakeOffset += _processDirection + new Vector2( (float)GD.RandRange(-distance.X, distance.X) - offset.X, diff --git a/DungeonShooting_Godot/src/game/data/property/AnimatorNames.cs b/DungeonShooting_Godot/src/game/data/property/AnimatorNames.cs index 747cff3..32a174b 100644 --- a/DungeonShooting_Godot/src/game/data/property/AnimatorNames.cs +++ b/DungeonShooting_Godot/src/game/data/property/AnimatorNames.cs @@ -95,4 +95,9 @@ /// 打开宝箱 /// public static readonly StringName Open = "open"; + + /// + /// 拉弓 + /// + public static readonly StringName Pull = "pull"; } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 9ae2b7a..86af038 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -78,6 +78,7 @@ public const string prefab_bullet_normal_Bullet0005_tscn = "res://prefab/bullet/normal/Bullet0005.tscn"; public const string prefab_bullet_normal_Bullet0006_tscn = "res://prefab/bullet/normal/Bullet0006.tscn"; public const string prefab_bullet_normal_Bullet0007_tscn = "res://prefab/bullet/normal/Bullet0007.tscn"; + public const string prefab_bullet_normal_Bullet0008_tscn = "res://prefab/bullet/normal/Bullet0008.tscn"; public const string prefab_currency_Gold1_tscn = "res://prefab/currency/Gold1.tscn"; public const string prefab_currency_Gold10_tscn = "res://prefab/currency/Gold10.tscn"; public const string prefab_currency_Gold5_tscn = "res://prefab/currency/Gold5.tscn"; @@ -177,6 +178,7 @@ public const string prefab_weapon_Weapon0011_tscn = "res://prefab/weapon/Weapon0011.tscn"; public const string prefab_weapon_Weapon0013_tscn = "res://prefab/weapon/Weapon0013.tscn"; public const string prefab_weapon_Weapon0014_tscn = "res://prefab/weapon/Weapon0014.tscn"; + public const string prefab_weapon_Weapon0016_tscn = "res://prefab/weapon/Weapon0016.tscn"; public const string prefab_weapon_WeaponTemplate_tscn = "res://prefab/weapon/WeaponTemplate.tscn"; public const string resource_config_ActivityBase_json = "res://resource/config/ActivityBase.json"; public const string resource_config_ActivityMaterial_json = "res://resource/config/ActivityMaterial.json"; @@ -273,7 +275,6 @@ public const string resource_sprite_bullet_collision_Collision0001_png = "res://resource/sprite/bullet/collision/Collision0001.png"; public const string resource_sprite_bullet_collision_Collision0002_png = "res://resource/sprite/bullet/collision/Collision0002.png"; 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"; @@ -281,6 +282,8 @@ public const string resource_sprite_bullet_normal_bullet0005_png = "res://resource/sprite/bullet/normal/bullet0005.png"; public const string resource_sprite_bullet_normal_bullet0006_png = "res://resource/sprite/bullet/normal/bullet0006.png"; public const string resource_sprite_bullet_normal_bullet0007_png = "res://resource/sprite/bullet/normal/bullet0007.png"; + public const string resource_sprite_bullet_normal_bullet0008_png = "res://resource/sprite/bullet/normal/bullet0008.png"; + public const string resource_sprite_bullet_normal_bullet0009_png = "res://resource/sprite/bullet/normal/bullet0009.png"; public const string resource_sprite_bullet_normal_bullet2_png = "res://resource/sprite/bullet/normal/bullet2.png"; public const string resource_sprite_common_Circle_png = "res://resource/sprite/common/Circle.png"; public const string resource_sprite_common_Circle2_png = "res://resource/sprite/common/Circle2.png"; @@ -473,12 +476,28 @@ public const string resource_sprite_weapon_weapon0013_weapon0014export_png = "res://resource/sprite/weapon/weapon0013/weapon0014-export.png"; public const string resource_sprite_weapon_weapon0013_weapon0014_png = "res://resource/sprite/weapon/weapon0013/weapon0014.png"; public const string resource_sprite_weapon_weapon0014_Weapon0014_png = "res://resource/sprite/weapon/weapon0014/Weapon0014.png"; - public const string resource_sprite_weapon_weapon0015_gun3_png = "res://resource/sprite/weapon/weapon0015/gun3.png"; - public const string resource_sprite_weapon_weapon0016_gun4_png = "res://resource/sprite/weapon/weapon0016/gun4.png"; - public const string resource_sprite_weapon_weapon0017_gun5_png = "res://resource/sprite/weapon/weapon0017/gun5.png"; - public const string resource_sprite_weapon_weapon0018_gun6_png = "res://resource/sprite/weapon/weapon0018/gun6.png"; - public const string resource_sprite_weapon_weapon0019_gun7_png = "res://resource/sprite/weapon/weapon0019/gun7.png"; - public const string resource_sprite_weapon_weapon0020_gun8_png = "res://resource/sprite/weapon/weapon0020/gun8.png"; + public const string resource_sprite_weapon_weapon0016_weapon0016_png = "res://resource/sprite/weapon/weapon0016/weapon0016.png"; + public const string resource_sprite_weapon_weapon0016_weapon0016_pull_png = "res://resource/sprite/weapon/weapon0016/weapon0016_pull.png"; + public const string resource_sprite_weapon_weapon0017_seapon0017t_png = "res://resource/sprite/weapon/weapon0017/seapon0017t.png"; + public const string resource_sprite_weapon_weapon0018_weapon0018_png = "res://resource/sprite/weapon/weapon0018/weapon0018.png"; + public const string resource_sprite_weapon_weapon0019_weapon0019_png = "res://resource/sprite/weapon/weapon0019/weapon0019.png"; + public const string resource_sprite_weapon_weapon0020_weapon0020export_png = "res://resource/sprite/weapon/weapon0020/weapon0020-export.png"; + public const string resource_sprite_weapon_weapon0020_weapon0020_png = "res://resource/sprite/weapon/weapon0020/weapon0020.png"; + public const string resource_sprite_weapon_weapon0021_weapon0021_png = "res://resource/sprite/weapon/weapon0021/weapon0021.png"; + public const string resource_sprite_weapon_weapon0022_weapon0022_png = "res://resource/sprite/weapon/weapon0022/weapon0022.png"; + public const string resource_sprite_weapon_weapon0023_weapon0023_png = "res://resource/sprite/weapon/weapon0023/weapon0023.png"; + public const string resource_sprite_weapon_weapon0033_weapon0033export_png = "res://resource/sprite/weapon/weapon0033/weapon0033-export.png"; + public const string resource_sprite_weapon_weapon0033_weapon0033_png = "res://resource/sprite/weapon/weapon0033/weapon0033.png"; + public const string resource_sprite_weapon_weapon0034_weapon0034_png = "res://resource/sprite/weapon/weapon0034/weapon0034.png"; + public const string resource_sprite_weapon_weapon0035_weapon0035_png = "res://resource/sprite/weapon/weapon0035/weapon0035.png"; + public const string resource_sprite_weapon_weapon0036_weapon0036_png = "res://resource/sprite/weapon/weapon0036/weapon0036.png"; + public const string resource_sprite_weapon_weapon0037_weapon0037_png = "res://resource/sprite/weapon/weapon0037/weapon0037.png"; + public const string resource_sprite_weapon_weapon0038_weapon0038_1_png = "res://resource/sprite/weapon/weapon0038/weapon0038.1.png"; + public const string resource_sprite_weapon_weapon0038_weapon0038_png = "res://resource/sprite/weapon/weapon0038/weapon0038.png"; + public const string resource_sprite_weapon_weapon0039_weapon0039_png = "res://resource/sprite/weapon/weapon0039/weapon0039.png"; + public const string resource_sprite_weapon_weapon0039_weapon00391_png = "res://resource/sprite/weapon/weapon0039/weapon0039(1).png"; + public const string resource_sprite_weapon_weapon0040_weapon00401_png = "res://resource/sprite/weapon/weapon0040/weapon0040,1.png"; + public const string resource_sprite_weapon_weapon0040_weapon0040_png = "res://resource/sprite/weapon/weapon0040/weapon0040.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"; @@ -486,6 +505,7 @@ public const string resource_spriteFrames_bullet_Bullet0005_tres = "res://resource/spriteFrames/bullet/Bullet0005.tres"; public const string resource_spriteFrames_bullet_Bullet0006_tres = "res://resource/spriteFrames/bullet/Bullet0006.tres"; public const string resource_spriteFrames_bullet_Bullet0007_tres = "res://resource/spriteFrames/bullet/Bullet0007.tres"; + public const string resource_spriteFrames_bullet_Bullet0008_tres = "res://resource/spriteFrames/bullet/Bullet0008.tres"; public const string resource_spriteFrames_bullet_Collision0001_tres = "res://resource/spriteFrames/bullet/Collision0001.tres"; public const string resource_spriteFrames_bullet_Collision0002_tres = "res://resource/spriteFrames/bullet/Collision0002.tres"; public const string resource_spriteFrames_other_RoomDoor_E_Down_tres = "res://resource/spriteFrames/other/RoomDoor_E_Down.tres"; @@ -532,6 +552,7 @@ public const string resource_spriteFrames_weapon_Weapon0011_tres = "res://resource/spriteFrames/weapon/Weapon0011.tres"; public const string resource_spriteFrames_weapon_Weapon0013_tres = "res://resource/spriteFrames/weapon/Weapon0013.tres"; public const string resource_spriteFrames_weapon_Weapon0014_tres = "res://resource/spriteFrames/weapon/Weapon0014.tres"; + public const string resource_spriteFrames_weapon_Weapon0016_tres = "res://resource/spriteFrames/weapon/Weapon0016.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"; diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBarHandler.cs b/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBarHandler.cs index e44c0ff..93620d1 100644 --- a/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBarHandler.cs +++ b/DungeonShooting_Godot/src/game/ui/roomUI/ReloadBarHandler.cs @@ -56,9 +56,10 @@ public void OnCameraPositionUpdate(float delta) { var player = Player.Current; - if (player.WeaponPack.ActiveItem != null && player.WeaponPack.ActiveItem.Reloading) + var activeItem = player.WeaponPack.ActiveItem; + if (activeItem != null && activeItem.Reloading && activeItem.Attribute.ShowReloadBar) { - ShowBar(player.GlobalPosition, player.WeaponPack.ActiveItem.ReloadProgress); + ShowBar(player.GlobalPosition, activeItem.ReloadProgress); } else {