牵手演出自动化;增加牵手bgm;书店诡异版鬼差铺垫

This commit is contained in:
cakipaul 2025-07-11 16:04:35 +08:00
parent dbc577733d
commit 7e96461648
10 changed files with 129 additions and 32 deletions

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cbjmphggi6gsr"
path="res://.godot/imported/点火后牵手小蝉演出.wav-f79deda59b7b72dc5e72c2f1e4982d1b.sample"
[deps]
source_file="res://asset/audio/sfx/bgm/第一章/点火后牵手小蝉演出.wav"
dest_files=["res://.godot/imported/点火后牵手小蝉演出.wav-f79deda59b7b72dc5e72c2f1e4982d1b.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

View File

@ -10,7 +10,7 @@ func _ready() -> void:
if not display_sprite:
ghost_sprite.hide()
else:
ghost_sprite.modulate.a = 0.5
ghost_sprite.self_modulate.a = 0.3
tween_modulate()
@ -21,12 +21,12 @@ func tween_modulate() -> void:
if hiding:
return
var tween = create_tween()
var rand_mod = randf_range(0.4, 0.8)
tween.tween_property(ghost_sprite, "modulate:a", rand_mod, 0.5)
var rand_mod = randf_range(0.25, 0.45)
tween.tween_property(ghost_sprite, "self_modulate:a", rand_mod, 0.5)
tween.tween_callback(tween_modulate)
func esae_hide_ghost() -> void:
hiding = true
var tween = create_tween()
tween.tween_property(ghost_sprite, "modulate:a", 0.0, 1.0)
tween.tween_property(ghost_sprite, "self_modulate:a", 0.0, 1.0)

View File

@ -92,6 +92,7 @@ func _ready() -> void:
var shape = area2d.get_node("CollisionShape2D").shape
shape.size.x = collision_width_and_x.x
area2d.position.x = collision_width_and_x.y
visibility_changed.connect(_visibility_changed)
if Engine.is_editor_hint():
var animation_player = _get_animation_player()
# 更新 hook_animation 的可选项
@ -112,7 +113,6 @@ func _ready() -> void:
sign_mark.interacted.connect(_interacted)
area2d.body_entered.connect(_entered)
area2d.area_entered.connect(_area_entered)
visibility_changed.connect(_visibility_changed)
_check_sign_status()

View File

@ -15,7 +15,8 @@ signal toggle_active(activated: bool)
set(val):
if enabled != val:
enabled = val
align_activation()
if is_node_ready():
align_activation()
@export var display_sign := true:
set(val):
if display_sign != val:
@ -121,6 +122,8 @@ func _on_body_exited(_body: Node2D) -> void:
# 四种参数变化时调用 align: 1 enable 2 hold 3 visibility 4 touching
func align_activation() -> bool:
if Engine.is_editor_hint():
# editor 中直接显示
sprite2d.modulate.a = 1.0
return activated
var ideal_status := enabled and player_touching and not is_hold() and is_visible_in_tree()
if activated != ideal_status:

View File

@ -51,6 +51,27 @@ func _on_ground_ready() -> void:
# create_tween().tween_property($"../DeployLayer/Fog", "modulate:a", 1.0, 10.0)
$"../DeployLayer/飘动的寻人启事".visible = true
# 鬼差消失
var ambush_ghost_diasppear = $"../DeployLayer/Ambush鬼差消失" as Ambush2D
var diasppearing_ghost_sprite = $"../DeployLayer/门口鬼差" as AnimatedSprite2D
if ambush_ghost_diasppear.played:
diasppearing_ghost_sprite.hide()
$"../DeployLayer/花朵黑影".energy = 0.8
else:
ambush_ghost_diasppear.triggered.connect(_on_triggered_ghost_disappear, CONNECT_ONE_SHOT)
func _on_triggered_ghost_disappear() -> void:
var dark_light = $"../DeployLayer/花朵黑影"
var diasppearing_ghost_sprite = $"../DeployLayer/门口鬼差" as AnimatedSprite2D
$"Sfx鬼差出场".play(2.2)
flower.focus_node = diasppearing_ghost_sprite
var tween = create_tween()
tween.tween_property(diasppearing_ghost_sprite, "modulate:a", 0.0, 1.0)
tween.parallel().tween_property(dark_light, "energy", 0.8, 1.0)
# 从中间只播放一下铃声
tween.tween_callback(func(): flower.focus_node = ghost)
func intro() -> void:
begger.play("杂戏团夜晚_小孩举碗呼吸")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=35 format=3 uid="uid://bol5hl68pbpgq"]
[gd_scene load_steps=36 format=3 uid="uid://bol5hl68pbpgq"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_llw14"]
[ext_resource type="Script" uid="uid://bh4h0e158t1oj" path="res://scene/ground/scene/c01/s12_书店外_诡异版.gd" id="2_krdvw"]
@ -28,6 +28,7 @@
[ext_resource type="Shader" uid="uid://bcfnbll451i2r" path="res://asset/shader/fog.gdshader" id="16_guu7t"]
[ext_resource type="Texture2D" uid="uid://b7gyapghy3tsy" path="res://asset/art/neutral_point_light.png" id="17_nta2f"]
[ext_resource type="Texture2D" uid="uid://dol25yn3fixim" path="res://asset/art/fog_mask.png" id="19_7jjl5"]
[ext_resource type="SpriteFrames" uid="uid://c80mjx2sll6mg" path="res://asset/art/gif/c01_鬼差/c01_鬼差_frames.tres" id="26_i56dj"]
[sub_resource type="AnimationLibrary" id="AnimationLibrary_38lx7"]
@ -117,23 +118,43 @@ target_scene = "c01_s09"
position = Vector2(1, 0)
target_scene = "c01_s08"
[node name="AmbushIntro" parent="Ground/DeployLayer" index="2" instance=ExtResource("9_nqlku")]
on_ground_ready = true
hook_method = "intro"
[node name="portal_2" parent="Ground/DeployLayer" index="3" instance=ExtResource("4_o7hfk")]
position = Vector2(995, 28)
[node name="portal_2" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_o7hfk")]
position = Vector2(998, 39)
debug_note = "c01_s12 的 2 号门通往书店"
portal_name = "2"
target_scene = "c01_s08"
target_portal = "left"
status = "opened"
[node name="背景" type="Sprite2D" parent="Ground/DeployLayer" index="4"]
[node name="AmbushIntro" parent="Ground/DeployLayer" index="3" instance=ExtResource("9_nqlku")]
position = Vector2(937, -316)
on_ground_ready = true
hook_method = "intro"
[node name="Ambush鬼差消失" parent="Ground/DeployLayer" index="4" instance=ExtResource("9_nqlku")]
position = Vector2(1083, 72)
[node name="门口鬼差" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="5"]
modulate = Color(1, 1, 1, 0.509804)
position = Vector2(1238, -4)
sprite_frames = ExtResource("26_i56dj")
animation = &"鬼差飘移动画"
autoplay = "鬼差飘移动画"
flip_h = true
[node name="花朵黑影" type="PointLight2D" parent="Ground/DeployLayer" index="6"]
position = Vector2(1235, 63)
color = Color(0.894118, 0.937255, 0.658824, 1)
energy = 0.0
blend_mode = 1
range_item_cull_mask = 2
texture = ExtResource("17_nta2f")
[node name="背景" type="Sprite2D" parent="Ground/DeployLayer" index="7"]
position = Vector2(1786, 5)
texture = ExtResource("4_c1x3p")
[node name="自动枯萎的花朵" parent="Ground/DeployLayer" index="5" node_paths=PackedStringArray("focus_node") instance=ExtResource("7_aq8vg")]
[node name="自动枯萎的花朵" parent="Ground/DeployLayer" index="8" node_paths=PackedStringArray("focus_node") instance=ExtResource("7_aq8vg")]
position = Vector2(-9, 87)
focus_node = NodePath("../Ghost")
total_num = 350
@ -146,7 +167,7 @@ action_area = Vector2(3100, 40)
move_speed = 100.0
scatter_on_start = true
[node name="Ghost" parent="Ground/DeployLayer" index="6" instance=ExtResource("8_gk0gq")]
[node name="Ghost" parent="Ground/DeployLayer" index="9" instance=ExtResource("8_gk0gq")]
visible = false
z_index = 10
position = Vector2(1127, 28)
@ -162,11 +183,11 @@ max_distance = 1500.0
bus = &"game_sfx"
script = ExtResource("10_1tspp")
[node name="飘动的寻人启事" parent="Ground/DeployLayer" index="7" instance=ExtResource("11_pwu7i")]
[node name="飘动的寻人启事" parent="Ground/DeployLayer" index="10" instance=ExtResource("11_pwu7i")]
z_index = 6
position = Vector2(1021, -48)
[node name="陆仁舞刀" parent="Ground/DeployLayer" index="8" instance=ExtResource("14_ct084")]
[node name="陆仁舞刀" parent="Ground/DeployLayer" index="11" instance=ExtResource("14_ct084")]
position = Vector2(1748, 6)
sprite_frames = ExtResource("13_lucm6")
animation = &"陆仁擦刀"
@ -178,7 +199,7 @@ action_configs = Array[Dictionary]([{
"intro_loop": 1
}])
[node name="其余小孩" parent="Ground/DeployLayer" index="9" instance=ExtResource("14_ct084")]
[node name="其余小孩" parent="Ground/DeployLayer" index="12" instance=ExtResource("14_ct084")]
position = Vector2(1911, 12)
sprite_frames = ExtResource("14_7jjl5")
animation = &"夜晚其余小孩杂耍"
@ -191,7 +212,7 @@ action_configs = Array[Dictionary]([{
"intro_loop": 1
}])
[node name="举腿小孩" parent="Ground/DeployLayer" index="10" instance=ExtResource("14_ct084")]
[node name="举腿小孩" parent="Ground/DeployLayer" index="13" instance=ExtResource("14_ct084")]
position = Vector2(1822, 6)
sprite_frames = ExtResource("14_7jjl5")
animation = &"夜晚举腿小孩杂耍"
@ -203,7 +224,7 @@ action_configs = Array[Dictionary]([{
"intro_loop": 1
}])
[node name="举碗小孩" parent="Ground/DeployLayer" index="11" instance=ExtResource("14_ct084")]
[node name="举碗小孩" parent="Ground/DeployLayer" index="14" instance=ExtResource("14_ct084")]
position = Vector2(1792, 9)
sprite_frames = ExtResource("13_lucm6")
animation = &"杂戏团夜晚_小孩举碗呼吸"
@ -232,7 +253,7 @@ enabled = false
disable_prop_after_interacted = true
prop_key = "prop_银元"
[node name="Fog" parent="Ground/DeployLayer" index="12" instance=ExtResource("15_pvvjq")]
[node name="Fog" parent="Ground/DeployLayer" index="15" instance=ExtResource("15_pvvjq")]
z_index = 10
material = SubResource("ShaderMaterial_7jjl5")
position = Vector2(3131, -50)

View File

@ -118,7 +118,7 @@ packed_scene = ExtResource("11_jg8g0")
first_interact_os_key = "c02_海报_剪辫子侦探"
[node name="青岛啤酒" parent="Ground/DeployLayer" index="7" instance=ExtResource("12_0fckv")]
position = Vector2(253, -31)
position = Vector2(255, -31)
enabled = false
texture_cover = ExtResource("16_vqhm5")
content_key = "c02_青岛啤酒"

View File

@ -73,9 +73,13 @@ func _on_ground_ready() -> void:
$"../DeployLayer/Closeup井".exit.connect(func(_arg): madman_npc.visible = true)
else:
madman_npc.visible = true
madman_npc.talk_finished.connect(func():
# 2 号为井边记忆
ArchiveManager.unlock_memory(2)
(
madman_npc
. talk_finished
. connect(
func(): ArchiveManager.unlock_memory(2)
# 2 号为井边记忆
)
)
if ArchiveManager.get_global_value(&"c02_show_grounded_coins"):
@ -224,13 +228,15 @@ func _setup_bully_or_burning(reenter_scene := false):
GlobalFunctor.c02_fire_count_down_try_start()
else:
bully_layer.visible = false
burning_layer.visible = true
$VibeSfx氛围.switch_to("c02_火灾")
$"../DeployLayer/霸凌/f1/Sfx2D霸凌童谣".easing_kill()
bully_layer.get_node("Ambush点火游戏阻挡右移").enabled = false
bully_layer.get_node("wall/CollisionShape2D").disabled = true
burning_layer.visible = true
burning_layer.get_node("Ambush等待的小蝉").enabled = true
burning_layer.get_node("Ambush等待的小蝉/SignSnapper").arrived.connect(run_away)
burning_layer.get_node("Ambush等待的小蝉/SignSnapper").arrived.connect(
run_away, CONNECT_ONE_SHOT
)
if not reenter_scene:
burning_layer.get_node("Pro小孩喊着火啦3").play()
burning_layer.get_node("Pro小孩喊着火啦2").play()
@ -292,7 +298,7 @@ func _on_counter_interacted():
if not ArchiveManager.get_global_value(&"c02_burning"):
GlobalFunctor.c02_fire_count_down_stop()
# 6: 低位点火
SceneManager.lock_player(0, 6)
SceneManager.player_action(6)
ArchiveManager.set_global_entry(&"c02_burning", true)
var new_bg = $"../DeployLayer/火灾背景"
var light = $"../DirectionalLight2D"
@ -309,11 +315,25 @@ func _on_counter_interacted():
_setup_bully_or_burning()
burning_layer.get_node("区域1").recheck()
burning_layer.get_node("地面1").recheck()
SceneManager.release_player()
# 直接进入自动牵手
_walk_to_xchan_and_run_away()
SceneManager.unlock_player()
func _walk_to_xchan_and_run_away() -> void:
SceneManager.lock_player()
# 从走向小蝉就开始放
$"Sfx牵手演出氛围音".global_play()
var player = SceneManager.get_player() as MainPlayer
var tween = player.walk_to_x(2128.0)
tween.tween_interval(1.0)
await tween.finished
run_away()
SceneManager.unlock_player()
func run_away():
SceneManager.lock_player()
SceneManager.pop_debug_dialog_info("美术", "牵手跑开")
var player = SceneManager.get_player() as MainPlayer
# 整体修改
@ -342,4 +362,5 @@ func run_away():
# 1: 牵手跑结束; 2: 谢幕演出结束
EventManager.set_stage(&"c02_burning_end_stage", 1)
camera.force_offset.x = 0.0
SceneManager.unlock_player()
SceneManager.get_ground_loader().transition_to_scene("c02_s06", "right")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=81 format=3 uid="uid://djc2uaefhmu7"]
[gd_scene load_steps=82 format=3 uid="uid://djc2uaefhmu7"]
[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_院子.gd" id="2_dt5aj"]
@ -21,6 +21,7 @@
[ext_resource type="Texture2D" uid="uid://b1tnkshmv7r3b" path="res://asset/art/scene/c02/门_贴图/院子房间3.png" id="8_crgo6"]
[ext_resource type="Texture2D" uid="uid://cjmsn0saowwbo" path="res://asset/art/scene/c02/s03_公寓一楼院子/小鞋子2特写.png" id="8_plfv5"]
[ext_resource type="PackedScene" uid="uid://cw3q5pvciumil" path="res://scene/entity/interactable.tscn" id="8_xt8j0"]
[ext_resource type="AudioStream" uid="uid://cbjmphggi6gsr" path="res://asset/audio/sfx/bgm/第一章/点火后牵手小蝉演出.wav" id="9_2b6vx"]
[ext_resource type="Texture2D" uid="uid://bgpf35bhrkl86" path="res://asset/art/scene/c02/s03_公寓一楼院子/铁门/打开 底层.png" id="9_liq0c"]
[ext_resource type="Texture2D" uid="uid://cvtbiefbffjd7" path="res://asset/art/scene/c02/门_贴图/1015房间.png" id="9_vddfx"]
[ext_resource type="Texture2D" uid="uid://diuh52qo2o6pa" path="res://asset/art/scene/c02/s03_公寓一楼院子/f_院子内墙上文字与柜子痕迹.png" id="10_3nako"]
@ -315,6 +316,12 @@ script = ExtResource("6_lq23y")
autoplay_group = &"氛围_不受欢迎的存在"
metadata/_custom_type_script = "uid://cpejxlfni6n52"
[node name="Sfx牵手演出氛围音" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="5"]
stream = ExtResource("9_2b6vx")
bus = &"game_sfx"
script = ExtResource("4_ygnci")
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="2"]
light_mask = 5
texture = ExtResource("3_sqv8l")
@ -957,7 +964,7 @@ move_configs = Array[Dictionary]([{
[node name="Ambush等待的小蝉" parent="Ground/DeployLayer/火灾" instance=ExtResource("25_iyaiw")]
position = Vector2(2142, 71)
sign_mark_offset = Vector2(13.57, -39.84)
sign_mark_offset = Vector2(13.57, -39.74)
enabled = false
trigger_mode = "interact"
one_shot = false