理发店演出优化

This commit is contained in:
cakipaul 2025-07-17 16:48:40 +08:00
parent 72f00c821f
commit 644d8bcc39
10 changed files with 78 additions and 14 deletions

View File

@ -240,3 +240,4 @@ c03_s02_小蝉寻人启事,?小蝉寻人启事,,,,,
c03_s03_获得剪刀纸舌头,?✂️纸人,,,,, c03_s03_获得剪刀纸舌头,?✂️纸人,,,,,
c03_s03_桌子,?桌子,,,,, c03_s03_桌子,?桌子,,,,,
c03_s03_洗头盆,?洗头盆,,,,, c03_s03_洗头盆,?洗头盆,,,,,
c03_s03_演出结束,?演出结束,刚刚他们?,,,,,

1 keys zh_CN _character _notes _tags zh_SH en
240 c03_s03_获得剪刀纸舌头 ?✂️纸人
241 c03_s03_桌子 ?桌子
242 c03_s03_洗头盆 ?洗头盆
243 c03_s03_演出结束 ?演出结束,刚刚他们?

View File

@ -324,6 +324,7 @@
?✂️纸人 [ID:c03_s03_获得剪刀纸舌头] ?✂️纸人 [ID:c03_s03_获得剪刀纸舌头]
?桌子 [ID:c03_s03_桌子] ?桌子 [ID:c03_s03_桌子]
?洗头盆 [ID:c03_s03_洗头盆] ?洗头盆 [ID:c03_s03_洗头盆]
?演出结束,刚刚他们? [ID:]
# s04 李癞房间 # s04 李癞房间
# s05 肉铺 # s05 肉铺

View File

@ -479,3 +479,31 @@ func black_transition(half_duration := 0.7, wait_time := 0.5) -> void:
await get_tree().process_frame await get_tree().process_frame
get_tree().current_scene.add_child(scene) get_tree().current_scene.add_child(scene)
scene.run_effect(half_duration, wait_time) scene.run_effect(half_duration, wait_time)
# dizzy
var dizzy_scene = preload("uid://decfqoe5v0y6n")
func dizzy_effect(duration := 3.5, intensity := 1.5, play_animation :=true, play_sfx := true) -> void:
if GlobalConfig.DEBUG:
print("Dizzy effect started with duration:", duration, " and intensity:", intensity)
var dizzy = dizzy_scene.instantiate()
dizzy.name = "DizzyEffect"
get_tree().current_scene.add_child(dizzy)
dizzy.dizzy(duration, intensity)
if play_sfx:
var dizzy_sfx = preload("uid://b8sbtn3l37uh") #红屏
AudioManager.play_sfx(dizzy_sfx)
if play_animation:
# 4.4s action
await lock_player(0, 17)
unlock_player()
if duration > 4.4:
# dizzy duration - player action
await Util.wait(maxf(duration, 0.001)) # 设置最小等待
else:
# dizzy duration
await Util.wait(duration + 0.1) # 等待效果结束
dizzy.queue_free() # 清理节点
print("Dizzy effect finished and node freed.")

View File

@ -6,7 +6,6 @@
[ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_72ixx"] [ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_72ixx"]
[node name="Balloon" type="CanvasLayer" groups=["balloon"]] [node name="Balloon" type="CanvasLayer" groups=["balloon"]]
layer = 12
script = ExtResource("1_36de5") script = ExtResource("1_36de5")
metadata/_edit_vertical_guides_ = [-78.0] metadata/_edit_vertical_guides_ = [-78.0]
metadata/_edit_horizontal_guides_ = [276.0] metadata/_edit_horizontal_guides_ = [276.0]

View File

@ -10,14 +10,13 @@ func _ready() -> void:
var tween: Tween var tween: Tween
# duration 最短 1.5s
func dizzy(duration := 3.5, intensity := 1.5) -> void: func dizzy(duration := 3.5, intensity := 1.5) -> void:
if duration < 0.6:
return
if tween and tween.is_valid(): if tween and tween.is_valid():
tween.kill() tween.kill()
show() show()
tween = create_tween() tween = create_tween()
tween.tween_property(rect.material, "shader_parameter/intensity", intensity, 0.3) tween.tween_property(rect.material, "shader_parameter/intensity", intensity, 0.5)
tween.tween_interval(duration - 0.6) tween.tween_interval(maxf(duration - 1.5, 0.01))
tween.tween_property(rect.material, "shader_parameter/intensity", 0.0, 0.3) tween.tween_property(rect.material, "shader_parameter/intensity", 0.0, 1.0)
tween.finished.connect(hide) tween.finished.connect(hide)

View File

