mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 03:37:13 +08:00
Add sound effects and character scripts
- Imported new sound effects: "Low Boing", "Low Whoosh", and "Pew" with corresponding import files. - Created a new character script for "Hen" with basic AI and attack functionality. - Implemented an effect controller script for managing particle effects with one-shot functionality.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bcvuuy2m0pke0"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/EffectController.gd" id="1_pt2rk"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_tgxns"]
|
||||
particle_flag_disable_z = true
|
||||
gravity = Vector3(0, 98, 0)
|
||||
|
||||
[node name="EffectBase" type="Node2D"]
|
||||
script = ExtResource("1_pt2rk")
|
||||
|
||||
[node name="particles" type="GPUParticles2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
amount = 30
|
||||
process_material = SubResource("ParticleProcessMaterial_tgxns")
|
||||
explosiveness = 1.0
|
||||
@@ -84,12 +84,22 @@ blend_point_1/node = SubResource("AnimationNodeAnimation_611yr")
|
||||
blend_point_1/pos = 1.0
|
||||
snap = 1.0
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ce3to"]
|
||||
size = Vector2(64, 14)
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_34h7q"]
|
||||
|
||||
[node name="EntityBase" type="CharacterBody2D"]
|
||||
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="texture" type="AnimatedSprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -50)
|
||||
@@ -117,9 +127,6 @@ parameters/blend_position = 1.0
|
||||
[node name="weapons" type="Node2D" parent="texture"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="movebox" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_ce3to")
|
||||
|
||||
[node name="statebar" parent="." instance=ExtResource("2_uje1g")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -100)
|
||||
@@ -127,3 +134,7 @@ position = Vector2(0, -100)
|
||||
[node name="damageAnchor" type="Node2D" parent="statebar"]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -20)
|
||||
|
||||
[node name="movebox" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_34h7q")
|
||||
disabled = true
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dm6viyjsje6yj"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_2l75q"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_q8kgb"]
|
||||
radius = 60.0
|
||||
|
||||
[node name="HenBomb" instance=ExtResource("1_2l75q")]
|
||||
fields = {
|
||||
0: 10,
|
||||
1: 5,
|
||||
2: 0
|
||||
}
|
||||
lifeTime = 100.0
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
shape = SubResource("CircleShape2D_q8kgb")
|
||||
@@ -1,9 +1,11 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://b0ncrvm8u4pox"]
|
||||
[gd_scene load_steps=8 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="PackedScene" uid="uid://dny25qkcvtaa2" path="res://components/Effects/FirePot.tscn" id="6_kvx3n"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_xji3d"]
|
||||
animations = [{
|
||||
@@ -27,14 +29,15 @@ animations = [{
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rn84j"]
|
||||
size = Vector2(19.5, 14)
|
||||
|
||||
[node name="Chick" instance=ExtResource("1_goqmy")]
|
||||
script = ExtResource("2_r6bub")
|
||||
cooldownUnit = 200.0
|
||||
displayName = "小鸡"
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
stream = ExtResource("3_ik1xf")
|
||||
|
||||
[node name="texture" parent="." index="1"]
|
||||
position = Vector2(0, -37)
|
||||
sprite_frames = SubResource("SpriteFrames_xji3d")
|
||||
animation = &"walk"
|
||||
@@ -42,8 +45,7 @@ animation = &"walk"
|
||||
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
|
||||
position = Vector2(30, -12)
|
||||
|
||||
[node name="movebox" parent="." index="1"]
|
||||
shape = SubResource("RectangleShape2D_rn84j")
|
||||
[node name="firepot" parent="texture/weapons/normal" index="0" instance=ExtResource("6_kvx3n")]
|
||||
|
||||
[node name="statebar" parent="." index="2" node_paths=PackedStringArray("entity")]
|
||||
position = Vector2(0, -82)
|
||||
|
||||
@@ -1,5 +1,52 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://c8h1abpbe6cww"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://c8h1abpbe6cww"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_twxai"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Characters/Hen.gd" id="2_8u5a0"]
|
||||
[ext_resource type="Texture2D" uid="uid://b5m0fpg3ewfum" path="res://resources/characters/hen/hen-a.svg" id="2_k7xxq"]
|
||||
[ext_resource type="Texture2D" uid="uid://3o0oqobnr3b2" path="res://resources/characters/hen/hen-b.svg" id="3_cpiwr"]
|
||||
[ext_resource type="AudioStream" uid="uid://cxhsnyjhrnicl" path="res://resources/sounds/effect/Glug.wav" id="3_ojyt7"]
|
||||
|
||||
[node name="EntityBase" instance=ExtResource("1_twxai")]
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_xwexj"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_k7xxq")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_k7xxq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_cpiwr")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"walk",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_0uubu"]
|
||||
radius = 40.0
|
||||
|
||||
[node name="Hen" instance=ExtResource("1_twxai")]
|
||||
script = ExtResource("2_8u5a0")
|
||||
cooldownUnit = 500.0
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
stream = ExtResource("3_ojyt7")
|
||||
|
||||
[node name="texture" parent="." index="1"]
|
||||
sprite_frames = SubResource("SpriteFrames_xwexj")
|
||||
animation = &"walk"
|
||||
|
||||
[node name="hitbox" parent="texture/hurtbox" index="0"]
|
||||
shape = SubResource("CircleShape2D_0uubu")
|
||||
|
||||
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
|
||||
|
||||
[node name="statebar" parent="." index="2" node_paths=PackedStringArray("entity")]
|
||||
position = Vector2(0, -114)
|
||||
entity = NodePath("..")
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bm7ymrri6pykb"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://bm7ymrri6pykb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
||||
[ext_resource type="Texture2D" uid="uid://fn8qx72clh38" path="res://resources/characters/cock/rooster-a.svg" id="2_q0j6j"]
|
||||
[ext_resource type="AudioStream" uid="uid://dclinyhu256xi" path="res://resources/sounds/effect/Low Whoosh.mp3" id="3_4syso"]
|
||||
[ext_resource type="Texture2D" uid="uid://ci2ik43ce82uy" path="res://resources/characters/cock/rooster-b.svg" id="3_b0fgx"]
|
||||
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"]
|
||||
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
|
||||
[ext_resource type="AudioStream" uid="uid://des7x0l4f3ijc" path="res://resources/sounds/effect/Low Boing.mp3" id="6_nmmw2"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_4v2ol"]
|
||||
animations = [{
|
||||
@@ -32,8 +36,21 @@ radius = 41.0122
|
||||
|
||||
[node name="Rooster" instance=ExtResource("1_e5pl8")]
|
||||
script = ExtResource("2_oqdqd")
|
||||
cooldownUnit = 200.0
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
[node name="attack" parent="sounds" index="0"]
|
||||
stream = ExtResource("3_4syso")
|
||||
|
||||
[node name="sprint" parent="sounds" index="1"]
|
||||
stream = ExtResource("4_66s6c")
|
||||
|
||||
[node name="miss" parent="sounds" index="2"]
|
||||
stream = ExtResource("5_xnbhq")
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
stream = ExtResource("6_nmmw2")
|
||||
|
||||
[node name="texture" parent="." index="1"]
|
||||
position = Vector2(0, -70)
|
||||
sprite_frames = SubResource("SpriteFrames_4v2ol")
|
||||
animation = &"walk"
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dny25qkcvtaa2"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_k7ukc"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_ohc88"]
|
||||
_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_6awim"]
|
||||
curve = SubResource("Curve_ohc88")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_14cxb"]
|
||||
colors = PackedColorArray(0.780392, 0.498039, 0, 1, 1, 0, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_2p6rn"]
|
||||
gradient = SubResource("Gradient_14cxb")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_g8be5"]
|
||||
offsets = PackedFloat32Array(0, 0.5, 1)
|
||||
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_qy5ym"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_wcx7i"]
|
||||
curve = SubResource("Curve_qy5ym")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_pah3d"]
|
||||
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
|
||||
gravity = Vector3(0, 0, 0)
|
||||
scale_min = 2.0
|
||||
scale_max = 12.0
|
||||
scale_over_velocity_curve = SubResource("CurveTexture_wcx7i")
|
||||
color_ramp = SubResource("GradientTexture1D_miml8")
|
||||
color_initial_ramp = SubResource("GradientTexture1D_2p6rn")
|
||||
alpha_curve = SubResource("CurveTexture_6awim")
|
||||
|
||||
[node name="FirePot" instance=ExtResource("1_k7ukc")]
|
||||
|
||||
[node name="particles" parent="." index="0"]
|
||||
amount = 50
|
||||
process_material = SubResource("ParticleProcessMaterial_pah3d")
|
||||
@@ -1,11 +1,14 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dmxi1ikn6avig"]
|
||||
[gd_scene load_steps=7 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"]
|
||||
y_sort_enabled = true
|
||||
script = ExtResource("1_t2xvy")
|
||||
|
||||
[node name="UI" parent="." instance=ExtResource("2_04cdd")]
|
||||
@@ -13,6 +16,20 @@ script = ExtResource("1_t2xvy")
|
||||
[node name="rooster" parent="." groups=["players"] instance=ExtResource("3_5ui6q")]
|
||||
position = Vector2(394, 274)
|
||||
|
||||
[node name="chick" parent="." groups=["mobs"] instance=ExtResource("4_tnil0")]
|
||||
position = Vector2(644, 391)
|
||||
[node name="camera" type="Camera2D" parent="rooster"]
|
||||
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