音效配置更新

This commit is contained in:
cakipaul 2025-06-16 12:43:09 +08:00
parent 4163c76ce1
commit d9710fd499
30 changed files with 258 additions and 53 deletions

View File

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://c5j0jr7dnhctp" uid="uid://cx3h3tej4vdpn"
path="res://.godot/imported/0.png-54d56b7b0bc4cd26f2672feeba7ae5ae.ctex" path="res://.godot/imported/0.png-54d56b7b0bc4cd26f2672feeba7ae5ae.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

View File

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bhcao5nyfvyfy" uid="uid://cx3jt47s57mni"
path="res://.godot/imported/1.png-8a705cf38fabd1a3c5d797b1cf1b57da.ctex" path="res://.godot/imported/1.png-8a705cf38fabd1a3c5d797b1cf1b57da.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

View File

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cgckrv4p1btln" uid="uid://cu42t5wigvtap"
path="res://.godot/imported/2.png-ca6c96e2c50c6f0b0452444bc61ebf36.ctex" path="res://.godot/imported/2.png-ca6c96e2c50c6f0b0452444bc61ebf36.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

View File

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cjw0jbl3lb3f2" uid="uid://b5xhoimix1mbg"
path="res://.godot/imported/3.png-d68d5af8351b700941da9d2569ee24c3.ctex" path="res://.godot/imported/3.png-d68d5af8351b700941da9d2569ee24c3.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

View File

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://djfbx0hnecsgn" uid="uid://bjcwam373niuj"
path="res://.godot/imported/0.png-2c924c18eeedc92e72aa4b8514d1d7d3.ctex" path="res://.godot/imported/0.png-2c924c18eeedc92e72aa4b8514d1d7d3.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

View File

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cgvi0n6v2m6p3" uid="uid://u3b8f8uxit1g"
path="res://.godot/imported/1.png-c80ef71ed078317b9f6071fd8fb88e60.ctex" path="res://.godot/imported/1.png-c80ef71ed078317b9f6071fd8fb88e60.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

View File

