mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-25 21:12:29 +08:00
feat(战斗系统): 添加箭矢命中效果并调整弓箭伤害
- 为箭矢添加命中时的血液粒子效果和音效 - 将弓箭的基础伤害从3降低到2 - 更新弓箭描述文本以反映伤害调整
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://crtdkysmnkith"]
|
[gd_scene load_steps=8 format=3 uid="uid://crtdkysmnkith"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/Statemachine/BulletBase.gd" id="1_pklpq"]
|
[ext_resource type="Script" uid="uid://dp7c02tob106n" path="res://scripts/Statemachine/BulletBase.gd" id="1_pklpq"]
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_vypy3"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_vypy3"]
|
||||||
|
|
||||||
@@ -31,9 +31,9 @@ resource_name = "spawn"
|
|||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dxweq"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dxweq"]
|
||||||
_data = {
|
_data = {
|
||||||
"destroy": SubResource("Animation_oinqg"),
|
&"destroy": SubResource("Animation_oinqg"),
|
||||||
"loop": SubResource("Animation_ynxlt"),
|
&"loop": SubResource("Animation_ynxlt"),
|
||||||
"spawn": SubResource("Animation_kmogx")
|
&"spawn": SubResource("Animation_kmogx")
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ecl7m"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_ecl7m"]
|
||||||
@@ -48,7 +48,7 @@ sprite_frames = SubResource("SpriteFrames_vypy3")
|
|||||||
[node name="animator" type="AnimationPlayer" parent="texture"]
|
[node name="animator" type="AnimationPlayer" parent="texture"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
libraries = {
|
libraries = {
|
||||||
"": SubResource("AnimationLibrary_dxweq")
|
&"": SubResource("AnimationLibrary_dxweq")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="hitbox" type="CollisionShape2D" parent="."]
|
[node name="hitbox" type="CollisionShape2D" parent="."]
|
||||||
|
|||||||
@@ -4,6 +4,31 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://dadbn306owsy3" path="res://resources/bullets/arrow/arrow.png" id="2_b2ohg"]
|
[ext_resource type="Texture2D" uid="uid://dadbn306owsy3" path="res://resources/bullets/arrow/arrow.png" id="2_b2ohg"]
|
||||||
[ext_resource type="Script" uid="uid://u5x40y0cvqq2" path="res://scripts/Contents/Bullets/Arrow.gd" id="2_qddg0"]
|
[ext_resource type="Script" uid="uid://u5x40y0cvqq2" path="res://scripts/Contents/Bullets/Arrow.gd" id="2_qddg0"]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_qddg0"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "bezier"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("static:position:x")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/1/type = "bezier"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("%hitbox:position:x")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(8, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_oinqg"]
|
[sub_resource type="Animation" id="Animation_oinqg"]
|
||||||
resource_name = "destroy"
|
resource_name = "destroy"
|
||||||
length = 0.5
|
length = 0.5
|
||||||
@@ -51,31 +76,6 @@ tracks/1/keys = {
|
|||||||
"times": PackedFloat32Array(0, 1)
|
"times": PackedFloat32Array(0, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_qddg0"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "bezier"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("static:position:x")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0),
|
|
||||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
|
||||||
"times": PackedFloat32Array(0)
|
|
||||||
}
|
|
||||||
tracks/1/type = "bezier"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("%hitbox:position:x")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0),
|
|
||||||
"points": PackedFloat32Array(8, -0.25, 0, 0.25, 0),
|
|
||||||
"times": PackedFloat32Array(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qddg0"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qddg0"]
|
||||||
_data = {
|
_data = {
|
||||||
&"RESET": SubResource("Animation_qddg0"),
|
&"RESET": SubResource("Animation_qddg0"),
|
||||||
@@ -166,3 +166,5 @@ process_material = SubResource("ParticleProcessMaterial_qddg0")
|
|||||||
[node name="hitbox" parent="." index="1"]
|
[node name="hitbox" parent="." index="1"]
|
||||||
position = Vector2(8, 0)
|
position = Vector2(8, 0)
|
||||||
shape = SubResource("RectangleShape2D_qddg0")
|
shape = SubResource("RectangleShape2D_qddg0")
|
||||||
|
|
||||||
|
[node name="hit" type="AudioStreamPlayer2D" parent="." index="2"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=10 format=3 uid="uid://bfkg40awgniv"]
|
[gd_scene load_steps=11 format=3 uid="uid://bfkg40awgniv"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_hw4g4"]
|
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_hw4g4"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cs6se8dighfgj" path="res://resources/characters/cat/cat.png" id="2_q30ge"]
|
[ext_resource type="Texture2D" uid="uid://cs6se8dighfgj" path="res://resources/characters/cat/cat.png" id="2_q30ge"]
|
||||||
@@ -20,6 +20,14 @@ animations = [{
|
|||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_hmu5t"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"idle",
|
||||||
|
"speed": 5.0
|
||||||
|
}]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uo67a"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uo67a"]
|
||||||
size = Vector2(81, 62)
|
size = Vector2(81, 62)
|
||||||
|
|
||||||
@@ -50,6 +58,7 @@ texture = ExtResource("2_q30ge")
|
|||||||
|
|
||||||
[node name="staticAnimation" parent="texture" index="1"]
|
[node name="staticAnimation" parent="texture" index="1"]
|
||||||
scale = Vector2(1, 1.289)
|
scale = Vector2(1, 1.289)
|
||||||
|
sprite_frames = SubResource("SpriteFrames_hmu5t")
|
||||||
animation = &"idle"
|
animation = &"idle"
|
||||||
|
|
||||||
[node name="hitbox" parent="texture/hurtbox" index="0"]
|
[node name="hitbox" parent="texture/hurtbox" index="0"]
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
[gd_scene load_steps=10 format=3 uid="uid://mtenc2b01vau"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_yjqwo"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://23ttwefh4ej2" path="res://resources/sounds/effect/arrowshot.mp3" id="2_joko4"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_yjqwo"]
|
||||||
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_joko4"]
|
||||||
|
curve = SubResource("Curve_yjqwo")
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_yjqwo"]
|
||||||
|
colors = PackedColorArray(0.4321134, 0.4321134, 0.4321134, 1, 1, 1, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_joko4"]
|
||||||
|
gradient = SubResource("Gradient_yjqwo")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_er1y0"]
|
||||||
|
_data = [Vector2(0.8, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_uam1u"]
|
||||||
|
curve = SubResource("Curve_er1y0")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yjqwo"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
spread = 20.0
|
||||||
|
initial_velocity_max = 200.0
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
damping_max = 100.00001
|
||||||
|
scale_min = 2.0
|
||||||
|
scale_max = 5.0
|
||||||
|
scale_curve = SubResource("CurveTexture_uam1u")
|
||||||
|
color = Color(1, 0, 0, 1)
|
||||||
|
color_initial_ramp = SubResource("GradientTexture1D_joko4")
|
||||||
|
alpha_curve = SubResource("CurveTexture_joko4")
|
||||||
|
|
||||||
|
[node name="ShootBlood" instance=ExtResource("1_yjqwo")]
|
||||||
|
spawnSound = "spawn"
|
||||||
|
|
||||||
|
[node name="spawn" parent="sounds" index="0"]
|
||||||
|
stream = ExtResource("2_joko4")
|
||||||
|
volume_db = 10.0
|
||||||
|
|
||||||
|
[node name="particles" parent="." index="1"]
|
||||||
|
visible = false
|
||||||
|
amount = 50
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_yjqwo")
|
||||||
@@ -11,7 +11,7 @@ displayName = "鸡毛弓"
|
|||||||
quality = 2
|
quality = 2
|
||||||
costBeachball = 50
|
costBeachball = 50
|
||||||
store = {
|
store = {
|
||||||
"atk": 3,
|
"atk": 2,
|
||||||
"count": 1,
|
"count": 1,
|
||||||
"self": 1.0
|
"self": 1.0
|
||||||
}
|
}
|
||||||
@@ -42,4 +42,4 @@ displayName = "鸡毛弓"
|
|||||||
quality = 2
|
quality = 2
|
||||||
|
|
||||||
[node name="description" parent="container" index="2"]
|
[node name="description" parent="container" index="2"]
|
||||||
text = "[center]消耗[color=cyan]1[/color]点生命值,发射[color=cyan]1[/color]支[b]鸡毛箭[/b],每支造成当前飞行速度的[color=cyan]300%[/color]伤害。[/center]"
|
text = "[center]消耗[color=cyan]1[/color]点生命值,发射[color=cyan]1[/color]支[b]鸡毛箭[/b],每支造成当前飞行速度的[color=cyan]200%[/color]伤害。[/center]"
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://23ttwefh4ej2"
|
||||||
|
path="res://.godot/imported/arrowshot.mp3-6575c1022246344dab0e0ccd11d5e542.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/sounds/effect/arrowshot.mp3"
|
||||||
|
dest_files=["res://.godot/imported/arrowshot.mp3-6575c1022246344dab0e0ccd11d5e542.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
@@ -22,3 +22,6 @@ func ai():
|
|||||||
PresetBulletAI.forward(self, rotation)
|
PresetBulletAI.forward(self, rotation)
|
||||||
if speed < 1:
|
if speed < 1:
|
||||||
tryDestroy()
|
tryDestroy()
|
||||||
|
func succeedToHit(_dmg: float, _entity: EntityBase):
|
||||||
|
var effect = EffectController.create(ComponentManager.getEffect("ShootBlood"), position)
|
||||||
|
effect.shot()
|
||||||
|
|||||||
Reference in New Issue
Block a user