@ -16,7 +16,7 @@ layer = 0
visible = false visible = false
script = ExtResource("1_t0l4c") script = ExtResource("1_t0l4c")
[node name="TextureRect" type="TextureRect" parent="."] [node name="Effect" type="TextureRect" parent="."]
visible = false visible = false
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=21 format=3 uid="uid://bsqt2c061fmin"] [gd_scene load_steps=22 format=3 uid="uid://bsqt2c061fmin"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_40yjl"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_40yjl"]
[ext_resource type="Script" uid="uid://cim5bqm2nayls" path="res://scene/ground/scene/c03/s03_瞎子理发店.gd" id="2_irgvj"] [ext_resource type="Script" uid="uid://cim5bqm2nayls" path="res://scene/ground/scene/c03/s03_瞎子理发店.gd" id="2_irgvj"]
@ -18,6 +18,7 @@
[ext_resource type="SpriteFrames" uid="uid://b0icyhxpj16tv" path="res://asset/art/gif/c02_谢幕演出/c02_谢幕演出_frames.tres" id="11_6ryqd"] [ext_resource type="SpriteFrames" uid="uid://b0icyhxpj16tv" path="res://asset/art/gif/c02_谢幕演出/c02_谢幕演出_frames.tres" id="11_6ryqd"]
[ext_resource type="Script" uid="uid://cphfob11f7atx" path="res://addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd" id="12_15t2b"] [ext_resource type="Script" uid="uid://cphfob11f7atx" path="res://addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd" id="12_15t2b"]
[ext_resource type="SpriteFrames" uid="uid://cmvr3lbwe3h7p" path="res://asset/art/gif/c03_特写与游戏动画/c03_特写与游戏动画_frames.tres" id="14_pkhgt"] [ext_resource type="SpriteFrames" uid="uid://cmvr3lbwe3h7p" path="res://asset/art/gif/c03_特写与游戏动画/c03_特写与游戏动画_frames.tres" id="14_pkhgt"]
[ext_resource type="PackedScene" uid="uid://0sofmhrl358m" path="res://scene/entity/npc.tscn" id="15_pkhgt"]
[ext_resource type="Texture2D" uid="uid://cylsq5cvhlp18" path="res://asset/art/tool/point_light.png" id="17_fq03x"] [ext_resource type="Texture2D" uid="uid://cylsq5cvhlp18" path="res://asset/art/tool/point_light.png" id="17_fq03x"]
[sub_resource type="AnimationLibrary" id="AnimationLibrary_k01ve"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_k01ve"]
@ -92,13 +93,20 @@ position = Vector2(343, 43)
sprite_frames = ExtResource("14_pkhgt") sprite_frames = ExtResource("14_pkhgt")
animation = &"癞子背坐呼吸" animation = &"癞子背坐呼吸"
script = ExtResource("12_15t2b") script = ExtResource("12_15t2b")
autostart = false
action_configs = Array[Dictionary]([{ action_configs = Array[Dictionary]([{
"animation_intro": "癞子背坐呼吸", "animation_intro": "癞子背坐呼吸",
&"animation_next": "癞子背对侧头呼吸", &"animation_next": "癞子背对侧头呼吸",
"animation_wait_time": 0.0,
&"intro_loop": 4 &"intro_loop": 4
}]) }])
metadata/_custom_type_script = "uid://cphfob11f7atx" metadata/_custom_type_script = "uid://cphfob11f7atx"
[node name="Npc癞子" parent="Ground/DeployLayer/Event2D癞子剪辫子/Pro癞子" instance=ExtResource("15_pkhgt")]
position = Vector2(0, 28)
enabled = false
hook_character_name = "癞子"
[node name="Pro瞎子" type="AnimatedSprite2D" parent="Ground/DeployLayer/Event2D癞子剪辫子"] [node name="Pro瞎子" type="AnimatedSprite2D" parent="Ground/DeployLayer/Event2D癞子剪辫子"]
position = Vector2(377, 48) position = Vector2(377, 48)
sprite_frames = ExtResource("11_6ryqd") sprite_frames = ExtResource("11_6ryqd")
@ -115,6 +123,11 @@ move_configs = Array[Dictionary]([{
debug_mov_animation = "方瞎子走路-右" debug_mov_animation = "方瞎子走路-右"
metadata/_custom_type_script = "uid://cphfob11f7atx" metadata/_custom_type_script = "uid://cphfob11f7atx"
[node name="Npc瞎子" parent="Ground/DeployLayer/Event2D癞子剪辫子/Pro瞎子" instance=ExtResource("15_pkhgt")]
position = Vector2(5, 0)
enabled = false
hook_character_name = "瞎子"
[node name="Pro陆仁" type="AnimatedSprite2D" parent="Ground/DeployLayer/Event2D癞子剪辫子"] [node name="Pro陆仁" type="AnimatedSprite2D" parent="Ground/DeployLayer/Event2D癞子剪辫子"]
position = Vector2(297, 37) position = Vector2(297, 37)
sprite_frames = ExtResource("14_pkhgt") sprite_frames = ExtResource("14_pkhgt")
@ -123,6 +136,16 @@ autoplay = "父亲抱小孩"
script = ExtResource("12_15t2b") script = ExtResource("12_15t2b")
metadata/_custom_type_script = "uid://cphfob11f7atx" metadata/_custom_type_script = "uid://cphfob11f7atx"
[node name="Npc陆仁" parent="Ground/DeployLayer/Event2D癞子剪辫子/Pro陆仁" instance=ExtResource("15_pkhgt")]
position = Vector2(-5, 8)
enabled = false
hook_character_name = "陆仁"
[node name="Npc小小小蝶" parent="Ground/DeployLayer/Event2D癞子剪辫子/Pro陆仁" instance=ExtResource("15_pkhgt")]
position = Vector2(12, 14)
enabled = false
hook_character_name = "小小蝶"
[node name="Closeup瞎子糕点" parent="Ground/DeployLayer/Event2D癞子剪辫子" instance=ExtResource("5_d40x1")] [node name="Closeup瞎子糕点" parent="Ground/DeployLayer/Event2D癞子剪辫子" instance=ExtResource("5_d40x1")]
unique_name_in_owner = true unique_name_in_owner = true
position = Vector2(357, -213) position = Vector2(357, -213)

View File

@ -12,7 +12,15 @@ func _ready() -> void:
if not presentation_finished: if not presentation_finished:
await $PPTHelper.presentation_finished await $PPTHelper.presentation_finished
EventManager.set_stage("c03_s03_laizi_braid", 2) EventManager.set_stage("c03_s03_laizi_braid", 2)
# 过渡到玩家画面
SceneManager.black_transition(0.5, 0.5)
Util.timer(1.8, func():
SceneManager.dizzy_effect(3.0)
await Util.wait(3.3)
await SceneManager.pop_os_with_str("c03_s03_演出结束")
SceneManager.unlock_player() SceneManager.unlock_player()
)
await Util.wait(0.6)
exit.emit(true) exit.emit(true)
var presentation_finished = false var presentation_finished = false

View File

@ -28,10 +28,10 @@ ease_in_type = "inout"
ease_in_trans_type = "cubic" ease_in_trans_type = "cubic"
ease_in_duration = 0.5 ease_in_duration = 0.5
ease_out_to_next = true ease_out_to_next = true
ease_out_wait_time = 1.0 ease_out_wait_time = 0.8
ease_out_type = "inout" ease_out_type = "inout"
ease_out_trans_type = "cubic" ease_out_trans_type = "cubic"
ease_out_duration = 0.3 ease_out_duration = 0.7
[sub_resource type="Resource" id="Resource_va0t0"] [sub_resource type="Resource" id="Resource_va0t0"]
script = ExtResource("8_b3tds") script = ExtResource("8_b3tds")
@ -43,7 +43,7 @@ ease_out_to_next = true
ease_out_wait_time = 1.5 ease_out_wait_time = 1.5
ease_out_type = "inout" ease_out_type = "inout"
ease_out_trans_type = "cubic" ease_out_trans_type = "cubic"
ease_out_duration = 0.2 ease_out_duration = 0.0
[sub_resource type="Resource" id="Resource_svuqh"] [sub_resource type="Resource" id="Resource_svuqh"]
script = ExtResource("8_b3tds") script = ExtResource("8_b3tds")

View File

@ -31,7 +31,11 @@ func start_show() -> void:
SceneManager.lock_player() SceneManager.lock_player()
# 隐藏玩家 # 隐藏玩家
SceneManager.get_player().visible = false SceneManager.get_player().visible = false
SceneManager.get_camera_marker().force_offset.x = 50.0 $"Pro癞子".play("癞子背坐呼吸")
# 镜头靠近
var camera = SceneManager.get_camera_marker()
camera.focus_node($"Pro癞子")
camera.tween_zoom(1.2, 2.0)
# TODO # TODO
SceneManager.pop_debug_dialog_info("美术&音效", "剪辫子演出") SceneManager.pop_debug_dialog_info("美术&音效", "剪辫子演出")
await Util.wait(2.5) await Util.wait(2.5)
@ -40,6 +44,7 @@ func start_show() -> void:
$"Pro瞎子".play("方瞎子走路-右") $"Pro瞎子".play("方瞎子走路-右")
await Util.wait(2.0) await Util.wait(2.0)
$"Closeup瞎子糕点".display() $"Closeup瞎子糕点".display()
SceneManager.get_camera_marker().force_offset.x = 0.0 # 重置镜头
SceneManager.focus_player_and_reset_zoom()
SceneManager.get_player().visible = true SceneManager.get_player().visible = true
SceneManager.unlock_player() SceneManager.unlock_player()