Compare commits
8 Commits
d3f4e57a98
...
2e1f88359b
Author | SHA1 | Date | |
---|---|---|---|
2e1f88359b | |||
a164b27bd6 | |||
419625a496 | |||
4d5ceaadc9 | |||
89c339976e | |||
bfd510039d | |||
f9263862d2 | |||
b56d251f72 |
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
小小蝶: 那个,这是我刚刚认识的好朋友,她叫、她叫...
|
||||
小蝉: 我叫方小蝉。
|
||||
小蝉: 阿姨,你们是伐是要回起吃饭啦,我爸爸...等些阿要叫我回起了。
|
||||
|
@ -3254,9 +3254,6 @@ animations = [{
|
||||
"frames": [{
|
||||
"duration": 3.0,
|
||||
"texture": ExtResource("561_absvs")
|
||||
}, {
|
||||
"duration": 14.0,
|
||||
"texture": ExtResource("570_wpe64")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"c02_吕萍_背靠呼吸",
|
||||
@ -3316,7 +3313,7 @@ animations = [{
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"c02_吕萍_背靠起身",
|
||||
"speed": 6.0
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
|
@ -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")
|
||||
|
||||
|
@ -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)
|
||||
|
@ -8,6 +8,7 @@ signal exit(arg)
|
||||
|
||||
@export var packed_scene: PackedScene
|
||||
@export var quit_closeup_on_cancel := true
|
||||
@export var on_display_hide_hud := false
|
||||
@export var on_display_change_volumn := true
|
||||
@export var on_display_changed_volumn_db := -7.0
|
||||
@export_tool_button("新建特写场景") var create_closeup_scene = _create_scene_with_script
|
||||
@ -23,6 +24,7 @@ func _ready() -> void:
|
||||
return
|
||||
interacted.connect(display)
|
||||
|
||||
|
||||
func hold_cancel_before_exit() -> void:
|
||||
_holding_cancel_before_exit = true
|
||||
|
||||
@ -32,6 +34,8 @@ func display() -> void:
|
||||
if current_child:
|
||||
return
|
||||
if packed_scene:
|
||||
if on_display_hide_hud and SceneManager.get_ground().display_hud:
|
||||
SceneManager.toggle_hud_display(false)
|
||||
if on_display_change_volumn:
|
||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "change_volumn_db" , on_display_changed_volumn_db)
|
||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "change_volumn_db" , on_display_changed_volumn_db)
|
||||
@ -48,6 +52,8 @@ func display() -> void:
|
||||
|
||||
func _exit(arg = null):
|
||||
if current_child:
|
||||
if on_display_hide_hud and SceneManager.get_ground().display_hud:
|
||||
SceneManager.toggle_hud_display(true)
|
||||
if on_display_change_volumn:
|
||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "reset_volumn_to_default")
|
||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "reset_volumn_to_default")
|
||||
@ -62,12 +68,13 @@ func _exit(arg = null):
|
||||
# exit 信号后,恢复处理 cancel 事件
|
||||
_holding_cancel_before_exit = false
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if not current_child:
|
||||
return
|
||||
if event.is_action_pressed("cancel"):
|
||||
get_viewport().set_input_as_handled()
|
||||
if quit_closeup_on_cancel and not _holding_cancel_before_exit:
|
||||
get_viewport().set_input_as_handled()
|
||||
_exit()
|
||||
# 在有特写界面时,阻塞 interact 输入
|
||||
elif event.is_action_pressed("interact"):
|
||||
|
@ -258,7 +258,7 @@ func _setup_player_light() -> void:
|
||||
directional_light.visible = true
|
||||
# 设置角色身上光源
|
||||
var should_enable_light = (
|
||||
directional_light.blend_mode == Light2D.BLEND_MODE_SUB and directional_light.energy > 0.6
|
||||
directional_light.blend_mode == Light2D.BLEND_MODE_SUB and directional_light.energy >= 0.6
|
||||
)
|
||||
player.enable_light = should_enable_light
|
||||
print("_setup_player_light player.enable_light=", player.enable_light)
|
||||
|
@ -45,6 +45,7 @@ const GROUND_SCENE_PATH_DICT: Dictionary[String, Dictionary] = {
|
||||
"c03_s10": {"path": "uid://clgwc3jcqarpe", "name": "胖子游戏1"},
|
||||
"c03_s11": {"path": "uid://shgrg8qcr1cu", "name": "胖子游戏2"},
|
||||
"c03_s12": {"path": "uid://cxabqg87g4vxc", "name": "胖子游戏3"},
|
||||
"c03_s13": {"path": "uid://s6odh172gpbr", "name": "胖子游戏4"},
|
||||
"c04_s01": {"path": "uid://drjnu33pga6i5", "name": "父母房间"},
|
||||
}
|
||||
|
||||
@ -159,7 +160,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 +172,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 +189,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:
|
||||
|
@ -131,6 +131,7 @@ content_key = "c02_海报1"
|
||||
position = Vector2(253, -31)
|
||||
texture = ExtResource("10_jg8g0")
|
||||
packed_scene = ExtResource("11_jg8g0")
|
||||
on_display_hide_hud = true
|
||||
first_interact_os_key = "c02_海报_剪辫子侦探"
|
||||
|
||||
[node name="青岛啤酒" parent="Ground/DeployLayer" index="7" instance=ExtResource("12_0fckv")]
|
||||
@ -260,10 +261,7 @@ player_movement_rect = Rect2(19, -158, 667, 316)
|
||||
facing_direction = Vector2(1, 0)
|
||||
|
||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||
limit_left = 0
|
||||
limit_top = -158
|
||||
limit_right = 700
|
||||
limit_bottom = 158
|
||||
|
||||
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
|
||||
points = PackedVector2Array(19, 150, 686, 150)
|
||||
|
@ -321,6 +321,8 @@ func _on_counter_interacted():
|
||||
|
||||
func _walk_to_xchan_and_run_away() -> void:
|
||||
SceneManager.lock_player()
|
||||
# 火灾演出过程暂不隐藏 hud,跑到尽头后转场,在谢幕演出开始(二楼)会隐藏
|
||||
# SceneManager.toggle_hud_display(false)
|
||||
# 从走向小蝉就开始放
|
||||
$"Sfx牵手演出氛围音".global_play()
|
||||
var player = SceneManager.get_player() as MainPlayer
|
||||
|
@ -800,6 +800,7 @@ collision_width_and_x = Vector2(40, 0)
|
||||
[node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="25" instance=ExtResource("23_81juy")]
|
||||
position = Vector2(466, 3)
|
||||
packed_scene = ExtResource("24_0o4rt")
|
||||
on_display_hide_hud = true
|
||||
collision_width_and_x = Vector2(40, 0)
|
||||
|
||||
[node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="26" instance=ExtResource("25_iyaiw")]
|
||||
@ -822,6 +823,7 @@ frame_progress = 0.643855
|
||||
z_index = 6
|
||||
position = Vector2(2063, 50)
|
||||
packed_scene = ExtResource("26_yy4fp")
|
||||
on_display_hide_hud = true
|
||||
action_key = 3
|
||||
|
||||
[node name="Npc井边疯子" parent="Ground/DeployLayer" index="30" instance=ExtResource("35_plfv5")]
|
||||
|
@ -92,6 +92,7 @@ texture = ExtResource("9_k74x7")
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(189, 15)
|
||||
packed_scene = ExtResource("7_fvlg0")
|
||||
on_display_hide_hud = true
|
||||
first_interact_os_key = "c02_保卫科祭台os"
|
||||
|
||||
[node name="Closeup老鼠精" parent="Ground/DeployLayer" index="7" instance=ExtResource("6_66gue")]
|
||||
@ -99,11 +100,13 @@ light_mask = 5
|
||||
position = Vector2(207.5, -40.5)
|
||||
texture = ExtResource("11_ffvrp")
|
||||
packed_scene = ExtResource("8_cm3g6")
|
||||
on_display_hide_hud = true
|
||||
|
||||
[node name="Closeup花名册" parent="Ground/DeployLayer" index="8" instance=ExtResource("6_66gue")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(351, 31)
|
||||
packed_scene = ExtResource("6_fvlg0")
|
||||
on_display_hide_hud = true
|
||||
first_interact_os_key = "c02_保卫科花名册os"
|
||||
|
||||
[node name="煤油灯" type="Sprite2D" parent="Ground/DeployLayer" index="9"]
|
||||
|
@ -185,6 +185,7 @@ hook_method = "wood_puppet"
|
||||
position = Vector2(-108, -168)
|
||||
packed_scene = ExtResource("10_7mq0m")
|
||||
quit_closeup_on_cancel = false
|
||||
on_display_hide_hud = true
|
||||
on_display_changed_volumn_db = 0.0
|
||||
action_key = 3
|
||||
first_interact_os_key = "c02_一楼戏台"
|
||||
@ -225,6 +226,7 @@ texture = ExtResource("8_mrltr")
|
||||
[node name="Closeup戏台" parent="Ground/DeployLayer" index="8" instance=ExtResource("10_2yvhw")]
|
||||
position = Vector2(305, -249)
|
||||
packed_scene = ExtResource("11_2yvhw")
|
||||
on_display_hide_hud = true
|
||||
first_interact_os_key = "c02_一楼戏台"
|
||||
|
||||
[node name="Note一楼内侧通道" parent="Ground/DeployLayer" index="9" instance=ExtResource("10_8t4w6")]
|
||||
|
@ -168,6 +168,7 @@ func _toggle_candles(show: bool) -> void:
|
||||
|
||||
# 第一章火灾结束,尾声演出
|
||||
func _c02_final_show():
|
||||
SceneManager.toggle_hud_display(false)
|
||||
_toggle_candles(false)
|
||||
var player = SceneManager.get_player()
|
||||
player.set_facing_direction(Vector2(-1, 0))
|
||||
@ -227,6 +228,7 @@ func _on_exit_final_show(_arg):
|
||||
ArchiveManager.set_chapter_if_greater(3)
|
||||
await SceneManager.pop_chapter_notification(3)
|
||||
SceneManager.unlock_player()
|
||||
SceneManager.toggle_hud_display(true)
|
||||
|
||||
|
||||
func unlock_2floor_map():
|
||||
|
@ -1237,6 +1237,7 @@ quit_closeup_on_cancel = false
|
||||
[node name="Closeup水盆" parent="Ground/DeployLayer" index="19" instance=ExtResource("11_owxx3")]
|
||||
position = Vector2(289, 16)
|
||||
packed_scene = ExtResource("16_p6da7")
|
||||
on_display_hide_hud = true
|
||||
first_interact_os_key = "c02_二楼水盆"
|
||||
|
||||
[node name="Closeup谢幕演出" parent="Ground/DeployLayer" index="20" instance=ExtResource("11_owxx3")]
|
||||
@ -1410,10 +1411,7 @@ player_movement_rect = Rect2(26, -158, 874, 316)
|
||||
facing_direction = Vector2(1, 0)
|
||||
|
||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||
limit_left = 0
|
||||
limit_top = -158
|
||||
limit_right = 927
|
||||
limit_bottom = 158
|
||||
|
||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||
position = Vector2(0, -5)
|
||||
|
@ -77,6 +77,7 @@ position = Vector2(-5, 78)
|
||||
position = Vector2(292, -11)
|
||||
texture = ExtResource("10_6ivku")
|
||||
packed_scene = ExtResource("11_vxng8")
|
||||
on_display_hide_hud = true
|
||||
first_interact_os_key = "c02_海报_戏法班"
|
||||
|
||||
[node name="Note老鼠洞" parent="Ground/DeployLayer" index="7" instance=ExtResource("13_s75vl")]
|
||||
@ -115,10 +116,7 @@ position = Vector2(41, 98)
|
||||
player_movement_rect = Rect2(37, -158, 573, 316)
|
||||
|
||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||
limit_left = 0
|
||||
limit_top = -158
|
||||
limit_right = 645
|
||||
limit_bottom = 158
|
||||
|
||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||
position = Vector2(11, -1)
|
||||
|
@ -97,7 +97,8 @@ func hole_interacted():
|
||||
|
||||
|
||||
func eavesdrop_start() -> void:
|
||||
SceneManager.freeze_player(0, 5)
|
||||
SceneManager.toggle_hud_display(false)
|
||||
SceneManager.lock_player(0, 5)
|
||||
var node = $"../DeployLayer/瞎子小蝉对话"
|
||||
node.visible = true
|
||||
# 偷听动作
|
||||
@ -115,7 +116,8 @@ func eavesdrop_start() -> void:
|
||||
tween.parallel().tween_property(color_mask, "color:a", 1.0, 2.0)
|
||||
await tween.finished
|
||||
node.visible = false
|
||||
SceneManager.release_player()
|
||||
SceneManager.unlock_player()
|
||||
SceneManager.toggle_hud_display(true)
|
||||
interacting = false
|
||||
|
||||
|
||||
|
@ -204,11 +204,13 @@ texture_scale = 0.15
|
||||
[node name="Closeup画" parent="Ground/DeployLayer" index="3" instance=ExtResource("10_a48k2")]
|
||||
position = Vector2(214, -19)
|
||||
packed_scene = ExtResource("11_mc126")
|
||||
on_display_hide_hud = true
|
||||
enabled = false
|
||||
|
||||
[node name="Closeup讨厌他们" parent="Ground/DeployLayer" index="4" instance=ExtResource("10_a48k2")]
|
||||
position = Vector2(214, -19)
|
||||
packed_scene = ExtResource("16_nub1x")
|
||||
on_display_hide_hud = true
|
||||
enabled = false
|
||||
|
||||
[node name="灯座Sprite2D" type="Sprite2D" parent="Ground/DeployLayer" index="5"]
|
||||
@ -368,10 +370,7 @@ texture = SubResource("GradientTexture2D_bp5fr")
|
||||
current = true
|
||||
|
||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||
limit_left = 0
|
||||
limit_top = -158
|
||||
limit_right = 725
|
||||
limit_bottom = 158
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="0"]
|
||||
position = Vector2(291, 94)
|
||||
|
@ -183,6 +183,7 @@ texture = ExtResource("8_3ftnp")
|
||||
position = Vector2(349, 15)
|
||||
texture = ExtResource("18_3kyh4")
|
||||
packed_scene = ExtResource("18_5t4pt")
|
||||
on_display_hide_hud = true
|
||||
sign_mark_offset = Vector2(0, -7.93)
|
||||
first_interact_os_key = "c02_互动小蝉头套"
|
||||
|
||||
@ -271,12 +272,6 @@ position = Vector2(315, 98)
|
||||
player_movement_rect = Rect2(50, -158, 460, 316)
|
||||
facing_direction = Vector2(1, 0)
|
||||
|
||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||
limit_left = 0
|
||||
limit_top = -158
|
||||
limit_right = 564
|
||||
limit_bottom = 158
|
||||
|
||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||
visible = false
|
||||
position = Vector2(193, 0)
|
||||
|
@ -149,6 +149,7 @@ metadata/_custom_type_script = "uid://bkkiyk5jkdw4d"
|
||||
position = Vector2(573, -6)
|
||||
texture = ExtResource("11_amci2")
|
||||
packed_scene = ExtResource("7_d27sg")
|
||||
on_display_hide_hud = true
|
||||
|
||||
[node name="EventBinder" type="Node" parent="Ground/DeployLayer/Event2D放肉后/CloseupDemo公告"]
|
||||
script = ExtResource("6_yaa68")
|
||||
|
@ -272,6 +272,7 @@ unique_name_in_owner = true
|
||||
position = Vector2(193, 22)
|
||||
texture = ExtResource("18_t8u8e")
|
||||
packed_scene = ExtResource("13_fl7if")
|
||||
on_display_hide_hud = true
|
||||
sign_mark_offset = Vector2(3, -5)
|
||||
enabled = false
|
||||
|
||||
|
@ -35,8 +35,10 @@ func _on_ground_ready() -> void:
|
||||
closeup整理麻将游戏.enabled = mahjong_stage == 0
|
||||
if mahjong_stage == 1:
|
||||
closeup整理麻将游戏.display()
|
||||
SceneManager.toggle_hud_display(false)
|
||||
elif mahjong_stage == 2:
|
||||
closeup麻将出千游戏.display()
|
||||
SceneManager.toggle_hud_display(false)
|
||||
closeup整理麻将游戏.exit.connect(_on_exit_sort_mahjong_game)
|
||||
closeup麻将出千游戏.exit.connect(_on_exit_cheat_mahjong_game)
|
||||
pickable药方.triggered.connect(_on_spec_picked, CONNECT_ONE_SHOT)
|
||||
@ -55,6 +57,7 @@ func _on_exit_sort_mahjong_game(arg) -> void:
|
||||
|
||||
func _on_exit_cheat_mahjong_game(arg) -> void:
|
||||
if arg:
|
||||
SceneManager.toggle_hud_display(true)
|
||||
EventManager.set_stage_if_greater("c03_mahjong_game", 3)
|
||||
EventManager.set_stage_if_greater("c03_li_paperwoman", 1)
|
||||
closeup麻将出千游戏.enabled = false
|
||||
|
@ -110,6 +110,7 @@ hook_dialogue_title = "c03_s05_肉铺隔门板偷听"
|
||||
position = Vector2(424, 41)
|
||||
texture = ExtResource("8_mv54a")
|
||||
packed_scene = ExtResource("8_12how")
|
||||
on_display_hide_hud = true
|
||||
sign_mark_offset = Vector2(-2.6, -7.28)
|
||||
|
||||
[node name="Pickable新鲜的肉" parent="Ground/DeployLayer" index="4" instance=ExtResource("10_ma57s")]
|
||||
|
@ -77,12 +77,6 @@ catty_light_energy = 0.5
|
||||
player_movement_rect = Rect2(45, -158, 473, 316)
|
||||
facing_direction = Vector2(-1, 0)
|
||||
|
||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||
limit_left = 0
|
||||
limit_top = -158
|
||||
limit_right = 564
|
||||
limit_bottom = 158
|
||||
|
||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||
position = Vector2(26, 0)
|
||||
texture = ExtResource("5_f527l")
|
||||
|
@ -130,6 +130,7 @@ unique_name_in_owner = true
|
||||
position = Vector2(316, 21)
|
||||
packed_scene = ExtResource("15_48a3r")
|
||||
quit_closeup_on_cancel = false
|
||||
on_display_hide_hud = null
|
||||
|
||||
[node name="EventBinder" type="Node" parent="Ground/DeployLayer/Closeup绞肉机"]
|
||||
script = ExtResource("17_e1lvl")
|
||||
|
@ -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:
|
||||
|
@ -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"
|
||||
|
||||
@ -147,6 +147,7 @@ portal_name = "1"
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(62, 20)
|
||||
packed_scene = ExtResource("9_w4bpd")
|
||||
on_display_hide_hud = true
|
||||
|
||||
[node name="EventBinder" type="Node" parent="Ground/DeployLayer/Closeup囚室门锁"]
|
||||
script = ExtResource("9_oka3h")
|
||||
@ -157,6 +158,7 @@ metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
||||
[node name="Closeup囚室墙洞" parent="Ground/DeployLayer" index="4" instance=ExtResource("5_jua84")]
|
||||
position = Vector2(276, 2)
|
||||
packed_scene = ExtResource("7_2jtaw")
|
||||
on_display_hide_hud = true
|
||||
|
||||
[node name="囚室墙洞海报" type="Sprite2D" parent="Ground/DeployLayer" index="5"]
|
||||
position = Vector2(277, 7)
|
||||
@ -199,6 +201,7 @@ prop_key = "prop_转轮"
|
||||
visible = false
|
||||
position = Vector2(233, 86)
|
||||
packed_scene = ExtResource("17_06t0x")
|
||||
on_display_hide_hud = true
|
||||
|
||||
[node name="符纸" type="Sprite2D" parent="Ground/DeployLayer/Closeup符纸"]
|
||||
position = Vector2(-3.57628e-07, 6)
|
||||
|
@ -72,7 +72,7 @@ points = PackedVector2Array(30, 150, 978, 151)
|
||||
|
||||
[node name="DirectionalLight2D" parent="Ground" index="8"]
|
||||
visible = false
|
||||
energy = 0.2
|
||||
energy = 0.6
|
||||
blend_mode = 1
|
||||
|
||||
[editable path="Ground"]
|
||||
|
@ -14,13 +14,15 @@ func _ready() -> void:
|
||||
|
||||
|
||||
#region node_reference
|
||||
var meat_hill: Node2D
|
||||
var player: MainPlayer
|
||||
#endregion
|
||||
|
||||
|
||||
# 读取设置变量名
|
||||
func _setup_node_reference() -> void:
|
||||
pass
|
||||
|
||||
meat_hill = $"../DeployLayer/肉山" as Node2D
|
||||
player = SceneManager.get_player() as MainPlayer
|
||||
|
||||
func _on_ground_ready() -> void:
|
||||
_check_first_enter()
|
||||
@ -28,7 +30,52 @@ func _on_ground_ready() -> void:
|
||||
|
||||
func _check_first_enter() -> void:
|
||||
if not data["has_entered"]:
|
||||
var x = $"../DeployLayer/portal_left".global_position.x
|
||||
SceneManager.get_player().global_position.x = x
|
||||
SceneManager.get_player().set_facing_direction(Vector2.RIGHT)
|
||||
SceneManager.lock_player(0, 6, true)
|
||||
set_data("has_entered", true)
|
||||
await SceneManager.pause_and_hide_player_sprite(1.5)
|
||||
SceneManager.unlock_player()
|
||||
await SceneManager.get_player().animation_finished
|
||||
SceneManager.unlock_player()
|
||||
|
||||
|
||||
func talk_with_npc() -> void:
|
||||
SceneManager.lock_player()
|
||||
$"../DeployLayer/Pro探子".flip_h = false
|
||||
var camera = SceneManager.get_camera_marker()
|
||||
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_胖子游戏对白")
|
||||
var tween = create_tween()
|
||||
tween.tween_property(camera, "force_offset:x", 100.0, 2.0)
|
||||
await DialogueManager.dialogue_ended
|
||||
tween = create_tween()
|
||||
tween.tween_property(camera, "force_offset:x", 0.0, 1.5)
|
||||
await Util.wait(1.0)
|
||||
SceneManager.unlock_player()
|
||||
await Util.wait(2.0)
|
||||
# 天上掉肉
|
||||
tween = create_tween()
|
||||
meat_hill.global_position.x = player.global_position.x
|
||||
var start_y = meat_hill.global_position.y
|
||||
var target_y = player.global_position.y
|
||||
# 伪自由落体(2.0 s),从 start_y tween 到 target_y
|
||||
tween.tween_method(_drop_meat.bind(start_y, target_y), 0.0, 1.0, 1.0)
|
||||
await tween.finished
|
||||
camera.shake_camera()
|
||||
SceneManager.lock_player()
|
||||
# TODO
|
||||
SceneManager.pop_debug_dialog_info("音效", "肉山掉落")
|
||||
$"Sfx肉山掉落".play()
|
||||
await Util.wait(3.0)
|
||||
# 转场
|
||||
SceneManager.unlock_player()
|
||||
SceneManager.get_ground_loader().transition_to_scene("c03_s12", "left")
|
||||
|
||||
|
||||
func _drop_meat(progress: float, start_y: float, target_y: float) -> void:
|
||||
# 伪自由落体(2.0 s),从 start_y tween 到 target_y
|
||||
# progress 先慢后快
|
||||
progress = progress * progress * progress
|
||||
var y = start_y + (target_y - start_y) * progress
|
||||
meat_hill.global_position.y = y
|
||||
meat_hill.global_position.x = player.global_position.x
|
||||
|
@ -1,9 +1,10 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://shgrg8qcr1cu"]
|
||||
[gd_scene load_steps=20 format=3 uid="uid://shgrg8qcr1cu"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_lfcjf"]
|
||||
[ext_resource type="Script" uid="uid://fejtkano6pn7" path="res://scene/ground/scene/c03/s11_胖子游戏2.gd" id="2_lfcjf"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvc2emnfcmabx" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道1.ogg" id="3_hx2uj"]
|
||||
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_0w5fd"]
|
||||
[ext_resource type="AudioStream" uid="uid://cv6aivf1jcvd3" path="res://asset/audio/mixkit/mixkit-meat-hit.ogg" id="5_k5x30"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1t0o8vqwjirh" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第三段/山顶.png" id="5_wqrgj"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://ca8u6yx6rv0xm" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第三段/c03_胖子游戏第三段_frames.tres" id="6_c73iv"]
|
||||
[ext_resource type="Texture2D" uid="uid://w4ep0mqmkfo0" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第三段/山顶洞口.png" id="6_hx2uj"]
|
||||
@ -11,11 +12,17 @@
|
||||
[ext_resource type="Script" uid="uid://cphfob11f7atx" path="res://addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd" id="7_hx2uj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="9_0w5fd"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3gwj6ap8w7cj" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第三段/山顶文物.png" id="10_lyjg2"]
|
||||
[ext_resource type="Texture2D" uid="uid://2hvfbno7wgjl" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块4.png" id="12_0ry88"]
|
||||
[ext_resource type="Texture2D" uid="uid://g3ohxmylc316" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块3.png" id="12_wi43b"]
|
||||
[ext_resource type="Texture2D" uid="uid://bieyil13hhemh" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块2.png" id="13_k5x30"]
|
||||
[ext_resource type="Texture2D" uid="uid://85unc5qju4kl" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第一段/肉块5.png" id="14_wks4o"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://dy8b8dmgv3mdd" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第二段/c03_胖子游戏第二段_frames.tres" id="17_novpu"]
|
||||
[ext_resource type="Texture2D" uid="uid://cylsq5cvhlp18" path="res://asset/art/tool/point_light.png" id="18_p0emk"]
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_k01ve"]
|
||||
|
||||
[node name="S11" type="Node2D"]
|
||||
metadata/_edit_horizontal_guides_ = [-627.0]
|
||||
metadata/_edit_horizontal_guides_ = [-627.0, 58.0]
|
||||
|
||||
[node name="Ground" parent="." instance=ExtResource("1_lfcjf")]
|
||||
scene_name = "c03_s11"
|
||||
@ -40,6 +47,12 @@ mode = "场景背景音"
|
||||
"感应玩家操作" = false
|
||||
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
|
||||
|
||||
[node name="Sfx肉山掉落" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="1"]
|
||||
stream = ExtResource("5_k5x30")
|
||||
bus = &"game_sfx"
|
||||
script = ExtResource("4_0w5fd")
|
||||
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
|
||||
|
||||
[node name="BGSprite2D" parent="Ground" index="2"]
|
||||
light_mask = 5
|
||||
texture = ExtResource("5_wqrgj")
|
||||
@ -64,14 +77,16 @@ target_scene = "c03_s12"
|
||||
target_portal = "left"
|
||||
|
||||
[node name="Pro探子" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="2"]
|
||||
position = Vector2(818, -27)
|
||||
position = Vector2(1046.5, -7.5)
|
||||
sprite_frames = ExtResource("6_c73iv")
|
||||
animation = &"日本鬼子呼吸帧"
|
||||
autoplay = "日本鬼子呼吸帧"
|
||||
flip_h = true
|
||||
script = ExtResource("7_hx2uj")
|
||||
metadata/_custom_type_script = "uid://cphfob11f7atx"
|
||||
|
||||
[node name="Pro水中肉" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="3"]
|
||||
position = Vector2(1238, 58)
|
||||
position = Vector2(1133, 73)
|
||||
sprite_frames = ExtResource("6_c73iv")
|
||||
animation = &"水中肉"
|
||||
autoplay = "水中肉"
|
||||
@ -79,16 +94,106 @@ script = ExtResource("7_hx2uj")
|
||||
metadata/_custom_type_script = "uid://cphfob11f7atx"
|
||||
|
||||
[node name="Ambush对话探子" parent="Ground/DeployLayer" index="4" instance=ExtResource("9_0w5fd")]
|
||||
position = Vector2(767, 25)
|
||||
hook_dialogue_res = "c03"
|
||||
hook_dialogue_title = "c03_胖子游戏对白"
|
||||
position = Vector2(995.5, 44.5)
|
||||
hook_method = "talk_with_npc"
|
||||
|
||||
[node name="文物" type="Sprite2D" parent="Ground/DeployLayer" index="5"]
|
||||
position = Vector2(624, 62)
|
||||
z_index = 10
|
||||
position = Vector2(624, 65)
|
||||
texture = ExtResource("10_lyjg2")
|
||||
|
||||
[node name="肉山" type="Node2D" parent="Ground/DeployLayer" index="6"]
|
||||
z_index = 6
|
||||
position = Vector2(901, -214)
|
||||
|
||||
[node name="天上掉的肉4" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(2.53979, -89.2959)
|
||||
rotation = 0.307938
|
||||
texture = ExtResource("12_0ry88")
|
||||
|
||||
[node name="天上掉的肉5" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(-27.4602, -67.2959)
|
||||
rotation = -0.370446
|
||||
texture = ExtResource("13_k5x30")
|
||||
|
||||
[node name="天上掉的肉" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(14.5398, -56.2959)
|
||||
rotation = 0.138633
|
||||
texture = ExtResource("13_k5x30")
|
||||
|
||||
[node name="天上掉的肉2" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(-43.4602, -32.2959)
|
||||
rotation = -0.384091
|
||||
scale = Vector2(1, 1)
|
||||
texture = ExtResource("14_wks4o")
|
||||
|
||||
[node name="天上掉的肉3" type="Sprite2D" parent="Ground/DeployLayer/肉山"]
|
||||
position = Vector2(-4.54016, -19.4051)
|
||||
rotation = 0.0182861
|
||||
scale = Vector2(1, 1)
|
||||
texture = ExtResource("12_wi43b")
|
||||
|
||||
[node name="河里的手4" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="7"]
|
||||
position = Vector2(1344, 17)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(0.6, 0.6)
|
||||
sprite_frames = ExtResource("17_novpu")
|
||||
animation = &"小手"
|
||||
autoplay = "小手"
|
||||
frame_progress = 0.390838
|
||||
speed_scale = 1.15
|
||||
|
||||
[node name="河里的手5" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="8"]
|
||||
position = Vector2(1341, 68)
|
||||
rotation = 1.5708
|
||||
sprite_frames = ExtResource("17_novpu")
|
||||
animation = &"小手"
|
||||
autoplay = "小手"
|
||||
frame_progress = 0.390838
|
||||
speed_scale = 0.96
|
||||
|
||||
[node name="河里的手" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="9"]
|
||||
position = Vector2(1078, 108)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(1.5, 1.5)
|
||||
sprite_frames = ExtResource("17_novpu")
|
||||
animation = &"小手"
|
||||
autoplay = "小手"
|
||||
frame_progress = 0.32264
|
||||
speed_scale = 0.85
|
||||
|
||||
[node name="河里的手2" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="10"]
|
||||
position = Vector2(1306, 129)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(2, 2)
|
||||
sprite_frames = ExtResource("17_novpu")
|
||||
animation = &"小手"
|
||||
autoplay = "小手"
|
||||
frame_progress = 0.390838
|
||||
speed_scale = 0.92
|
||||
|
||||
[node name="河里的手3" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="11"]
|
||||
position = Vector2(1245, 37)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(0.8, 0.8)
|
||||
sprite_frames = ExtResource("17_novpu")
|
||||
animation = &"小手"
|
||||
autoplay = "小手"
|
||||
frame_progress = 0.390838
|
||||
speed_scale = 0.9
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Ground/DeployLayer" index="12"]
|
||||
position = Vector2(1282, 100)
|
||||
texture = ExtResource("18_p0emk")
|
||||
texture_scale = 2.0
|
||||
|
||||
[node name="PointLight2D2" type="PointLight2D" parent="Ground/DeployLayer" index="13"]
|
||||
position = Vector2(186, -158)
|
||||
texture = ExtResource("18_p0emk")
|
||||
texture_scale = 2.0
|
||||
|
||||
[node name="MainPlayer" parent="Ground" index="5"]
|
||||
position = Vector2(1186, 58)
|
||||
position = Vector2(900, 58)
|
||||
character = "胖子游戏"
|
||||
player_movement_rect = Rect2(290, -158, 1110, 316)
|
||||
facing_direction = Vector2(1, 0)
|
||||
@ -100,11 +205,10 @@ limit_right = 1500
|
||||
offset = Vector2(0, 50)
|
||||
|
||||
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
|
||||
points = PackedVector2Array(290, 150, 1400, 151)
|
||||
points = PackedVector2Array(290, 150, 1000, 151)
|
||||
|
||||
[node name="DirectionalLight2D" parent="Ground" index="8"]
|
||||
visible = false
|
||||
energy = 0.2
|
||||
energy = 0.6
|
||||
blend_mode = 1
|
||||
|
||||
[editable path="Ground"]
|
||||
|
@ -80,7 +80,7 @@ points = PackedVector2Array(30, 150, 850, 151)
|
||||
|
||||
[node name="DirectionalLight2D" parent="Ground" index="8"]
|
||||
visible = false
|
||||
energy = 0.2
|
||||
energy = 0.6
|
||||
blend_mode = 1
|
||||
|
||||
[editable path="Ground"]
|
||||
|
45
scene/ground/scene/c03/s13_胖子游戏4.gd
Normal file
45
scene/ground/scene/c03/s13_胖子游戏4.gd
Normal file
@ -0,0 +1,45 @@
|
||||
@tool
|
||||
extends AnimationRoot
|
||||
|
||||
|
||||
# 覆盖该方法
|
||||
func _default_data() -> Dictionary:
|
||||
return {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
|
||||
|
||||
#region node_reference
|
||||
#endregion
|
||||
|
||||
|
||||
# 读取设置变量名
|
||||
func _setup_node_reference() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_ground_ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func eat_meat() -> void:
|
||||
SceneManager.lock_player()
|
||||
$"../DeployLayer/Ambush吃肉".enabled = false
|
||||
await SceneManager.get_player().walk_to_x(850.0).finished
|
||||
# 第一帧没有瘦子,后面才有
|
||||
var player = SceneManager.get_player() as MainPlayer
|
||||
var sprite = $"../DeployLayer/Pro吃肉" as ProAnimatedSprite2D
|
||||
sprite.play()
|
||||
sprite.frame = 1
|
||||
player.hide_sprite = true
|
||||
await sprite.animation_finished
|
||||
SceneManager.unlock_player()
|
||||
# c03_meat_grinder: 0:初始化 1:已装转盘 2:绞肉机演出 3:演出结束
|
||||
EventManager.set_stage_if_greater("c03_meat_grinder", 2)
|
||||
SceneManager.get_ground_loader().transition_to_scene("c03_s07", "2")
|
||||
|
||||
|
1
scene/ground/scene/c03/s13_胖子游戏4.gd.uid
Normal file
1
scene/ground/scene/c03/s13_胖子游戏4.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://ddawqvg4fjxv6
|
86
scene/ground/scene/c03/s13_胖子游戏4.tscn
Normal file
86
scene/ground/scene/c03/s13_胖子游戏4.tscn
Normal file
@ -0,0 +1,86 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://s6odh172gpbr"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_via7g"]
|
||||
[ext_resource type="Script" uid="uid://f4uampm47832" path="res://scene/ground/scene/c03/s12_胖子游戏3.gd" id="2_f2euj"]
|
||||
[ext_resource type="AudioStream" uid="uid://dvc2emnfcmabx" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道1.ogg" id="3_ycw22"]
|
||||
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_1c2tq"]
|
||||
[ext_resource type="Texture2D" uid="uid://brfbsaw6v35ru" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第四段/胖子游戏第四段效果/0.png" id="5_olkfs"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://cb3b44a1jpybb" path="res://asset/art/gif/c03_胖子游戏/c03_胖子游戏第四段/c03_胖子游戏第四段_frames.tres" id="6_3jqsh"]
|
||||
[ext_resource type="Script" uid="uid://cphfob11f7atx" path="res://addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd" id="7_qn0ib"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="8_ir78c"]
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_k01ve"]
|
||||
|
||||
[node name="S13" type="Node2D"]
|
||||
metadata/_edit_horizontal_guides_ = [-627.0]
|
||||
|
||||
[node name="Ground" parent="." instance=ExtResource("1_via7g")]
|
||||
scene_name = "c03_s13"
|
||||
display_hud = false
|
||||
player_y = 63
|
||||
footstep_type = "胖子游戏"
|
||||
|
||||
[node name="AnimationPlayer" parent="Ground" index="0"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_k01ve")
|
||||
}
|
||||
script = ExtResource("2_f2euj")
|
||||
|
||||
[node name="Sfx背景音" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
|
||||
stream = ExtResource("3_ycw22")
|
||||
volume_db = -5.0
|
||||
autoplay = true
|
||||
bus = &"game_sfx"
|
||||
script = ExtResource("4_1c2tq")
|
||||
mode = "场景背景音"
|
||||
"循环播放" = true
|
||||
"感应玩家操作" = false
|
||||
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
|
||||
|
||||
[node name="BGSprite2D" parent="Ground" index="2"]
|
||||
light_mask = 5
|
||||
texture = ExtResource("5_olkfs")
|
||||
offset = Vector2(0, -158)
|
||||
|
||||
[node name="portal_left" parent="Ground/DeployLayer" index="0"]
|
||||
position = Vector2(69, 21)
|
||||
|
||||
[node name="portal_right" parent="Ground/DeployLayer" index="1"]
|
||||
position = Vector2(1392, -9)
|
||||
|
||||
[node name="Pro吃肉" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="2"]
|
||||
position = Vector2(850, 95)
|
||||
sprite_frames = ExtResource("6_3jqsh")
|
||||
animation = &"爬绞肉机最终的"
|
||||
offset = Vector2(88, -105)
|
||||
script = ExtResource("7_qn0ib")
|
||||
metadata/_custom_type_script = "uid://cphfob11f7atx"
|
||||
|
||||
[node name="Ambush吃肉" parent="Ground/DeployLayer" index="3" instance=ExtResource("8_ir78c")]
|
||||
position = Vector2(842, 54)
|
||||
sign_mark_offset = Vector2(39, -9)
|
||||
trigger_mode = "interact"
|
||||
one_shot = false
|
||||
hook_method = "eat_meat"
|
||||
|
||||
[node name="MainPlayer" parent="Ground" index="5"]
|
||||
position = Vector2(69, 95)
|
||||
character = "胖子游戏"
|
||||
player_movement_rect = Rect2(30, -158, 820, 316)
|
||||
facing_direction = Vector2(1, 0)
|
||||
|
||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||
limit_right = 1200
|
||||
|
||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||
offset = Vector2(0, 50)
|
||||
|
||||
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
|
||||
points = PackedVector2Array(30, 150, 850, 151)
|
||||
|
||||
[node name="DirectionalLight2D" parent="Ground" index="8"]
|
||||
visible = false
|
||||
energy = 0.6
|
||||
blend_mode = 1
|
||||
|
||||
[editable path="Ground"]
|
@ -25,6 +25,7 @@ const start_x = 2236.0
|
||||
@onready var xchan = $"Pro小蝉" as ProAnimatedSprite2D
|
||||
|
||||
func _start_well_show() -> void:
|
||||
SceneManager.toggle_hud_display(false)
|
||||
xchan.modulate.a = 0.0
|
||||
var player = SceneManager.get_player()
|
||||
SceneManager.lock_player()
|
||||
@ -32,10 +33,15 @@ 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(6.5)
|
||||
# c02_吕萍_背靠起身
|
||||
await player.player_action(19, true)
|
||||
await Util.wait(2.0)
|
||||
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:
|
||||
@ -45,9 +51,8 @@ func _start_well_show() -> void:
|
||||
EventManager.set_stage_if_greater("c03_well_show", 2)
|
||||
create_tween().tween_property(xchan, "modulate:a", 0.0, 0.5)
|
||||
await Util.wait(1.0)
|
||||
# c02_吕萍_背靠起身
|
||||
await player.player_action(19, true)
|
||||
SceneManager.unlock_player()
|
||||
SceneManager.toggle_hud_display(true)
|
||||
|
||||
|
||||
func _on_pre_stage_updated() -> void:
|
||||
|
@ -28,6 +28,7 @@ func _on_stage_updated() -> void:
|
||||
|
||||
|
||||
func start_show() -> void:
|
||||
SceneManager.toggle_hud_display(false)
|
||||
SceneManager.lock_player()
|
||||
# 隐藏玩家
|
||||
SceneManager.get_player().visible = false
|
||||
@ -48,3 +49,4 @@ func start_show() -> void:
|
||||
SceneManager.focus_player_and_reset_zoom()
|
||||
SceneManager.get_player().visible = true
|
||||
SceneManager.unlock_player()
|
||||
SceneManager.toggle_hud_display(true)
|
||||
|
@ -3,8 +3,12 @@ extends CanvasLayer
|
||||
@warning_ignore("unused_signal")
|
||||
signal exit(arg)
|
||||
|
||||
@onready var drug_spec
|
||||
@onready var bowl
|
||||
|
||||
func _ready() -> void:
|
||||
layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME
|
||||
|
||||
# TODO 拿药方后,启动 drug game
|
||||
EventManager.set_stage("c03_drug_game", 1)
|
||||
|
||||
|
@ -27,7 +27,16 @@ texture = ExtResource("3_d7uum")
|
||||
[node name="Hover药方" parent="." instance=ExtResource("8_kxw4a")]
|
||||
position = Vector2(442, 181)
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hover药方"]
|
||||
polygon = PackedVector2Array(95.5, -70.5, -17.3, -70.5, -18.6, -68.5, -19.9, -68.5, -22.5, -60.8, -22.5, -58.2, -45.6, -23.5, -46.8, -23.5, -53.5, -7.9, -53.5, -5, -69.5, 22, -69.5, 23.8, -90.5, 56.9, -90.5, 58.4, -95.2, 61.5, -95.5, 70.5, 38.9, 70.5, 43.1, 67.5, 46.6, 67.5, 62.6, 43.5, 64, 43.5, 95.5, -54.3)
|
||||
|
||||
[node name="药方" type="Sprite2D" parent="Hover药方"]
|
||||
light_mask = 3
|
||||
texture = ExtResource("5_rmoey")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Hover药方"]
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 2
|
||||
texture = ExtResource("5_rmoey")
|
||||
|
||||
[node name="碗" type="Sprite2D" parent="."]
|
||||
@ -37,7 +46,17 @@ texture = ExtResource("7_qfnr1")
|
||||
[node name="Hover麻将" parent="碗" instance=ExtResource("8_kxw4a")]
|
||||
position = Vector2(-69, -40)
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="碗/Hover麻将"]
|
||||
polygon = PackedVector2Array(17.5, -41.5, -17.3, -41.5, -20.3, -38.5, -22.3, -38.5, -35.4, -26.5, -37.1, -26.5, -37.5, -24.8, -37.5, -13.2, -33.1, -10.5, -32.2, -10.5, -24.5, 33.8, -24.5, 38.6, -20.2, 41.5, 11.3, 41.5, 37.1, 25.5, 37.5, 10.1, 17.5, -40)
|
||||
|
||||
[node name="麻将" type="Sprite2D" parent="碗/Hover麻将"]
|
||||
light_mask = 3
|
||||
texture = ExtResource("9_gdtfm")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="碗/Hover麻将"]
|
||||
energy = 1.5
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 2
|
||||
texture = ExtResource("9_gdtfm")
|
||||
|
||||
[node name="遮罩" type="TextureRect" parent="."]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
@ -179,7 +179,7 @@ frame_progress = 1.0
|
||||
|
||||
[node name="TimerBlink" type="Timer" parent="小蝉特写branch/小蝉特写/眨眼"]
|
||||
unique_name_in_owner = true
|
||||
wait_time = 5.0
|
||||
wait_time = 4.0
|
||||
autostart = true
|
||||
|
||||
[node name="手拿弹珠" type="AnimatedSprite2D" parent="小蝉特写branch"]
|
||||
|
@ -262,6 +262,13 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
|
||||
stage = s
|
||||
_hide_all()
|
||||
var display_handle_outline = false
|
||||
if s >= 3:
|
||||
# 隐藏道具栏
|
||||
SceneManager.toggle_hud_display(false)
|
||||
# 禁止退出特写
|
||||
var closeup = get_parent() as Closeup2D
|
||||
if closeup:
|
||||
closeup.hold_cancel_before_exit()
|
||||
# 1关闭 2打开 3放入小蝉人偶 4全部放置正确(可摇手柄) 5已播放完成
|
||||
match s:
|
||||
0:
|
||||
@ -326,6 +333,10 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
hud.on_toggle_invalid_prop()
|
||||
elif event.is_action_pressed("cancel"):
|
||||
get_viewport().set_input_as_handled()
|
||||
if stage == 3:
|
||||
# 摇把手阶段不可退出
|
||||
return
|
||||
SceneManager.toggle_hud_display(true)
|
||||
exit.emit(false)
|
||||
|
||||
|
||||
|
@ -73,6 +73,9 @@ var shooting = false
|
||||
|
||||
|
||||
func checkout_round(r: int):
|
||||
if r == 0:
|
||||
# 游戏开始,隐藏 hud
|
||||
SceneManager.toggle_hud_display(false)
|
||||
round_id = r
|
||||
# 关闭所有碰撞
|
||||
for i in range(3):
|
||||
@ -260,6 +263,7 @@ func game_win() -> void:
|
||||
var scene = DialogueManager.show_dialogue_balloon_scene(dialog_balloon_scene, dialogue_c02, "c02_弹珠游戏4")
|
||||
await scene.ball_dialogue_ended
|
||||
await Util.wait(3.0)
|
||||
SceneManager.toggle_hud_display(true)
|
||||
exit.emit(true)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user