@ -125,17 +125,17 @@
[ext_resource type="Texture2D" uid="uid://cjrbbv8doi28y" path="res://asset/art/gif/c02_杂项/拿纸杯/9.png" id="62_1ad0b"] [ext_resource type="Texture2D" uid="uid://cjrbbv8doi28y" path="res://asset/art/gif/c02_杂项/拿纸杯/9.png" id="62_1ad0b"]
[ext_resource type="Texture2D" uid="uid://dh6c0phkayb46" path="res://asset/art/animation/c01_捡球男孩_关键帧/8.png" id="62_xah2w"] [ext_resource type="Texture2D" uid="uid://dh6c0phkayb46" path="res://asset/art/animation/c01_捡球男孩_关键帧/8.png" id="62_xah2w"]
[ext_resource type="Texture2D" uid="uid://bvc3t2lwcecax" path="res://asset/art/animation/c01_捡球男孩_关键帧/9.png" id="63_gwbdy"] [ext_resource type="Texture2D" uid="uid://bvc3t2lwcecax" path="res://asset/art/animation/c01_捡球男孩_关键帧/9.png" id="63_gwbdy"]
[ext_resource type="Texture2D" uid="uid://drn4elaats1lc" path="res://asset/art/gif/c02_空房间/吕萍拉箱子呼吸_镜像/0.png" id="63_u41rl"] [ext_resource type="Texture2D" uid="uid://bjcwam373niuj" path="res://asset/art/gif/c02_空房间/吕萍拉箱子呼吸_镜像/0.png" id="63_u41rl"]
[ext_resource type="Texture2D" uid="uid://bqx1l8neaxovt" path="res://asset/art/gif/c02_空房间/吕萍拉箱子呼吸_镜像/1.png" id="64_6rp57"] [ext_resource type="Texture2D" uid="uid://u3b8f8uxit1g" path="res://asset/art/gif/c02_空房间/吕萍拉箱子呼吸_镜像/1.png" id="64_6rp57"]
[ext_resource type="Texture2D" uid="uid://bfjtdlhom8285" path="res://asset/art/animation/c01_捡球男孩_关键帧/10.png" id="64_cd0ob"] [ext_resource type="Texture2D" uid="uid://bfjtdlhom8285" path="res://asset/art/animation/c01_捡球男孩_关键帧/10.png" id="64_cd0ob"]
[ext_resource type="Texture2D" uid="uid://drtg2fw328kw1" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/3.png" id="65_1ad0b"] [ext_resource type="Texture2D" uid="uid://b5xhoimix1mbg" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/3.png" id="65_1ad0b"]
[ext_resource type="Texture2D" uid="uid://rg0hshb2i7qk" path="res://asset/art/animation/c01_捡球男孩_关键帧/11.png" id="65_cd5ki"] [ext_resource type="Texture2D" uid="uid://rg0hshb2i7qk" path="res://asset/art/animation/c01_捡球男孩_关键帧/11.png" id="65_cd5ki"]
[ext_resource type="Texture2D" uid="uid://cce3bm1k0pkis" path="res://asset/art/animation/c01_捡球男孩_关键帧/12.png" id="66_82px7"] [ext_resource type="Texture2D" uid="uid://cce3bm1k0pkis" path="res://asset/art/animation/c01_捡球男孩_关键帧/12.png" id="66_82px7"]
[ext_resource type="Texture2D" uid="uid://bex4hgbe1qkrg" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/2.png" id="66_05637"] [ext_resource type="Texture2D" uid="uid://cu42t5wigvtap" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/2.png" id="66_05637"]
[ext_resource type="Texture2D" uid="uid://bqnojffklav1g" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/1.png" id="67_j75wl"] [ext_resource type="Texture2D" uid="uid://cx3jt47s57mni" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/1.png" id="67_j75wl"]
[ext_resource type="Texture2D" uid="uid://i7dovyyeqaf4" path="res://asset/art/animation/c01_捡球男孩_关键帧/13.png" id="67_o6wn5"] [ext_resource type="Texture2D" uid="uid://i7dovyyeqaf4" path="res://asset/art/animation/c01_捡球男孩_关键帧/13.png" id="67_o6wn5"]
[ext_resource type="Texture2D" uid="uid://bd55sposeojxy" path="res://asset/art/animation/c01_捡球男孩_关键帧/14.png" id="68_f6wuu"] [ext_resource type="Texture2D" uid="uid://bd55sposeojxy" path="res://asset/art/animation/c01_捡球男孩_关键帧/14.png" id="68_f6wuu"]
[ext_resource type="Texture2D" uid="uid://8ir738vml1p0" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/0.png" id="68_xdik1"] [ext_resource type="Texture2D" uid="uid://cx3h3tej4vdpn" path="res://asset/art/gif/c02_空房间/吕萍拉箱子_镜像/0.png" id="68_xdik1"]
[ext_resource type="Texture2D" uid="uid://b8a58e62c0ss1" path="res://asset/art/animation/c01_捡球男孩_关键帧/15.png" id="69_6m37t"] [ext_resource type="Texture2D" uid="uid://b8a58e62c0ss1" path="res://asset/art/animation/c01_捡球男孩_关键帧/15.png" id="69_6m37t"]
[ext_resource type="Texture2D" uid="uid://cl7txwflrn4h0" path="res://asset/art/animation/c01_捡球男孩_关键帧/16.png" id="70_dytci"] [ext_resource type="Texture2D" uid="uid://cl7txwflrn4h0" path="res://asset/art/animation/c01_捡球男孩_关键帧/16.png" id="70_dytci"]
[ext_resource type="Texture2D" uid="uid://u7grwk05xxjs" path="res://asset/art/animation/c01_捡球男孩_关键帧/17.png" id="71_37fel"] [ext_resource type="Texture2D" uid="uid://u7grwk05xxjs" path="res://asset/art/animation/c01_捡球男孩_关键帧/17.png" id="71_37fel"]

View File

@ -5,6 +5,8 @@ class_name Sfx extends AudioStreamPlayer
set(value): set(value):
mode = value mode = value
notify_property_list_changed() notify_property_list_changed()
# 默认 stream 会变成 default 值
@export var audio_dict = {} as Dictionary[String, AudioStream]
# 当前播放状态注册;节点销毁前卸载 # 当前播放状态注册;节点销毁前卸载
# TODO BGM 过程抑制场景音效;场景音效随玩家运动呼吸 (结合 Sfx2D) # TODO BGM 过程抑制场景音效;场景音效随玩家运动呼吸 (结合 Sfx2D)
@ -13,21 +15,37 @@ var default_db := 0.0
# 只有 场景背景音 生效 # 只有 场景背景音 生效
var scene_loop := true var scene_loop := true
var scene_autustart := true var scene_autostart := true
var scene_sense_player_mov := false var scene_sense_player_mov := false
func _ready() -> void: func _ready() -> void:
# autoplay = false
bus = &"game_sfx" bus = &"game_sfx"
default_db = volume_db default_db = volume_db
if mode == "场景背景音":
autoplay = scene_autustart
if Engine.is_editor_hint(): if Engine.is_editor_hint():
audio_dict.erase("default")
return return
if stream:
audio_dict["default"] = stream
finished.connect(_on_finished) finished.connect(_on_finished)
func switch_stream(stream_name: String, play_next:= false, easing_duration := 1.0):
if not audio_dict.has(stream_name):
printerr("Audio stream not found in audio_dict: ", stream_name)
return
if easing_duration > 0:
easing_kill(easing_duration).tween_callback(func():
stream = audio_dict[stream_name]
if play_next:
play()
)
else:
stream = audio_dict[stream_name]
if play_next:
play()
func _on_finished() -> void: func _on_finished() -> void:
if mode == "场景背景音" and scene_loop: if mode == "场景背景音" and scene_loop:
play() play()
@ -60,7 +78,7 @@ func _get_property_list() -> Array[Dictionary]:
return [] return []
# # 只有 场景背景音 生效 # # 只有 场景背景音 生效
# var scene_loop := true # var scene_loop := true
# var scene_autustart := true # var scene_autostart := true
# var scene_sense_player_mov := false # var scene_sense_player_mov := false
return [ return [
{ {
@ -90,7 +108,8 @@ func _set(property: StringName, value: Variant) -> bool:
if mode != "场景背景音": if mode != "场景背景音":
return false return false
if property == "自动开始": if property == "自动开始":
scene_autustart = value autoplay = value
scene_autostart = value
return true return true
elif property == "循环播放": elif property == "循环播放":
scene_loop = value scene_loop = value
@ -105,7 +124,7 @@ func _get(property: StringName) -> Variant:
if mode != "场景背景音": if mode != "场景背景音":
return null return null
if property == "自动开始": if property == "自动开始":
return scene_autustart return scene_autostart
elif property == "循环播放": elif property == "循环播放":
return scene_loop return scene_loop
elif property == "感应玩家操作": elif property == "感应玩家操作":

View File

@ -687,7 +687,7 @@ position = Vector2(23, -115)
scale = Vector2(0.333, 0.333) scale = Vector2(0.333, 0.333)
texture = ExtResource("3_3r1q2") texture = ExtResource("3_3r1q2")
[node name="座钟滴答" type="AudioStreamPlayer2D" parent="Ground/BGSprite2D" index="0"] [node name="Sfx2D座钟滴答" type="AudioStreamPlayer2D" parent="Ground/BGSprite2D" index="0"]
position = Vector2(939.94, 372.372) position = Vector2(939.94, 372.372)
scale = Vector2(3.003, 3.003) scale = Vector2(3.003, 3.003)
stream = ExtResource("5_sluu3") stream = ExtResource("5_sluu3")

View File

@ -137,8 +137,11 @@ metadata/_custom_type_script = "uid://wapo47a1oddf"
position = Vector2(490, 36) position = Vector2(490, 36)
stream = ExtResource("5_6mww0") stream = ExtResource("5_6mww0")
autoplay = true autoplay = true
max_distance = 1000.0
attenuation = 2.0
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("4_qq2uh") script = ExtResource("4_qq2uh")
loop = true
file = "" file = ""
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
@ -211,6 +214,7 @@ autoplay = true
max_distance = 300.0 max_distance = 300.0
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("4_qq2uh") script = ExtResource("4_qq2uh")
loop = true
file = "" file = ""
metadata/_custom_type_script = "uid://wapo47a1oddf" metadata/_custom_type_script = "uid://wapo47a1oddf"
@ -223,6 +227,7 @@ max_distance = 500.0
attenuation = 2.0 attenuation = 2.0
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("4_qq2uh") script = ExtResource("4_qq2uh")
loop = true
file = "" file = ""
metadata/_custom_type_script = "uid://wapo47a1oddf" metadata/_custom_type_script = "uid://wapo47a1oddf"
@ -238,6 +243,7 @@ autoplay = true
max_distance = 600.0 max_distance = 600.0
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("4_qq2uh") script = ExtResource("4_qq2uh")
loop = true
file = "" file = ""
metadata/_custom_type_script = "uid://wapo47a1oddf" metadata/_custom_type_script = "uid://wapo47a1oddf"
@ -651,11 +657,6 @@ visible = false
visible = false visible = false
position = Vector2(0, -1) position = Vector2(0, -1)
[connection signal="finished" from="Ground/AnimationPlayer/走廊Sfx2d" to="Ground/AnimationPlayer/走廊Sfx2d" method="play"]
[connection signal="finished" from="Ground/DeployLayer/秋千/Sfx2D" to="Ground/DeployLayer/秋千/Sfx2D" method="play"]
[connection signal="finished" from="Ground/DeployLayer/秋千/Sfx2D童谣" to="Ground/DeployLayer/秋千/Sfx2D童谣" method="play"]
[connection signal="finished" from="Ground/DeployLayer/跷跷板/Sfx2D" to="Ground/DeployLayer/跷跷板/Sfx2D" method="play"]
[editable path="Ground"] [editable path="Ground"]
[editable path="Ground/DeployLayer/【站立小孩-1】/桌椅ambush1"] [editable path="Ground/DeployLayer/【站立小孩-1】/桌椅ambush1"]
[editable path="Ground/DeployLayer/【站立小孩-1】/猫鼠游戏重置ambush"] [editable path="Ground/DeployLayer/【站立小孩-1】/猫鼠游戏重置ambush"]

View File

@ -80,7 +80,7 @@ autoplay = true
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("4_c7jb6") script = ExtResource("4_c7jb6")
mode = "场景背景音" mode = "场景背景音"
"自动开始" = true "自动开始" = null
"循环播放" = true "循环播放" = true
"感应玩家操作" = false "感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m" metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
@ -269,8 +269,6 @@ texture = ExtResource("12_vjih6")
centered = false centered = false
offset = Vector2(0, -159) offset = Vector2(0, -159)
[connection signal="finished" from="Ground/AnimationPlayer/环境音" to="Ground/AnimationPlayer/环境音" method="play"]
[editable path="Ground"] [editable path="Ground"]
[editable path="Ground/DeployLayer/portal_2"] [editable path="Ground/DeployLayer/portal_2"]
[editable path="Ground/DeployLayer/portal_2/Sign"] [editable path="Ground/DeployLayer/portal_2/Sign"]

View File

@ -66,7 +66,7 @@ autoplay = true
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("4_p6k3c") script = ExtResource("4_p6k3c")
mode = "场景背景音" mode = "场景背景音"
"自动开始" = true "自动开始" = null
"循环播放" = true "循环播放" = true
"感应玩家操作" = false "感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m" metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
@ -76,7 +76,7 @@ stream = ExtResource("5_eerhd")
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("4_p6k3c") script = ExtResource("4_p6k3c")
mode = "场景背景音" mode = "场景背景音"
"自动开始" = false "自动开始" = null
"循环播放" = true "循环播放" = true
"感应玩家操作" = false "感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m" metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
@ -214,9 +214,6 @@ texture = ExtResource("6_l2q02")
centered = false centered = false
offset = Vector2(0, -158) offset = Vector2(0, -158)
[connection signal="finished" from="Ground/AnimationPlayer/环境音" to="Ground/AnimationPlayer/环境音" method="play"]
[connection signal="finished" from="Ground/AnimationPlayer/诡异环境音" to="Ground/AnimationPlayer/诡异环境音" method="play"]
[editable path="Ground"] [editable path="Ground"]
[editable path="Ground/DeployLayer/Interactable报纸柜台"] [editable path="Ground/DeployLayer/Interactable报纸柜台"]
[editable path="Ground/DeployLayer/Interactable报纸柜台/Sign"] [editable path="Ground/DeployLayer/Interactable报纸柜台/Sign"]

View File

@ -33,7 +33,7 @@ func _ghost_move() -> void:
tween = create_tween() tween = create_tween()
tween.tween_interval(15.0) tween.tween_interval(15.0)
tween.tween_property(ghost, "modulate:a", 0.0, 10.0) tween.tween_property(ghost, "modulate:a", 0.0, 10.0)
ghost.get_node("AudioStreamPlayer2D").start_loop() ghost.get_node("脚步声2D").start_loop()
func player_been_catched() -> void: func player_been_catched() -> void:

View File

@ -140,7 +140,7 @@ one_shot = false
freeze_time = 0.1 freeze_time = 0.1
hook_method = "player_been_catched" hook_method = "player_been_catched"
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Ghost"] [node name="脚步声2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Ghost"]
max_distance = 1500.0 max_distance = 1500.0
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("11_6w7lv") script = ExtResource("11_6w7lv")

View File

@ -171,7 +171,7 @@ autoplay = true
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("3_vx53v") script = ExtResource("3_vx53v")
mode = "场景背景音" mode = "场景背景音"
"自动开始" = true "自动开始" = null
"循环播放" = true "循环播放" = true
"感应玩家操作" = false "感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m" metadata/_custom_type_script = "uid://rq6w1vuhuq1m"

View File

@ -119,7 +119,7 @@ func _ghost_move() -> void:
# ghost.play() # ghost.play()
ghost_move_tween = create_tween() ghost_move_tween = create_tween()
ghost_move_tween.tween_property(ghost, "global_position", Vector2(2500, 0), 40.0).as_relative() ghost_move_tween.tween_property(ghost, "global_position", Vector2(2500, 0), 40.0).as_relative()
ghost.get_node("AudioStreamPlayer2D").start_loop() ghost.get_node("脚步声2D").start_loop()
func _setup_catching_game(): func _setup_catching_game():
@ -139,7 +139,7 @@ func player_been_catched(transition := true) -> void:
SceneManager.freeze_player(0) SceneManager.freeze_player(0)
if ghost_move_tween: if ghost_move_tween:
ghost_move_tween.kill() ghost_move_tween.kill()
ghost.get_node("AudioStreamPlayer2D").pause_loop() ghost.get_node("脚步声2D").pause_loop()
var player_start_x = 1800.0 var player_start_x = 1800.0
if transition: if transition:
# 玩家被抓 # 玩家被抓
@ -163,7 +163,7 @@ func player_been_catched(transition := true) -> void:
ghost_move_tween = create_tween() ghost_move_tween = create_tween()
ghost_move_tween.tween_property(ghost, "global_position", Vector2(2500, 0), 40.0).as_relative() ghost_move_tween.tween_property(ghost, "global_position", Vector2(2500, 0), 40.0).as_relative()
ghost.get_node("AudioStreamPlayer2D").start_loop() ghost.get_node("脚步声2D").start_loop()
ghost.visible = true ghost.visible = true
ghost.get_node("Ambush玩家被抓").enabled = true ghost.get_node("Ambush玩家被抓").enabled = true

View File

@ -145,7 +145,7 @@ one_shot = false
freeze_time = 0.1 freeze_time = 0.1
hook_method = "player_been_catched" hook_method = "player_been_catched"
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Ghost"] [node name="脚步声2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Ghost"]
max_distance = 1500.0 max_distance = 1500.0
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("10_1tspp") script = ExtResource("10_1tspp")

View File

@ -1,9 +1,11 @@
[gd_scene load_steps=5 format=3 uid="uid://bbs7yy5aofw1v"] [gd_scene load_steps=7 format=3 uid="uid://bbs7yy5aofw1v"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_gdcov"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_gdcov"]
[ext_resource type="Script" uid="uid://jkselt4d5q4r" path="res://scene/ground/scene/c02/s01_animation.gd" id="2_uuwn3"] [ext_resource type="Script" uid="uid://jkselt4d5q4r" path="res://scene/ground/scene/c02/s01_animation.gd" id="2_uuwn3"]
[ext_resource type="AudioStream" uid="uid://c2wgvynhg3mec" path="res://asset/audio/sfx/环境音/第一章/室外院子1.wav" id="3_4jml0"]
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_6lnxd"] [ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_6lnxd"]
[ext_resource type="Texture2D" uid="uid://d05pqud4yoxx3" path="res://asset/art/scene/c02/s01_公寓门口/bg_公寓门口.png" id="3_a5loe"] [ext_resource type="Texture2D" uid="uid://d05pqud4yoxx3" path="res://asset/art/scene/c02/s01_公寓门口/bg_公寓门口.png" id="3_a5loe"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_gqpp0"]
[node name="S01" type="Node2D"] [node name="S01" type="Node2D"]
@ -19,6 +21,17 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_4jml0")
autoplay = true
bus = &"game_sfx"
script = ExtResource("4_gqpp0")
mode = "场景背景音"
"自动开始" = null
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
texture = ExtResource("3_a5loe") texture = ExtResource("3_a5loe")

View File

@ -57,6 +57,7 @@ func _oneshot_wind():
wind_blows.visible = true wind_blows.visible = true
wind_blows.play() wind_blows.play()
wind_blows.animation_finished.connect(_on_wind_finished, CONNECT_ONE_SHOT) wind_blows.animation_finished.connect(_on_wind_finished, CONNECT_ONE_SHOT)
$"冷飕飕Sfx".play()
func _on_flyer_exit(arg): func _on_flyer_exit(arg):

View File

@ -1,11 +1,13 @@
[gd_scene load_steps=28 format=3 uid="uid://brck77w81fhvc"] [gd_scene load_steps=30 format=3 uid="uid://brck77w81fhvc"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_wrr6r"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_wrr6r"]
[ext_resource type="Script" uid="uid://bfrgnmde3hjn0" path="res://scene/ground/scene/c02/s02_animation.gd" id="2_5p8ev"] [ext_resource type="Script" uid="uid://bfrgnmde3hjn0" path="res://scene/ground/scene/c02/s02_animation.gd" id="2_5p8ev"]
[ext_resource type="PackedScene" uid="uid://byj234hen4btr" path="res://scene/entity/general/sfx.tscn" id="3_fvldj"]
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_fy0o1"] [ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_fy0o1"]
[ext_resource type="Texture2D" uid="uid://5428j51dwarc" path="res://asset/art/scene/c02/s02_大门过道/bg_过道背景.png" id="3_gjwum"] [ext_resource type="Texture2D" uid="uid://5428j51dwarc" path="res://asset/art/scene/c02/s02_大门过道/bg_过道背景.png" id="3_gjwum"]
[ext_resource type="SpriteFrames" uid="uid://b7fhheih1hbvf" path="res://config/animation/entity_sprite_frames.tres" id="4_wbif8"] [ext_resource type="SpriteFrames" uid="uid://b7fhheih1hbvf" path="res://config/animation/entity_sprite_frames.tres" id="4_wbif8"]
[ext_resource type="Texture2D" uid="uid://r0n7qy4kr3w2" path="res://asset/art/ui/action_mark/UI场景切换.png" id="5_m1xet"] [ext_resource type="Texture2D" uid="uid://r0n7qy4kr3w2" path="res://asset/art/ui/action_mark/UI场景切换.png" id="5_m1xet"]
[ext_resource type="AudioStream" uid="uid://bew3slewru6j0" path="res://asset/audio/sfx/环境音/第一章/02_进门过道.wav" id="6_36l5t"]
[ext_resource type="Texture2D" uid="uid://ceijv5l0prppa" path="res://asset/art/prop/c02/海报(小)/除鼠双杰.png" id="6_gjwum"] [ext_resource type="Texture2D" uid="uid://ceijv5l0prppa" path="res://asset/art/prop/c02/海报(小)/除鼠双杰.png" id="6_gjwum"]
[ext_resource type="Texture2D" uid="uid://b8pcnqvdddo5g" path="res://asset/art/prop/c02/海报特写/除鼠二杰.png" id="7_jg8g0"] [ext_resource type="Texture2D" uid="uid://b8pcnqvdddo5g" path="res://asset/art/prop/c02/海报特写/除鼠二杰.png" id="7_jg8g0"]
[ext_resource type="Texture2D" uid="uid://cvgw2mxrlr6io" path="res://asset/art/scene/c02/旧版/s02_走道/ux_进门鼠疫海报yz.png" id="7_wdwbi"] [ext_resource type="Texture2D" uid="uid://cvgw2mxrlr6io" path="res://asset/art/scene/c02/旧版/s02_走道/ux_进门鼠疫海报yz.png" id="7_wdwbi"]
@ -61,6 +63,24 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="冷飕飕Sfx" parent="Ground/AnimationPlayer" index="0" instance=ExtResource("3_fvldj")]
stream = null
mode = "交互与效果音"
audio_dict = Dictionary[String, AudioStream]({})
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="1"]
stream = ExtResource("6_36l5t")
bus = &"game_sfx"
script = ExtResource("14_jg8g0")
mode = "场景背景音"
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("6_36l5t")
})
"自动开始" = true
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
self_modulate = Color(0.831373, 0.886275, 0.956863, 1) self_modulate = Color(0.831373, 0.886275, 0.956863, 1)
position = Vector2(-1, 0) position = Vector2(-1, 0)
@ -143,6 +163,9 @@ disabled = true
stream = ExtResource("11_u68d7") stream = ExtResource("11_u68d7")
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("14_jg8g0") script = ExtResource("14_jg8g0")
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("11_u68d7")
})
[node name="Ambush杂物堆" parent="Ground/DeployLayer" index="9" instance=ExtResource("8_52as8")] [node name="Ambush杂物堆" parent="Ground/DeployLayer" index="9" instance=ExtResource("8_52as8")]
position = Vector2(387, 66) position = Vector2(387, 66)

View File

@ -47,6 +47,7 @@ func _on_ground_ready() -> void:
counter.enabled = true counter.enabled = true
elif not ArchiveManager.get_global_value("c02_burning_end"): elif not ArchiveManager.get_global_value("c02_burning_end"):
# 点燃后~离开前 # 点燃后~离开前
$"背景音效".switch_stream("火灾")
# 火灾开始后,无需 enable # 火灾开始后,无需 enable
counter.get_node("点燃").modulate.a = 1.0 counter.get_node("点燃").modulate.a = 1.0
new_bg.modulate.a = 1.0 new_bg.modulate.a = 1.0
@ -215,6 +216,7 @@ func _on_counter_interacted():
var flame_sprite = counter.get_node("点燃") var flame_sprite = counter.get_node("点燃")
tween.parallel().tween_property(flame_sprite, "modulate:a", 1.0, 2.0) tween.parallel().tween_property(flame_sprite, "modulate:a", 1.0, 2.0)
await tween.finished await tween.finished
$"背景音效".switch_stream("火灾", true)
burning_layer.visible = true burning_layer.visible = true
burning_layer.get_node("Ambush等待的小蝉").enabled = true burning_layer.get_node("Ambush等待的小蝉").enabled = true
burning_layer.get_node("区域1").recheck() burning_layer.get_node("区域1").recheck()

View File

@ -1,10 +1,13 @@
[gd_scene load_steps=68 format=3 uid="uid://djc2uaefhmu7"] [gd_scene load_steps=74 format=3 uid="uid://djc2uaefhmu7"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_0dylx"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_0dylx"]
[ext_resource type="Script" uid="uid://dsp5plrdkrsd7" path="res://scene/ground/scene/c02/s03_animation.gd" id="2_dt5aj"] [ext_resource type="Script" uid="uid://dsp5plrdkrsd7" path="res://scene/ground/scene/c02/s03_animation.gd" id="2_dt5aj"]
[ext_resource type="AudioStream" uid="uid://lp46utp018ac" path="res://asset/audio/sfx/环境音/第一章/03_一楼院子.wav" id="3_2y8cu"]
[ext_resource type="Texture2D" uid="uid://b3odt4ojsvu5n" path="res://asset/art/scene/c02/s03_公寓一楼院子/bg_一楼.png" id="3_sqv8l"] [ext_resource type="Texture2D" uid="uid://b3odt4ojsvu5n" path="res://asset/art/scene/c02/s03_公寓一楼院子/bg_一楼.png" id="3_sqv8l"]
[ext_resource type="SpriteFrames" uid="uid://3nas025c2c5u" path="res://asset/art/gif/c02_杂项/frames.tres" id="4_gd6xp"] [ext_resource type="SpriteFrames" uid="uid://3nas025c2c5u" path="res://asset/art/gif/c02_杂项/frames.tres" id="4_gd6xp"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_ygnci"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="5_00b7a"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="5_00b7a"]
[ext_resource type="AudioStream" uid="uid://s7uigovfp5g3" path="res://asset/audio/sfx/环境音/第一章/火灾演出.wav" id="5_ygnci"]
[ext_resource type="Texture2D" uid="uid://f8yjp5ggr8qw" path="res://asset/art/scene/c02/s03_公寓一楼院子/算卦布.png" id="6_1tart"] [ext_resource type="Texture2D" uid="uid://f8yjp5ggr8qw" path="res://asset/art/scene/c02/s03_公寓一楼院子/算卦布.png" id="6_1tart"]
[ext_resource type="Texture2D" uid="uid://0uh6qaalhqju" path="res://asset/art/scene/c02/s11_一楼火灾/总背景/bg_院子1楼火灾.png" id="6_d7h4s"] [ext_resource type="Texture2D" uid="uid://0uh6qaalhqju" path="res://asset/art/scene/c02/s11_一楼火灾/总背景/bg_院子1楼火灾.png" id="6_d7h4s"]
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="6_t48d1"] [ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="6_t48d1"]
@ -27,6 +30,8 @@
[ext_resource type="Texture2D" uid="uid://b78jbthcfkod7" path="res://asset/art/scene/c02/s03_公寓一楼院子/地面物品反光/地反光3.png" id="14_7pq5y"] [ext_resource type="Texture2D" uid="uid://b78jbthcfkod7" path="res://asset/art/scene/c02/s03_公寓一楼院子/地面物品反光/地反光3.png" id="14_7pq5y"]
[ext_resource type="Texture2D" uid="uid://dy55syw4my0qo" path="res://asset/art/scene/c02/s03_公寓一楼院子/e_水井.png" id="21_4n8vm"] [ext_resource type="Texture2D" uid="uid://dy55syw4my0qo" path="res://asset/art/scene/c02/s03_公寓一楼院子/e_水井.png" id="21_4n8vm"]
[ext_resource type="Texture2D" uid="uid://d0mrgm6ot3vee" path="res://asset/art/scene/c02/s03_公寓一楼院子/e_药车.png" id="22_3y5s5"] [ext_resource type="Texture2D" uid="uid://d0mrgm6ot3vee" path="res://asset/art/scene/c02/s03_公寓一楼院子/e_药车.png" id="22_3y5s5"]
[ext_resource type="AudioStream" uid="uid://inmdv5gqqius" path="res://asset/audio/sfx/ui/门锁互动.mp3" id="22_vddfx"]
[ext_resource type="AudioStream" uid="uid://ccng5y2fip6mc" path="res://asset/audio/sfx/ui/开锁声.mp3" id="23_3nako"]
[ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="23_81juy"] [ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="23_81juy"]
[ext_resource type="PackedScene" uid="uid://bxpexbk7f3rax" path="res://scene/ground/script/c02/敲门游戏.tscn" id="24_0o4rt"] [ext_resource type="PackedScene" uid="uid://bxpexbk7f3rax" path="res://scene/ground/script/c02/敲门游戏.tscn" id="24_0o4rt"]
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="25_iyaiw"] [ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="25_iyaiw"]
@ -47,6 +52,7 @@
[ext_resource type="Texture2D" uid="uid://3hruwr03tox1" path="res://asset/art/gif/c02_一楼火灾/7-最左木箱 烧痕.png" id="36_rnk1v"] [ext_resource type="Texture2D" uid="uid://3hruwr03tox1" path="res://asset/art/gif/c02_一楼火灾/7-最左木箱 烧痕.png" id="36_rnk1v"]
[ext_resource type="Texture2D" uid="uid://bdisdxc1txm0g" path="res://asset/art/gif/c02_霸凌/小婵_被霸凌/0.png" id="37_dsgmu"] [ext_resource type="Texture2D" uid="uid://bdisdxc1txm0g" path="res://asset/art/gif/c02_霸凌/小婵_被霸凌/0.png" id="37_dsgmu"]
[ext_resource type="SpriteFrames" uid="uid://b0icyhxpj16tv" path="res://asset/art/gif/c02_谢幕演出/frames.tres" id="39_rnk1v"] [ext_resource type="SpriteFrames" uid="uid://b0icyhxpj16tv" path="res://asset/art/gif/c02_谢幕演出/frames.tres" id="39_rnk1v"]
[ext_resource type="AudioStream" uid="uid://cvttds81trcoc" path="res://asset/audio/sfx/ui/click.wav" id="41_df1yo"]
[sub_resource type="Animation" id="Animation_rt2lh"] [sub_resource type="Animation" id="Animation_rt2lh"]
length = 0.001 length = 0.001
@ -335,6 +341,21 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_2y8cu")
autoplay = true
bus = &"game_sfx"
script = ExtResource("4_ygnci")
mode = "场景背景音"
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("3_2y8cu"),
"火灾": ExtResource("5_ygnci")
})
"自动开始" = true
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
light_mask = 5 light_mask = 5
texture = ExtResource("3_sqv8l") texture = ExtResource("3_sqv8l")
@ -490,6 +511,16 @@ texture = ExtResource("7_gd6xp")
interacted_texture = ExtResource("9_liq0c") interacted_texture = ExtResource("9_liq0c")
prop_key = "prop_老虎钳" prop_key = "prop_老虎钳"
[node name="SfxInvalid" parent="Ground/DeployLayer/Interactable铁门" index="0"]
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("22_vddfx")
})
[node name="SfxSuccess" parent="Ground/DeployLayer/Interactable铁门" index="1"]
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("23_3nako")
})
[node name="CollisionShape2D" parent="Ground/DeployLayer/Interactable铁门/Area2D" index="0"] [node name="CollisionShape2D" parent="Ground/DeployLayer/Interactable铁门/Area2D" index="0"]
shape = SubResource("RectangleShape2D_er6ob") shape = SubResource("RectangleShape2D_er6ob")
@ -576,6 +607,11 @@ frame_progress = 0.952326
height = 49.11 height = 49.11
dialogue_title = "c02_s11_井边疯子对话" dialogue_title = "c02_s11_井边疯子对话"
[node name="Sfx" parent="Ground/DeployLayer/Npc井边疯子" index="0"]
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("41_df1yo")
})
[node name="SpeakingSign2D" parent="Ground/DeployLayer/Npc井边疯子" index="4"] [node name="SpeakingSign2D" parent="Ground/DeployLayer/Npc井边疯子" index="4"]
position = Vector2(0, -49.11) position = Vector2(0, -49.11)

