mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-26 13:32:29 +08:00
Add audio effect and implement FireScan bullet behavior
- Added Rip.wav audio effect to the project. - Created FireScan bullet script with speed and damage properties. - Implemented basic AI movement for FireScan bullets. - Introduced Wave class for managing enemy waves with dynamic counts and spawning logic.
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://cvogxi7mktumf"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://cvogxi7mktumf"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/EntityBase.gd" id="1_mvol6"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="2_7lpu0"]
|
||||
[ext_resource type="PackedScene" uid="uid://dcjqjqere8ets" path="res://components/UI/EntityStateBar.tscn" id="2_uje1g"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_wcqpm"]
|
||||
animations = [{
|
||||
"frames": [],
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_7lpu0")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 5.0
|
||||
@@ -19,22 +23,7 @@ animations = [{
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_buhm1"]
|
||||
radius = 40.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3wcjn"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_4veur"]
|
||||
[sub_resource type="Animation" id="Animation_vxanw"]
|
||||
resource_name = "left"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
@@ -49,7 +38,7 @@ tracks/0/keys = {
|
||||
"values": [Vector2(-1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fgeas"]
|
||||
[sub_resource type="Animation" id="Animation_nuh11"]
|
||||
resource_name = "left"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
@@ -64,11 +53,26 @@ tracks/0/keys = {
|
||||
"values": [Vector2(1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_kbmff"]
|
||||
[sub_resource type="Animation" id="Animation_sxh2u"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(-1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_daot2"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_3wcjn"),
|
||||
"left": SubResource("Animation_4veur"),
|
||||
"right": SubResource("Animation_fgeas")
|
||||
"RESET": SubResource("Animation_sxh2u"),
|
||||
"left": SubResource("Animation_vxanw"),
|
||||
"right": SubResource("Animation_nuh11")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ao5k4"]
|
||||
@@ -84,6 +88,86 @@ blend_point_1/node = SubResource("AnimationNodeAnimation_611yr")
|
||||
blend_point_1/pos = 1.0
|
||||
snap = 1.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3wcjn"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate:r")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.2, 0, 0.2, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:modulate:g")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.2, 0, 0.2, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:modulate:b")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -0.2, 0, 0.2, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wl2we"]
|
||||
resource_name = "hurt"
|
||||
length = 0.4
|
||||
step = 0.1
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate:r")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(1, -0.2, 0, 0.2, 0, 10, -0.2, 0, 0.2, 0, 1, -0.2, 0, 0.2, 0),
|
||||
"times": PackedFloat32Array(0, 0.2, 0.4)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:modulate:g")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(1, -0.2, 0, 0.2, 0, 10, -0.2, 0, 0.2, 0, 1, -0.2, 0, 0.2, 0),
|
||||
"times": PackedFloat32Array(0, 0.2, 0.4)
|
||||
}
|
||||
tracks/2/type = "bezier"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:modulate:b")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(1, -0.2, 0, 0.2, 0, 10, -0.2, 0, 0.2, 0, 1, -0.2, 0, 0.2, 0),
|
||||
"times": PackedFloat32Array(0, 0.2, 0.4)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_kbmff"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_3wcjn"),
|
||||
"hurt": SubResource("Animation_wl2we")
|
||||
}
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_34h7q"]
|
||||
|
||||
[node name="EntityBase" type="CharacterBody2D"]
|
||||
@@ -92,17 +176,18 @@ script = ExtResource("1_mvol6")
|
||||
[node name="sounds" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="attack" type="AudioStreamPlayer2D" parent="sounds"]
|
||||
|
||||
[node name="sprint" type="AudioStreamPlayer2D" parent="sounds"]
|
||||
|
||||
[node name="miss" type="AudioStreamPlayer2D" parent="sounds"]
|
||||
|
||||
[node name="hurt" type="AudioStreamPlayer2D" parent="sounds"]
|
||||
|
||||
[node name="attack0" type="AudioStreamPlayer2D" parent="sounds"]
|
||||
|
||||
[node name="texture" type="AnimatedSprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -50)
|
||||
scale = Vector2(-1, 1)
|
||||
sprite_frames = SubResource("SpriteFrames_wcqpm")
|
||||
animation = &"idle"
|
||||
|
||||
@@ -113,16 +198,23 @@ unique_name_in_owner = true
|
||||
shape = SubResource("CircleShape2D_buhm1")
|
||||
|
||||
[node name="animator" type="AnimationPlayer" parent="texture"]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_kbmff")
|
||||
"": SubResource("AnimationLibrary_daot2")
|
||||
}
|
||||
|
||||
[node name="animatree" type="AnimationTree" parent="texture/animator"]
|
||||
unique_name_in_owner = true
|
||||
root_node = NodePath("%animatree/../..")
|
||||
root_node = NodePath("%animator/..")
|
||||
tree_root = SubResource("AnimationNodeBlendSpace1D_51ube")
|
||||
anim_player = NodePath("..")
|
||||
parameters/blend_position = 1.0
|
||||
parameters/blend_position = 1.36
|
||||
|
||||
[node name="hurtAnimator" type="AnimationPlayer" parent="texture"]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_kbmff")
|
||||
}
|
||||
|
||||
[node name="weapons" type="Node2D" parent="texture"]
|
||||
unique_name_in_owner = true
|
||||
@@ -137,4 +229,3 @@ position = Vector2(0, -20)
|
||||
|
||||
[node name="movebox" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_34h7q")
|
||||
disabled = true
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://db2cbgyyjpydp"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_cqre5"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Bullets/FireScan.gd" id="2_qprdp"]
|
||||
|
||||
[sub_resource type="SegmentShape2D" id="SegmentShape2D_omahd"]
|
||||
a = Vector2(0, -10)
|
||||
|
||||
[node name="FireScan" instance=ExtResource("1_cqre5")]
|
||||
script = ExtResource("2_qprdp")
|
||||
lifeDistance = 200.0
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
shape = SubResource("SegmentShape2D_omahd")
|
||||
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b0ncrvm8u4pox"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://b0ncrvm8u4pox"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_goqmy"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Characters/Chick.gd" id="2_r6bub"]
|
||||
[ext_resource type="Texture2D" uid="uid://7pkplcqqxvnp" path="res://resources/characters/chick/chick-a.svg" id="2_syddq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj5dvqb8gsedr" path="res://resources/characters/chick/chick-b.svg" id="3_064jv"]
|
||||
[ext_resource type="AudioStream" uid="uid://b7pxuov1id0ho" path="res://resources/sounds/effect/Pew.mp3" id="3_ik1xf"]
|
||||
[ext_resource type="AudioStream" uid="uid://bx3n11awokuyd" path="res://resources/sounds/effect/Rip.wav" id="4_oyq2p"]
|
||||
[ext_resource type="PackedScene" uid="uid://dny25qkcvtaa2" path="res://components/Effects/FirePot.tscn" id="6_kvx3n"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_xji3d"]
|
||||
@@ -34,9 +35,12 @@ script = ExtResource("2_r6bub")
|
||||
cooldownUnit = 200.0
|
||||
displayName = "小鸡"
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
[node name="hurt" parent="sounds" index="2"]
|
||||
stream = ExtResource("3_ik1xf")
|
||||
|
||||
[node name="attack1" type="AudioStreamPlayer2D" parent="sounds" index="4"]
|
||||
stream = ExtResource("4_oyq2p")
|
||||
|
||||
[node name="texture" parent="." index="1"]
|
||||
position = Vector2(0, -37)
|
||||
sprite_frames = SubResource("SpriteFrames_xji3d")
|
||||
@@ -46,6 +50,7 @@ animation = &"walk"
|
||||
position = Vector2(30, -12)
|
||||
|
||||
[node name="firepot" parent="texture/weapons/normal" index="0" instance=ExtResource("6_kvx3n")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="statebar" parent="." index="2" node_paths=PackedStringArray("entity")]
|
||||
position = Vector2(0, -82)
|
||||
|
||||
@@ -35,7 +35,7 @@ radius = 40.0
|
||||
script = ExtResource("2_8u5a0")
|
||||
cooldownUnit = 500.0
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
[node name="hurt" parent="sounds" index="2"]
|
||||
stream = ExtResource("3_ojyt7")
|
||||
|
||||
[node name="texture" parent="." index="1"]
|
||||
|
||||
@@ -38,25 +38,25 @@ radius = 41.0122
|
||||
script = ExtResource("2_oqdqd")
|
||||
cooldownUnit = 200.0
|
||||
|
||||
[node name="attack" parent="sounds" index="0"]
|
||||
stream = ExtResource("3_4syso")
|
||||
|
||||
[node name="sprint" parent="sounds" index="1"]
|
||||
[node name="sprint" parent="sounds" index="0"]
|
||||
stream = ExtResource("4_66s6c")
|
||||
|
||||
[node name="miss" parent="sounds" index="2"]
|
||||
[node name="miss" parent="sounds" index="1"]
|
||||
stream = ExtResource("5_xnbhq")
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
[node name="hurt" parent="sounds" index="2"]
|
||||
stream = ExtResource("6_nmmw2")
|
||||
|
||||
[node name="attack0" parent="sounds" index="3"]
|
||||
stream = ExtResource("3_4syso")
|
||||
|
||||
[node name="texture" parent="." index="1"]
|
||||
position = Vector2(0, -70)
|
||||
sprite_frames = SubResource("SpriteFrames_4v2ol")
|
||||
animation = &"walk"
|
||||
|
||||
[node name="hitbox" parent="texture/hurtbox" index="0"]
|
||||
position = Vector2(12, 16)
|
||||
position = Vector2(0, 30)
|
||||
shape = SubResource("CircleShape2D_h1v0q")
|
||||
|
||||
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
|
||||
@@ -65,3 +65,6 @@ position = Vector2(54, -45)
|
||||
[node name="statebar" parent="." index="2" node_paths=PackedStringArray("entity")]
|
||||
position = Vector2(0, -151)
|
||||
entity = NodePath("..")
|
||||
|
||||
[node name="movebox" parent="." index="3"]
|
||||
disabled = true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dny25qkcvtaa2"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://dny25qkcvtaa2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_k7ukc"]
|
||||
|
||||
@@ -22,6 +22,15 @@ colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1)
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_miml8"]
|
||||
gradient = SubResource("Gradient_g8be5")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_iaern"]
|
||||
min_value = -200.0
|
||||
max_value = 200.0
|
||||
_data = [Vector2(0, -200), 0.0, 0.0, 0, 0, Vector2(1, 200), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_1flsn"]
|
||||
curve = SubResource("Curve_iaern")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_qy5ym"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
@@ -33,11 +42,13 @@ curve = SubResource("Curve_qy5ym")
|
||||
particle_flag_disable_z = true
|
||||
angle_min = 1.07288e-05
|
||||
angle_max = 360.0
|
||||
direction = Vector3(0, -1, 0)
|
||||
spread = 15.0
|
||||
initial_velocity_min = 10.0
|
||||
initial_velocity_max = 300.0
|
||||
initial_velocity_max = 500.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
linear_accel_min = -2.23517e-06
|
||||
linear_accel_max = -2.23517e-06
|
||||
linear_accel_curve = SubResource("CurveTexture_1flsn")
|
||||
scale_min = 2.0
|
||||
scale_max = 12.0
|
||||
scale_over_velocity_curve = SubResource("CurveTexture_wcx7i")
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dmxi1ikn6avig"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dmxi1ikn6avig"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Tools/WorldTool.gd" id="1_t2xvy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfwg750a47ggx" path="res://components/Scenes/UI.tscn" id="2_04cdd"]
|
||||
[ext_resource type="PackedScene" uid="uid://bm7ymrri6pykb" path="res://components/Characters/Rooster.tscn" id="3_5ui6q"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0ncrvm8u4pox" path="res://components/Characters/Chick.tscn" id="4_tnil0"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8h1abpbe6cww" path="res://components/Characters/Hen.tscn" id="5_i6i4p"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckk8kahhof06u" path="res://resources/maps/Castle 2.png" id="6_p0nkj"]
|
||||
|
||||
[node name="world" type="Node2D"]
|
||||
@@ -13,6 +11,11 @@ script = ExtResource("1_t2xvy")
|
||||
|
||||
[node name="UI" parent="." instance=ExtResource("2_04cdd")]
|
||||
|
||||
[node name="background" type="Sprite2D" parent="."]
|
||||
z_index = -1
|
||||
position = Vector2(468, 320)
|
||||
texture = ExtResource("6_p0nkj")
|
||||
|
||||
[node name="rooster" parent="." groups=["players"] instance=ExtResource("3_5ui6q")]
|
||||
position = Vector2(394, 274)
|
||||
|
||||
@@ -20,16 +23,3 @@ position = Vector2(394, 274)
|
||||
position = Vector2(0, -100)
|
||||
process_callback = 0
|
||||
position_smoothing_enabled = true
|
||||
|
||||
[node name="hen" parent="." groups=["mobs"] instance=ExtResource("5_i6i4p")]
|
||||
position = Vector2(210, 455)
|
||||
displayName = "母鸡"
|
||||
|
||||
[node name="Chick" parent="." instance=ExtResource("4_tnil0")]
|
||||
position = Vector2(788, 513)
|
||||
isBoss = true
|
||||
|
||||
[node name="Castle2" type="Sprite2D" parent="."]
|
||||
z_index = -1
|
||||
position = Vector2(468, 320)
|
||||
texture = ExtResource("6_p0nkj")
|
||||
|
||||
Reference in New Issue
Block a user