mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(角色): 添加小鸡角色濒死音效并调整属性
添加新的音效资源并修改小鸡角色的属性配置: 1. 新增濒死音效"Dun Dun Dunnn.wav"和受伤音效"foxhurt.mp3" 2. 将小鸡最大生命值从1500调整为15 3. 添加濒死状态检测,当生命值低于10%时播放特殊音效 4. 调整粒子效果和状态栏位置
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://b0ncrvm8u4pox"]
|
||||
[gd_scene load_steps=15 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" uid="uid://b2gg1fh0bflu7" path="res://scripts/Contents/Characters/Chick.gd" id="2_r6bub"]
|
||||
[ext_resource type="AudioStream" uid="uid://b7pxuov1id0ho" path="res://resources/sounds/effect/Pew.mp3" id="3_ik1xf"]
|
||||
[ext_resource type="AudioStream" uid="uid://bp41p33g0mep6" path="res://resources/sounds/effect/foxhurt.mp3" id="3_x766l"]
|
||||
[ext_resource type="AudioStream" uid="uid://bgo8p1l77xrbe" path="res://resources/sounds/effect/Magic Spell.wav" id="4_2qabh"]
|
||||
[ext_resource type="AudioStream" uid="uid://b10u6iir6uvqn" path="res://resources/sounds/effect/BigLaser.wav" id="4_mrsne"]
|
||||
[ext_resource type="AudioStream" uid="uid://bf34p3xnsosgj" path="res://resources/sounds/effect/Dun Dun Dunnn.wav" id="4_w0sit"]
|
||||
[ext_resource type="AudioStream" uid="uid://cee6rxv2uqynh" path="res://resources/sounds/effect/Flame.ogg" id="5_vcsbb"]
|
||||
[ext_resource type="PackedScene" uid="uid://dny25qkcvtaa2" path="res://components/Effects/FirePot.tscn" id="6_kvx3n"]
|
||||
[ext_resource type="AudioStream" uid="uid://dn6bijr513wyp" path="res://resources/sounds/effect/Drum Boing.wav" id="7_qjhwc"]
|
||||
@@ -55,9 +56,10 @@ displayName = "狐狸"
|
||||
drops = Array[int]([0, 1])
|
||||
dropCounts = Array[Vector2]([Vector2(10, 30), Vector2(15, 50)])
|
||||
appleCount = Vector2i(2, 4)
|
||||
hurtAudioRate = 0.1
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
stream = ExtResource("3_ik1xf")
|
||||
stream = ExtResource("3_x766l")
|
||||
|
||||
[node name="attack1" type="AudioStreamPlayer2D" parent="sounds" index="6"]
|
||||
stream = ExtResource("4_mrsne")
|
||||
@@ -72,6 +74,10 @@ stream = ExtResource("7_qjhwc")
|
||||
[node name="attack0" parent="sounds" index="9"]
|
||||
stream = ExtResource("4_2qabh")
|
||||
|
||||
[node name="readyToDie" type="AudioStreamPlayer2D" parent="sounds" index="10"]
|
||||
stream = ExtResource("4_w0sit")
|
||||
volume_db = 10.0
|
||||
|
||||
[node name="texture" parent="." index="3"]
|
||||
position = Vector2(0, -37)
|
||||
sprite_frames = SubResource("SpriteFrames_xji3d")
|
||||
@@ -101,8 +107,8 @@ unique_name_in_owner = true
|
||||
position = Vector2(56, 28)
|
||||
|
||||
[node name="trailParticle" parent="texture" index="7"]
|
||||
position = Vector2(1, -50)
|
||||
position = Vector2(1, -107)
|
||||
|
||||
[node name="statebar" parent="." index="4" node_paths=PackedStringArray("entity")]
|
||||
position = Vector2(0, -294)
|
||||
position = Vector2(0, -227)
|
||||
entity = NodePath("..")
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bf34p3xnsosgj"
|
||||
path="res://.godot/imported/Dun Dun Dunnn.wav-5b7b99dff3f589d21e0b37606406c6cc.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/sounds/effect/Dun Dun Dunnn.wav"
|
||||
dest_files=["res://.godot/imported/Dun Dun Dunnn.wav-5b7b99dff3f589d21e0b37606406c6cc.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://bp41p33g0mep6"
|
||||
path="res://.godot/imported/foxhurt.mp3-6a66cd1549e058c77d3d4e3128fa23f5.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/sounds/effect/foxhurt.mp3"
|
||||
dest_files=["res://.godot/imported/foxhurt.mp3-6a66cd1549e058c77d3d4e3128fa23f5.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
@@ -3,8 +3,10 @@ class_name Chick
|
||||
|
||||
@onready var firepot = $"%firepot"
|
||||
|
||||
var played: bool = false
|
||||
|
||||
func register():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 1500
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 15
|
||||
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.4
|
||||
attackCooldownMap[0] = 400
|
||||
attackCooldownMap[1] = 12000
|
||||
@@ -12,6 +14,12 @@ func register():
|
||||
attackCooldownMap[3] = 3000
|
||||
attackCooldownMap[4] = 4000
|
||||
sprintMultiplier = 50
|
||||
healthChanged.connect(
|
||||
func(h):
|
||||
if !played and h <= fields.get(FieldStore.Entity.MAX_HEALTH) * 0.1:
|
||||
played = true
|
||||
playSound("readyToDie")
|
||||
)
|
||||
func spawn():
|
||||
texture.play("walk")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user