View File

@ -1,8 +1,10 @@
[gd_scene load_steps=17 format=3 uid="uid://bivc5cdap370p"] [gd_scene load_steps=19 format=3 uid="uid://bivc5cdap370p"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_2jej0"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_2jej0"]
[ext_resource type="Script" uid="uid://dmhh4g47bdxxy" path="res://scene/ground/scene/c02/s04_animation.gd" id="2_jyere"] [ext_resource type="Script" uid="uid://dmhh4g47bdxxy" path="res://scene/ground/scene/c02/s04_animation.gd" id="2_jyere"]
[ext_resource type="Texture2D" uid="uid://7jvg2flkapj3" path="res://asset/art/scene/c02/s04_保卫科/bg_保卫科.png" id="3_66gue"] [ext_resource type="Texture2D" uid="uid://7jvg2flkapj3" path="res://asset/art/scene/c02/s04_保卫科/bg_保卫科.png" id="3_66gue"]
[ext_resource type="AudioStream" uid="uid://6gttowdwmado" path="res://asset/audio/sfx/环境音/第一章/房间内部场景1.wav" id="3_dlq1i"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_ffvrp"]
[ext_resource type="SpriteFrames" uid="uid://c2sjavnptjn" path="res://asset/art/gif/c02_保卫科/frames.tres" id="4_svuj3"] [ext_resource type="SpriteFrames" uid="uid://c2sjavnptjn" path="res://asset/art/gif/c02_保卫科/frames.tres" id="4_svuj3"]
[ext_resource type="Texture2D" uid="uid://bnyf8m63ltgh0" path="res://asset/art/scene/c02/s04_保卫科/l_香.png" id="5_cy26p"] [ext_resource type="Texture2D" uid="uid://bnyf8m63ltgh0" path="res://asset/art/scene/c02/s04_保卫科/l_香.png" id="5_cy26p"]
[ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="6_66gue"] [ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="6_66gue"]
@ -35,6 +37,17 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_dlq1i")
autoplay = true
bus = &"game_sfx"
script = ExtResource("4_ffvrp")
mode = "场景背景音"
"自动开始" = null
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
light_mask = 5 light_mask = 5
position = Vector2(47, 2) position = Vector2(47, 2)

View File

@ -1,8 +1,10 @@
[gd_scene load_steps=23 format=3 uid="uid://cp8d3ag5nbjq0"] [gd_scene load_steps=25 format=3 uid="uid://cp8d3ag5nbjq0"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_6w6et"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_6w6et"]
[ext_resource type="Script" uid="uid://dydpmjpcvt3v1" path="res://scene/ground/scene/c02/s05_animation.gd" id="2_70lf6"] [ext_resource type="Script" uid="uid://dydpmjpcvt3v1" path="res://scene/ground/scene/c02/s05_animation.gd" id="2_70lf6"]
[ext_resource type="AudioStream" uid="uid://r5b8qi54asdk" path="res://asset/audio/sfx/环境音/第一章/楼道场景4.wav" id="3_kpaw8"]
[ext_resource type="Texture2D" uid="uid://dbtepltemtmy2" path="res://asset/art/scene/c02/s05_一楼内侧楼道/bg_楼道背景.png" id="3_rcuxq"] [ext_resource type="Texture2D" uid="uid://dbtepltemtmy2" path="res://asset/art/scene/c02/s05_一楼内侧楼道/bg_楼道背景.png" id="3_rcuxq"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_20mbg"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_tueh3"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_tueh3"]
[ext_resource type="SpriteFrames" uid="uid://3nas025c2c5u" path="res://asset/art/gif/c02_杂项/frames.tres" id="7_mrltr"] [ext_resource type="SpriteFrames" uid="uid://3nas025c2c5u" path="res://asset/art/gif/c02_杂项/frames.tres" id="7_mrltr"]
[ext_resource type="Texture2D" uid="uid://bn47plsx5coug" path="res://asset/art/scene/c02/s05_一楼内侧楼道/煤油灯光效.png" id="8_mrltr"] [ext_resource type="Texture2D" uid="uid://bn47plsx5coug" path="res://asset/art/scene/c02/s05_一楼内侧楼道/煤油灯光效.png" id="8_mrltr"]
@ -66,6 +68,17 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_kpaw8")
autoplay = true
bus = &"game_sfx"
script = ExtResource("4_20mbg")
mode = "场景背景音"
"自动开始" = null
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
light_mask = 5 light_mask = 5
scale = Vector2(0.5, 0.5) scale = Vector2(0.5, 0.5)

View File

@ -1,8 +1,10 @@
[gd_scene load_steps=28 format=3 uid="uid://cootarwb44vvh"] [gd_scene load_steps=30 format=3 uid="uid://cootarwb44vvh"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_qkymk"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_qkymk"]
[ext_resource type="Script" uid="uid://cbt0ubygchxvv" path="res://scene/ground/scene/c02/s06_animation.gd" id="2_4dg6u"] [ext_resource type="Script" uid="uid://cbt0ubygchxvv" path="res://scene/ground/scene/c02/s06_animation.gd" id="2_4dg6u"]
[ext_resource type="Texture2D" uid="uid://6ol2om68cd1q" path="res://asset/art/scene/c02/s06_二楼楼道/bg_背景.png" id="3_och2w"] [ext_resource type="Texture2D" uid="uid://6ol2om68cd1q" path="res://asset/art/scene/c02/s06_二楼楼道/bg_背景.png" id="3_och2w"]
[ext_resource type="AudioStream" uid="uid://blf1rtu71vy17" path="res://asset/audio/sfx/环境音/第一章/楼道场景1.wav" id="3_yolsv"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_2e08x"]
[ext_resource type="AudioStream" uid="uid://ce3p55nnts4v5" path="res://asset/audio/effect/action/cloth2.ogg" id="4_58e26"] [ext_resource type="AudioStream" uid="uid://ce3p55nnts4v5" path="res://asset/audio/effect/action/cloth2.ogg" id="4_58e26"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_haidv"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_haidv"]
[ext_resource type="PackedScene" uid="uid://cxw5rovg5mu1a" path="res://scene/ground/script/c02/s00_煤油灯.tscn" id="5_3p5ta"] [ext_resource type="PackedScene" uid="uid://cxw5rovg5mu1a" path="res://scene/ground/script/c02/s00_煤油灯.tscn" id="5_3p5ta"]
@ -323,6 +325,19 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_yolsv")
bus = &"game_sfx"
script = ExtResource("4_2e08x")
mode = "场景背景音"
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("3_yolsv")
})
"自动开始" = true
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
light_mask = 5 light_mask = 5
position = Vector2(0, -2) position = Vector2(0, -2)

View File

@ -1,9 +1,11 @@
[gd_scene load_steps=12 format=3 uid="uid://t4xjt774ngwh"] [gd_scene load_steps=14 format=3 uid="uid://t4xjt774ngwh"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_oao56"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_oao56"]
[ext_resource type="Script" uid="uid://cnjdxjni5v3cs" path="res://scene/ground/scene/c02/s07_animation.gd" id="2_t0s64"] [ext_resource type="Script" uid="uid://cnjdxjni5v3cs" path="res://scene/ground/scene/c02/s07_animation.gd" id="2_t0s64"]
[ext_resource type="AudioStream" uid="uid://m6av0abbhyco" path="res://asset/audio/sfx/环境音/第一章/楼道场景3.wav" id="3_s75vl"]
[ext_resource type="Texture2D" uid="uid://u7rp66mboqq4" path="res://asset/art/scene/c02/s07_二楼内侧楼道/bg_背景.png" id="3_t0s64"] [ext_resource type="Texture2D" uid="uid://u7rp66mboqq4" path="res://asset/art/scene/c02/s07_二楼内侧楼道/bg_背景.png" id="3_t0s64"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_5krke"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_5krke"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_sv27p"]
[ext_resource type="Texture2D" uid="uid://bim6w1xp1a4bg" path="res://asset/art/scene/c02/s07_二楼内侧楼道/锡箔墙面涂鸦提示.png" id="5_6ivku"] [ext_resource type="Texture2D" uid="uid://bim6w1xp1a4bg" path="res://asset/art/scene/c02/s07_二楼内侧楼道/锡箔墙面涂鸦提示.png" id="5_6ivku"]
[ext_resource type="PackedScene" uid="uid://cxw5rovg5mu1a" path="res://scene/ground/script/c02/s00_煤油灯.tscn" id="5_u2dyp"] [ext_resource type="PackedScene" uid="uid://cxw5rovg5mu1a" path="res://scene/ground/script/c02/s00_煤油灯.tscn" id="5_u2dyp"]
[ext_resource type="PackedScene" uid="uid://xovlfee503a4" path="res://scene/ground/script/c02/小手讨东西.tscn" id="6_5krke"] [ext_resource type="PackedScene" uid="uid://xovlfee503a4" path="res://scene/ground/script/c02/小手讨东西.tscn" id="6_5krke"]
@ -26,6 +28,18 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_s75vl")
autoplay = true
stream_paused = true
bus = &"game_sfx"
script = ExtResource("4_sv27p")
mode = "场景背景音"
"自动开始" = null
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
texture = ExtResource("3_t0s64") texture = ExtResource("3_t0s64")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=25 format=3 uid="uid://ce2vyyg2reg52"] [gd_scene load_steps=26 format=3 uid="uid://ce2vyyg2reg52"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_judx3"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_judx3"]
[ext_resource type="Script" uid="uid://hbbgymjs5xte" path="res://scene/ground/scene/c02/s08_animation.gd" id="2_m4uw8"] [ext_resource type="Script" uid="uid://hbbgymjs5xte" path="res://scene/ground/scene/c02/s08_animation.gd" id="2_m4uw8"]
@ -6,6 +6,7 @@
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="3_t3h08"] [ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="3_t3h08"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_1ws4i"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_1ws4i"]
[ext_resource type="Texture2D" uid="uid://vqyhgyka3sfo" path="res://asset/art/scene/c02/s08_瞎子卧室/瞎子卧室前景.png" id="4_gx8oy"] [ext_resource type="Texture2D" uid="uid://vqyhgyka3sfo" path="res://asset/art/scene/c02/s08_瞎子卧室/瞎子卧室前景.png" id="4_gx8oy"]
[ext_resource type="AudioStream" uid="uid://dthm5gd1sc16" path="res://asset/audio/sfx/环境音/第一章/房间内部场景2.wav" id="4_vjjde"]
[ext_resource type="Texture2D" uid="uid://b5pwb4fm46sad" path="res://asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张.png" id="5_f6mma"] [ext_resource type="Texture2D" uid="uid://b5pwb4fm46sad" path="res://asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张.png" id="5_f6mma"]
[ext_resource type="Texture2D" uid="uid://7ay1ttob8qwm" path="res://asset/art/scene/c02/s08_瞎子卧室/e_床板.png" id="5_vjjde"] [ext_resource type="Texture2D" uid="uid://7ay1ttob8qwm" path="res://asset/art/scene/c02/s08_瞎子卧室/e_床板.png" id="5_vjjde"]
[ext_resource type="SpriteFrames" uid="uid://3nas025c2c5u" path="res://asset/art/gif/c02_杂项/frames.tres" id="7_j6ltr"] [ext_resource type="SpriteFrames" uid="uid://3nas025c2c5u" path="res://asset/art/gif/c02_杂项/frames.tres" id="7_j6ltr"]
@ -105,11 +106,22 @@ autoplay = true
bus = &"game_sfx" bus = &"game_sfx"
script = ExtResource("3_t3h08") script = ExtResource("3_t3h08")
mode = "场景背景音" mode = "场景背景音"
"自动开始" = true "自动开始" = null
"循环播放" = true "循环播放" = true
"感应玩家操作" = true "感应玩家操作" = true
metadata/_custom_type_script = "uid://rq6w1vuhuq1m" metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="1"]
stream = ExtResource("4_vjjde")
autoplay = true
bus = &"game_sfx"
script = ExtResource("3_t3h08")
mode = "场景背景音"
"自动开始" = null
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
texture = ExtResource("3_iares") texture = ExtResource("3_iares")

