1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-24 12:32:29 +08:00

feat(子弹系统): 重构伤害计算并添加音效

将子弹的伤害属性从`damage`重命名为`baseDamage`,并引入`damageMultipliers`数组支持多段伤害
为火山武器添加三段攻击音效并调整伤害倍率
更新相关武器和子弹脚本以适配新的伤害系统
This commit is contained in:
2025-11-22 08:42:51 +08:00
parent b263122a52
commit 46ea2fc775
28 changed files with 145 additions and 31 deletions
+53 -1
View File
@@ -1,8 +1,11 @@
[gd_scene load_steps=20 format=3 uid="uid://8uepi7uql314"]
[gd_scene load_steps=23 format=3 uid="uid://8uepi7uql314"]
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_gd3m7"]
[ext_resource type="Script" uid="uid://ci5hswfhck5as" path="res://scripts/Contents/Bullets/Volcano.gd" id="2_w1utg"]
[ext_resource type="Texture2D" uid="uid://ctmxadaowx5ps" path="res://resources/weapons/Volcano.webp" id="2_wwxm2"]
[ext_resource type="AudioStream" uid="uid://cer3lxbxqw5pq" path="res://resources/sounds/effect/sword1.mp3" id="3_6sp0s"]
[ext_resource type="AudioStream" uid="uid://cfwu55dfgs4bl" path="res://resources/sounds/effect/sword2.mp3" id="4_1sgli"]
[ext_resource type="AudioStream" uid="uid://bm2o8hu7nyqh1" path="res://resources/sounds/effect/sword3.mp3" id="5_b5nxd"]
[sub_resource type="Animation" id="Animation_w1utg"]
length = 0.001
@@ -97,6 +100,18 @@ tracks/7/keys = {
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("%texture/..:usingDamageMultiplier")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_oinqg"]
resource_name = "destroy"
@@ -218,6 +233,41 @@ tracks/8/keys = {
"method": &"generateShadow"
}]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("%texture/..:usingDamageMultiplier")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0, 0.6, 1.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [0, 1, 2]
}
tracks/10/type = "audio"
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/path = NodePath("%textureSword/audio")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("3_6sp0s")
}, {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("4_1sgli")
}, {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("5_b5nxd")
}],
"times": PackedFloat32Array(0, 0.6, 1.2)
}
tracks/10/use_blend = true
[sub_resource type="AnimationLibrary" id="AnimationLibrary_w1utg"]
_data = {
@@ -308,6 +358,8 @@ scale = Vector2(0.9999999, 0.9999999)
amount = 200
process_material = SubResource("ParticleProcessMaterial_xrrxo")
[node name="audio" type="AudioStreamPlayer2D" parent="texture/anchor/textureSword" index="1"]
[node name="hitbox" parent="." index="1"]
position = Vector2(245.25, 0)
shape = SubResource("RectangleShape2D_w1utg")