第二章绞肉机到结尾演出

This commit is contained in:
cakipaul 2025-07-29 15:41:00 +08:00
parent d3f4e57a98
commit b56d251f72
12 changed files with 79 additions and 44 deletions

View File

@ -189,8 +189,8 @@ func _physics_process(delta: float) -> void:
position.x += diff_x
# 检查是否切换 animation
if mov_x != 0.0 and mov_x_next_animation:
accumulated_mov_x += diff_x
if absf(accumulated_mov_x) >= absf(mov_x):
accumulated_mov_x += abs(diff_x)
if accumulated_mov_x >= absf(mov_x):
if GlobalConfig.DEBUG:
print(
"切换 animation:", mov_x_next_animation, " accumulated_mov_x=", accumulated_mov_x

View File

@ -298,16 +298,16 @@ animations = [{
"speed": 30.0
}, {
"frames": [{
"duration": 6.0,
"duration": 10.0,
"texture": ExtResource("29_cxlh3")
}, {
"duration": 6.0,
"duration": 10.0,
"texture": ExtResource("30_db33p")
}, {
"duration": 6.0,
"duration": 10.0,
"texture": ExtResource("31_siklq")
}, {
"duration": 6.0,
"duration": 10.0,
"texture": ExtResource("32_kkanu")
}],
"loop": true,

View File

@ -216,24 +216,24 @@
# 绞肉机黑屏转场 -> 手中弹珠
~ c03_绞肉机回忆小蝶和小婵1
小小蝶: 喏,侬的玻璃弹子,我帮侬拿回来了。
小蝉: 谢谢。
=> END
# 手中弹珠
~ c03_绞肉机回忆小蝶和小婵2
小小蝶: 你的弹子老好看的,我从来没看到过这种样子的。
小蝉: ...侬要欢喜,我就送给侬。
小蝉: 谢谢。
=> END
# 手中弹珠 -> 小蝉后背
~ c03_绞肉机回忆小蝶和小婵3
小小蝶: 谢谢侬,但是我(阿拉)爸不让我玩这个。
小小蝶: 他老是讲小姑娘要文一点,要有小姑娘的样子,其实...我玻璃弹子打的比他们好的多呢。
小小蝶: ...你(呐)爸爸呢?
小小蝶: 你的弹子老好看的,我从来没看到过这种样子的。
=> END
# 小蝉转身
~ c03_绞肉机回忆小蝶和小婵4
小蝉: ...侬要欢喜,我就送给侬。
小小蝶: 谢谢侬,但是我(阿拉)爸不让我玩这个。
小小蝶: 他老是讲小姑娘要文一点,要有小姑娘的样子,其实...我玻璃弹子打的比他们好的多呢。
小小蝶: ...你(呐)爸爸呢?
小蝉: 嗯...他蛮好的。
小小蝶: 他管侬管的紧哇,是不是经常会的讲‘都是为了侬好’这种闲话啊?
小蝉: 有时候(辰光)会的,他蛮吓人的。
@ -247,9 +247,13 @@
小蝉: 真好啊。
=> END
# 看向灰姑过程中的对白
# 爬墙过程就可以说
~ c03_绞肉机回忆小蝶和小婵6
小小蝶: 诶,我马上就要过生日了!侬想...咦,妈妈,侬哪能来了?
=> END
# 看向灰姑过程中的对白
~ c03_绞肉机回忆小蝶和小婵7
小小蝶: 那个,这是我刚刚认识的好朋友,她叫、她叫...
小蝉: 我叫方小蝉。
小蝉: 阿姨,你们是伐是要回起吃饭啦,我爸爸...等些阿要叫我回起了。

View File

@ -496,6 +496,14 @@ func black_transition(half_duration := 0.7, wait_time := 0.5) -> void:
scene.run_effect(half_duration, wait_time)
func white_transition(half_duration := 0.7, wait_time := 0.5) -> void:
var scene = transition_scene.instantiate()
scene.name = "Transition"
await get_tree().process_frame
get_tree().current_scene.add_child(scene)
scene.run_effect(half_duration, wait_time, Color.WHITE)
# dizzy
var dizzy_scene = preload("uid://decfqoe5v0y6n")

View File

@ -5,11 +5,12 @@ func _ready() -> void:
layer = GlobalConfig.CANVAS_LAYER_EFFECT
func run_effect(half_duration := 0.7, wait_time := 0.5):
func run_effect(half_duration := 0.7, wait_time := 0.5, color := Color.BLACK):
if not is_node_ready():
await ready
var rect = $ColorRect as ColorRect
var tween = create_tween()
rect.color = color
rect.modulate.a = 0
tween.tween_property(rect, "modulate:a", 1.0, half_duration)
tween.tween_interval(wait_time)

View File

@ -159,7 +159,7 @@ func toggle_mask(
func transition_to_scene(
scene_name: String, portal: String, wait_time := DEFAULT_TRANSITION_TIME
scene_name: String, portal: String, wait_time := DEFAULT_TRANSITION_TIME, color := Color.BLACK
) -> void:
if not GROUND_SCENE_PATH_DICT.has(scene_name):
print("Scene not found: " + scene_name)
@ -171,7 +171,7 @@ func transition_to_scene(
if not Engine.is_editor_hint():
_update_archive()
if wait_time > 0.0:
_transition_with_effect(scene_name, wait_time)
_transition_with_effect(scene_name, wait_time, color)
else:
_allow_ground_start = true
_do_transition.call_deferred(scene_name)
@ -188,13 +188,13 @@ func _pause_current_ground() -> void:
print("GroundLoader transition_to_scene: reenter lock status: ", ground.reenter_lock)
func _transition_with_effect(scene_name: String, wait_time: float) -> void:
func _transition_with_effect(scene_name: String, wait_time: float, color: Color) -> void:
# 转场效果,在 _load_ground_node 之前播放
var tween = toggle_mask(true, wait_time)
var tween = toggle_mask(true, wait_time, EASE_DURATION, color)
tween.tween_callback(_do_transition.call_deferred.bind(scene_name))
_allow_ground_start = false
# 等到 toggle_mask 结束,再重置 freeze 状态
toggle_mask(false, wait_time).tween_callback(func(): _allow_ground_start = true)
toggle_mask(false, wait_time, EASE_DURATION, color).tween_callback(func(): _allow_ground_start = true)
func _update_archive() -> void:

View File

@ -4,7 +4,7 @@ extends AnimationRoot
# 覆盖该方法
func _default_data() -> Dictionary:
return {}
return {"has_entered": false}
func _ready() -> void:
@ -36,6 +36,23 @@ func _on_ground_ready() -> void:
closeup符纸.show()
if interactable_body.interacted_times > 0:
body_sprite.frame = 3
_check_first_enter()
func _check_first_enter() -> void:
if not data["has_entered"]:
SceneManager.lock_player()
var player = SceneManager.get_player()
var portal_1_x = $"../DeployLayer/portal_1".global_position.x
player.global_position.x = portal_1_x
player.set_facing_direction(Vector2.LEFT)
# c02_吕萍_背靠呼吸
player.player_action(20, false)
await Util.wait(3.0)
# c02_吕萍_背靠起身
await player.player_action(19, true)
set_data("has_entered", true)
SceneManager.unlock_player()
func _on_body_interacted(success: bool) -> void:

View File

@ -139,7 +139,7 @@ metadata/_custom_type_script = "uid://0wjaho6qkg6s"
position = Vector2(614, 34)
[node name="portal_1" parent="Ground/DeployLayer" index="2" instance=ExtResource("6_dovfj")]
position = Vector2(396, 38)
position = Vector2(419, 34)
debug_note = "被打晕后传送点"
portal_name = "1"

View File

@ -32,10 +32,11 @@ func _start_well_show() -> void:
player.set_facing_direction(Vector2.LEFT)
# c02_吕萍_背靠呼吸
player.player_action(20, false)
await Util.wait(3.0)
await Util.wait(3.5)
var tween = create_tween()
tween.tween_property(xchan, "modulate:a", 1.0, 1.0)
await tween.finished
await Util.wait(2.5)
if not ArchiveManager.get_global_value("has_exited_by_player_choice"):
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_井边回忆")
else:

View File

@ -54,13 +54,12 @@ func _on_wheel_rotated(_radiant: float) -> void:
var c03_mem = $"二章结尾回忆" as Node2D
c03_mem.show()
c03_mem.modulate.a = 0.0
await Util.wait(2.0)
await Util.wait(3.0)
DialogueManager.show_dialogue_balloon(
GlobalConfig.DIALOG_C03, "c03_绞肉机回忆小蝶和小婵1", [GlobalConfig.DIALOG_IGNORE_INPUT]
)
var tween = create_tween()
tween.tween_interval(3.0)
tween.tween_property(c03_mem, "modulate:a", 1.0, 2.0)
tween.tween_property(c03_mem, "modulate:a", 1.0, 3.0)
await DialogueManager.dialogue_ended
if tween and tween.is_running():
await tween.finished

View File

@ -26,15 +26,16 @@ func start_show() -> void:
# 场景中的 sfx 静音
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "change_volumn_db", -20)
$"Sfx二章结尾氛围".play()
var tween: Tween
# 第一段小蝉特写branch
await Util.wait(2.0)
light.show()
tween = create_tween()
tween.tween_property(holding_balls_sprite, "modulate:a", 0.0, 1.0)
sitting_sprite.show()
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_绞肉机回忆小蝶和小婵2")
await DialogueManager.dialogue_ended
sitting_sprite.show()
light.show()
var tween = create_tween()
tween.tween_property(holding_balls_sprite, "modulate:a", 0.0, 1.0)
await tween.finished
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_绞肉机回忆小蝶和小婵3")
await DialogueManager.dialogue_ended
await _watch_back()
@ -47,31 +48,35 @@ func start_show() -> void:
# 第二段二楼外侧回忆branch
# 从 小蝉特写branch 过渡到 第二段二楼外侧回忆branch
%"二楼外侧回忆branch".show()
var f2_branch = %"二楼外侧回忆branch"
f2_branch.show()
f2_branch.modulate.a = 0.0
var xchan_branch = %"小蝉特写branch"
tween = create_tween()
tween.tween_property(xchan_branch, "modulate:a", 0.0, 3.0)
tween.tween_property(xchan_branch, "modulate:a", 0.0, 2.0)
tween.parallel().tween_property(f2_branch, "modulate:a", 1.0, 1.5)
await tween.finished
var xdie = %"蝶晃腿" as ProAnimatedSprite2D
xdie.play("小蝶爬墙")
await xdie.animation_finished
%"灰姑".play("灰姑呼实体吸帧_前进")
# 6秒走完
await Util.wait(5.5)
xdie.play("小蝶爬墙")
# 6秒走完, 4秒后可先开启对话
await Util.wait(4.0)
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_绞肉机回忆小蝶和小婵6", [GlobalConfig.DIALOG_IGNORE_INPUT])
await DialogueManager.dialogue_ended
%"蝉晃腿".play("小蝉看向灰姑呼吸")
xdie.play("小蝶看向灰姑呼吸")
await Util.wait(1.0)
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_绞肉机回忆小蝶和小婵6")
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_绞肉机回忆小蝶和小婵7")
await DialogueManager.dialogue_ended
await Util.wait(1.5)
# c03_meat_grinder: 0:初始化 1:已装转盘 2:绞肉机演出 3:演出结束
EventManager.set_stage_if_greater("c03_meat_grinder", 3)
EventManager.set_stage_if_greater("c03_well_show", 1)
EventManager.set_stage("c03_meat_grinder", 3)
EventManager.set_stage("c03_well_show", 1)
# 覆盖转场效果
SceneManager.white_transition(1.5, 2.0)
await Util.wait(1.5)
# 李氏癞子房间离井边演出比较近,所以选择 5 号门
SceneManager.get_ground_loader().transition_to_scene("c02_s03", "5")
SceneManager.get_ground_loader().transition_to_scene("c02_s03", "5", 0.5, Color.WHITE)
var dialog_was_ended = false

View File

@ -79,14 +79,14 @@ centered = false
[node name="灰姑" type="AnimatedSprite2D" parent="二楼外侧回忆branch"]
unique_name_in_owner = true
position = Vector2(589, 159)
position = Vector2(578, 157)
sprite_frames = ExtResource("8_8oj5m")
animation = &"灰姑呼实体吸帧"
autoplay = "灰姑呼实体吸帧"
script = ExtResource("4_bac1h")
move_configs = Array[Dictionary]([{
"animation": "灰姑呼实体吸帧_前进",
"animation_next": "",
"animation_next": "灰姑呼实体吸帧",
"duration": 1e+07,
"movement_x": 300.0,
"velocity": Vector2(-50, 0)