View File

@ -29,20 +29,27 @@ func _on_ground_ready() -> void:
var half_length = rope_length / 2.0 var half_length = rope_length / 2.0
rope_range.x = rope.global_position.x - half_length rope_range.x = rope.global_position.x - half_length
rope_range.y = rope.global_position.x + half_length rope_range.y = rope.global_position.x + half_length
await get_tree().create_timer(0.1).timeout
var player= %MainPlayer var player= %MainPlayer
# 玩家位置更新时,更新麻绳隆起 # 玩家位置更新时,更新麻绳隆起
player.position_updated.connect(_on_player_position_updated) player.position_updated.connect(_on_player_position_updated)
# 首次更新 # 首次更新
_on_player_position_updated(player.global_position) _on_player_position_updated.call_deferred(player.global_position)
var rope: MeshInstance2D var rope: MeshInstance2D
var rope_range := Vector2(0, 0) var rope_range := Vector2(0, 0)
var rope_length := 0.0 var rope_length := 0.0
var bgm_switched := false
func _on_player_position_updated(global_pos: Vector2) -> void: func _on_player_position_updated(global_pos: Vector2) -> void:
# 切换 bgm
if global_pos.x < 2300 and not bgm_switched:
print("切换 bgm")
bgm_switched = true
$"背景音效_通道".easing_kill()
$"背景音效_红色".play()
var x = global_pos.x var x = global_pos.x
if x < rope_range.x or x > rope_range.y: if x < rope_range.x or x > rope_range.y:
return return

View File

@ -1,11 +1,14 @@
[gd_scene load_steps=35 format=4 uid="uid://ryups1dnwdto"] [gd_scene load_steps=38 format=4 uid="uid://ryups1dnwdto"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_o0m5w"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_o0m5w"]
[ext_resource type="Script" uid="uid://beqnywn1dlnax" path="res://scene/ground/scene/c02/s09_animation.gd" id="2_34a6f"] [ext_resource type="Script" uid="uid://beqnywn1dlnax" path="res://scene/ground/scene/c02/s09_animation.gd" id="2_34a6f"]
[ext_resource type="Texture2D" uid="uid://rfhf4usybjdc" path="res://asset/art/scene/c02/s09_裂缝/背景.png" id="3_6xql4"] [ext_resource type="Texture2D" uid="uid://rfhf4usybjdc" path="res://asset/art/scene/c02/s09_裂缝/背景.png" id="3_6xql4"]
[ext_resource type="AudioStream" uid="uid://lel6wpfs2424" path="res://asset/audio/sfx/环境音/第一章/09_裂缝空间_地下通道.wav" id="3_qjenp"]
[ext_resource type="Texture2D" uid="uid://cbvf6bfjprl8t" path="res://asset/art/scene/c02/s09_裂缝/大麻绳.png" id="4_34a6f"] [ext_resource type="Texture2D" uid="uid://cbvf6bfjprl8t" path="res://asset/art/scene/c02/s09_裂缝/大麻绳.png" id="4_34a6f"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_qjenp"]
[ext_resource type="Shader" uid="uid://dyc16avypkkct" path="res://scene/ground/script/c02/s09_裂缝麻绳.gdshader" id="5_0fmdd"] [ext_resource type="Shader" uid="uid://dyc16avypkkct" path="res://scene/ground/script/c02/s09_裂缝麻绳.gdshader" id="5_0fmdd"]
[ext_resource type="Texture2D" uid="uid://ddcburr57lb75" path="res://asset/art/scene/c02/旧版/s12_1014诡异版/bg_衔接阴影.png" id="5_5ow41"] [ext_resource type="Texture2D" uid="uid://ddcburr57lb75" path="res://asset/art/scene/c02/旧版/s12_1014诡异版/bg_衔接阴影.png" id="5_5ow41"]
[ext_resource type="AudioStream" uid="uid://docu0vw8pwjow" path="res://asset/audio/sfx/环境音/第一章/09_裂缝空间_红色地道.wav" id="5_husb8"]
[ext_resource type="SpriteFrames" uid="uid://ckpe1xevbgr6h" path="res://asset/art/gif/c02_裂缝过道/frames.tres" id="5_p4f1j"] [ext_resource type="SpriteFrames" uid="uid://ckpe1xevbgr6h" path="res://asset/art/gif/c02_裂缝过道/frames.tres" id="5_p4f1j"]
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="6_6xql4"] [ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="6_6xql4"]
[ext_resource type="Texture2D" uid="uid://dnkqaiugxsegs" path="res://asset/art/scene/c02/s09_裂缝/黑手.png" id="6_71bf1"] [ext_resource type="Texture2D" uid="uid://dnkqaiugxsegs" path="res://asset/art/scene/c02/s09_裂缝/黑手.png" id="6_71bf1"]
@ -141,6 +144,27 @@ footstep_type = "crawling"
script = ExtResource("2_34a6f") script = ExtResource("2_34a6f")
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效_通道" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_qjenp")
autoplay = true
bus = &"game_sfx"
script = ExtResource("4_qjenp")
mode = "场景背景音"
"自动开始" = true
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="背景音效_红色" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="1"]
stream = ExtResource("5_husb8")
bus = &"game_sfx"
script = ExtResource("4_qjenp")
mode = "场景背景音"
"自动开始" = false
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
light_mask = 33 light_mask = 33
texture = ExtResource("3_6xql4") texture = ExtResource("3_6xql4")

View File

@ -1,8 +1,11 @@
[gd_scene load_steps=23 format=3 uid="uid://dny21yhtuteap"] [gd_scene load_steps=26 format=3 uid="uid://dny21yhtuteap"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_w7j0m"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_w7j0m"]
[ext_resource type="Script" uid="uid://dkkey7qillk15" path="res://scene/ground/scene/c02/s10_animation.gd" id="2_egtqi"] [ext_resource type="Script" uid="uid://dkkey7qillk15" path="res://scene/ground/scene/c02/s10_animation.gd" id="2_egtqi"]
[ext_resource type="AudioStream" uid="uid://6gttowdwmado" path="res://asset/audio/sfx/环境音/第一章/房间内部场景1.wav" id="3_chbaa"]
[ext_resource type="AudioStream" uid="uid://dthm5gd1sc16" path="res://asset/audio/sfx/环境音/第一章/房间内部场景2.wav" id="3_kqj5r"]
[ext_resource type="Texture2D" uid="uid://molvyfyy63ik" path="res://asset/art/scene/c02/s10_空房间/bg_空房间.png" id="3_ox8et"] [ext_resource type="Texture2D" uid="uid://molvyfyy63ik" path="res://asset/art/scene/c02/s10_空房间/bg_空房间.png" id="3_ox8et"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/general/sfx.gd" id="4_chbaa"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_pde4i"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_pde4i"]
[ext_resource type="PackedScene" uid="uid://cw3q5pvciumil" path="res://scene/entity/interactable.tscn" id="5_ylhfc"] [ext_resource type="PackedScene" uid="uid://cw3q5pvciumil" path="res://scene/entity/interactable.tscn" id="5_ylhfc"]
[ext_resource type="PackedScene" uid="uid://dsa6frlw6e6gg" path="res://scene/entity/pickable.tscn" id="6_27dvh"] [ext_resource type="PackedScene" uid="uid://dsa6frlw6e6gg" path="res://scene/entity/pickable.tscn" id="6_27dvh"]
@ -81,6 +84,20 @@ data = {
} }
oneshot_animation = "" oneshot_animation = ""
[node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
stream = ExtResource("3_chbaa")
autoplay = true
bus = &"game_sfx"
script = ExtResource("4_chbaa")
mode = "场景背景音"
audio_dict = Dictionary[String, AudioStream]({
"default": ExtResource("3_kqj5r")
})
"自动开始" = true
"循环播放" = true
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="1"] [node name="BGSprite2D" parent="Ground" index="1"]
position = Vector2(26, 0) position = Vector2(26, 0)
texture = ExtResource("3_ox8et") texture = ExtResource("3_ox8et")