完善 panel 绑定关系

This commit is contained in:
cakipaul 2025-06-27 23:23:48 +08:00
parent a806265f24
commit 18095865aa
8 changed files with 141 additions and 62 deletions

View File

@ -13,6 +13,7 @@ notes_干掉的血迹,干掉的血迹,,,,,
c02_瞎子卧室_血脚印,这画上的脚印和刚刚看到的一样。,,,,,
prop_奇怪的肉_说明,,,,,,
bag_tab_日志,笔记,,,,,
ux_panel_退出,退出,,,,,
index_新游戏,新游戏,,,,,New Game
index_继续游戏,继续游戏,,,,,Resume
index_退出游戏,退出游戏,,,,,Exit
@ -20,7 +21,7 @@ ux_panel_继续,继续,,,,,
ux_panel_笔记,笔记,,,,,
ux_panel_设置,设置,,,,,
ux_panel_返回主菜单,返回主菜单,,,,,
ux_panel_退出,退出,,,,,
ux_panel_退出游戏,退出游戏,,,,,
setting_总音量,总音量,,,,,Main Volume
setting_音效音量,音效音量,,,,,SFX Volume
setting_对话音量,对话音量,,,,,Dialogue Volume
@ -67,11 +68,11 @@ prop_空手_说明,空空如也,,,,,
prop_信碎片1,信碎片(一),,,[#texture=c01/信件左上.png],,
prop_信碎片1_说明,浦育院院长秦阳,,,,,
prop_信碎片2,信碎片(二),,,[#texture=c01/信件右上.png],,
prop_信碎片2_说明,民国21年11月20日,,,,,
prop_信碎片2_说明,民国二十一年十月十五日,,,,,
prop_银元,银元,,,[#texture=c01/银元.png],,
prop_银元_说明,一枚“袁大头”银元,中华民国十年造。,,,,,
prop_院长的信,院长的信,,,[#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png],,
prop_院长的信_说明,浦育院院长秦阳<br>民国21年11月20日<br>致吕萍:<br>你现下境况如何?<br>你虽离开浦育院已久,但我始终没有忘记为你祈祷。<br>愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。<br>你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。<br>若有闲暇,欢迎你回浦育院看看。<br>院长童玉君<br>民国十九年十月十五日<br>公寓地址 芦昌路26弄3号,,,,,
prop_院长的信_说明,浦育院院长秦阳<br>致吕萍:<br>你现下境况如何?<br>你虽离开浦育院已久,但我始终没有忘记为你祈祷。<br>愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。<br>你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。<br>若有闲暇,欢迎你回浦育院看看。<br>院长童玉君<br>民国二十一年十月十五日<br>公寓地址 芦昌路26弄3号,,,,,
prop_火柴,火柴,,,[#texture=c02/火柴.png],,
prop_火柴_说明,盒里还剩下很多根,稍微有些受潮,,,[#texture=c02/火柴.png],,
prop_小猫玩具的脑袋,小猫玩具的脑袋,,,[#texture=c02/新小猫头.png],,

1 keys zh_CN _character _notes _tags zh_SH en
13 c02_瞎子卧室_血脚印 这画上的脚印和刚刚看到的一样。
14 prop_奇怪的肉_说明
15 bag_tab_日志 笔记
16 ux_panel_退出 退出
17 index_新游戏 新游戏 New Game
18 index_继续游戏 继续游戏 Resume
19 index_退出游戏 退出游戏 Exit
21 ux_panel_笔记 笔记
22 ux_panel_设置 设置
23 ux_panel_返回主菜单 返回主菜单
24 ux_panel_退出 ux_panel_退出游戏 退出 退出游戏
25 setting_总音量 总音量 Main Volume
26 setting_音效音量 音效音量 SFX Volume
27 setting_对话音量 对话音量 Dialogue Volume
68 prop_信碎片1 信碎片(一) [#texture=c01/信件左上.png]
69 prop_信碎片1_说明 浦育院院长秦阳
70 prop_信碎片2 信碎片(二) [#texture=c01/信件右上.png]
71 prop_信碎片2_说明 民国21年,11月20日 民国二十一年十月十五日
72 prop_银元 银元 [#texture=c01/银元.png]
73 prop_银元_说明 一枚“袁大头”银元,中华民国十年造。
74 prop_院长的信 院长的信 [#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png]
75 prop_院长的信_说明 浦育院院长秦阳<br>民国21年11月20日<br>致吕萍:<br>你现下境况如何?<br>你虽离开浦育院已久,但我始终没有忘记为你祈祷。<br>愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。<br>你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。<br>若有闲暇,欢迎你回浦育院看看。<br>院长童玉君<br>民国十九年十月十五日<br>公寓地址 芦昌路26弄3号 浦育院院长秦阳<br>致吕萍:<br>你现下境况如何?<br>你虽离开浦育院已久,但我始终没有忘记为你祈祷。<br>愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。<br>你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。<br>若有闲暇,欢迎你回浦育院看看。<br>院长童玉君<br>民国二十一年十月十五日<br>公寓地址 芦昌路26弄3号
76 prop_火柴 火柴 [#texture=c02/火柴.png]
77 prop_火柴_说明 盒里还剩下很多根,稍微有些受潮 [#texture=c02/火柴.png]
78 prop_小猫玩具的脑袋 小猫玩具的脑袋 [#texture=c02/新小猫头.png]

View File

@ -8,7 +8,7 @@
笔记 [ID:ux_panel_笔记]
设置 [ID:ux_panel_设置]
返回主菜单 [ID:ux_panel_返回主菜单]
退出 [ID:ux_panel_退出]
退出游戏 [ID:ux_panel_退出游戏]
总音量[ID:setting_总音量]
音效音量[ID:setting_音效音量]
@ -68,13 +68,13 @@
信碎片(一) [#texture=c01/信件左上.png] [ID:prop_信碎片1]
浦育院院长秦阳 [ID:prop_信碎片1_说明]
信碎片(二) [#texture=c01/信件右上.png] [ID:prop_信碎片2]
民国21年11月20日 [ID:prop_信碎片2_说明]
民国二十一年十月十五日 [ID:prop_信碎片2_说明]
银元 [#texture=c01/银元.png] [ID:prop_银元]
一枚“袁大头”银元,中华民国十年造。 [ID:prop_银元_说明]
# 重要物品
院长的信 [#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png] [ID:prop_院长的信]
浦育院院长秦阳<br>民国21年11月20日<br>致吕萍:<br>你现下境况如何?<br>你虽离开浦育院已久,但我始终没有忘记为你祈祷。<br>愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。<br>你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。<br>若有闲暇,欢迎你回浦育院看看。<br>院长童玉君<br>民国十九年十月十五日<br>公寓地址 芦昌路26弄3号 [ID:prop_院长的信_说明]
浦育院院长秦阳<br>致吕萍:<br>你现下境况如何?<br>你虽离开浦育院已久,但我始终没有忘记为你祈祷。<br>愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。<br>你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。<br>若有闲暇,欢迎你回浦育院看看。<br>院长童玉君<br>民国二十一年十月十五日<br>公寓地址 芦昌路26弄3号 [ID:prop_院长的信_说明]
# c02
火柴 [#texture=c02/火柴.png] [ID:prop_火柴]

View File

@ -79,16 +79,13 @@ func _dean_flip_book() -> void:
# 在游戏开始前,更早的对话
func pre_game_intro():
SceneManager.freeze_player(0)
DialogueManager.dialogue_ended.connect(_on_pre_game_intro_finished, CONNECT_ONE_SHOT)
var camera = SceneManager.get_camera_marker() as CameraFocusMarker
camera.tween_zoom(1.5, 3.0)
var p = $"../DeployLayer/四小孩画鬼差的对话ambush/FocusPoint"
camera.focus_node(p, 3.0)
await get_tree().create_timer(1.5).timeout
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s06_四个小孩画鬼差的对话")
func _on_pre_game_intro_finished(_res):
await DialogueManager.dialogue_ended
# 重置镜头
SceneManager.focus_player_and_reset_zoom(2.5)
await get_tree().create_timer(1.5).timeout

View File

@ -90,13 +90,10 @@ func _on_envolope_table_interacted() -> void:
func first_enter_door() -> void:
await get_tree().create_timer(2.).timeout
SceneManager.freeze_player(0)
await get_tree().create_timer(1.5).timeout
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s08_书店进门老板台词")
DialogueManager.dialogue_ended.connect(_on_dialogue_ended, CONNECT_ONE_SHOT)
func _on_dialogue_ended(_res) -> void:
await DialogueManager.dialogue_ended
SceneManager.release_player()
@ -106,7 +103,8 @@ func assign_tasks() -> void:
await get_tree().create_timer(4.5).timeout
$"放报纸音效".play()
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s08_书店老板任务")
DialogueManager.dialogue_ended.connect(_on_dialogue_ended, CONNECT_ONE_SHOT)
await DialogueManager.dialogue_ended
SceneManager.release_player()
ladder.enabled = true
envolope_table.enabled = true

View File

@ -69,16 +69,11 @@ func _intro_dialog() -> void:
func ambush_begger_interacted():
begger.play("杂戏团夜晚_小孩放下碗")
SceneManager.freeze_player(0)
SceneManager.lock_player(0)
await get_tree().create_timer(1.).timeout
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s12_小孩放下碗")
DialogueManager.dialogue_ended.connect(
_on_ambush_begger_interacted_dialogue_ended, CONNECT_ONE_SHOT
)
func _on_ambush_begger_interacted_dialogue_ended(_res) -> void:
SceneManager.release_player()
await DialogueManager.dialogue_ended
SceneManager.unlock_player()
interactable_bowl.enabled = true

View File

@ -170,6 +170,7 @@ layout_mode = 2
text = "ui_秒"
[node name="GridContainer" type="GridContainer" parent="PanelContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 32)
layout_mode = 2
size_flags_horizontal = 4
columns = 2
@ -196,9 +197,11 @@ focus_previous = NodePath("../FullscreenBox")
text = "setting_窗口置顶"
[node name="HSeparator3" type="HSeparator" parent="PanelContainer/VBoxContainer"]
visible = false
layout_mode = 2
[node name="HBoxContainer3" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
visible = false
custom_minimum_size = Vector2(0, 35)
layout_mode = 2

View File

@ -1,17 +1,38 @@
extends CanvasLayer
# 继续 笔记 设置 返回主菜单 退出游戏
@onready var continue_btn = %"继续" as Button
@onready var note_btn = %"笔记" as Button
@onready var settings_btn = %"设置" as Button
@onready var main_menu_btn = %"返回主菜单" as Button
@onready var quit_btn = %"退出游戏" as Button
func _ready() -> void:
$SfxOpen.play()
layer = GlobalConfig.CANVAS_LAYER_UX_PANEL
SceneManager.toggle_pause_counter(true)
continue_btn.pressed.connect(quit)
note_btn.pressed.connect(SceneManager.show_note)
settings_btn.pressed.connect(SceneManager.show_settings)
main_menu_btn.pressed.connect(SceneManager.checkout_index_page)
quit_btn.pressed.connect(_quit_game)
func _quit_game() -> void:
# 从 ArchiveManager 处理退出信号
ArchiveManager.notification(NOTIFICATION_WM_CLOSE_REQUEST)
# 退出游戏过程隐藏界面
# 隐藏 panel
quit()
func quit():
$SfxOpen.global_play()
SceneManager.toggle_pause_counter(false)
queue_free()
func _unhandled_input(event: InputEvent) -> void:
# panel 界面接受所有输入事件
get_viewport().set_input_as_handled()
if (
event.is_action_pressed("cancel")
or event.is_action_pressed("escape")
):
SceneManager.toggle_pause_counter(false)
queue_free()
if event.is_action_pressed("cancel") or event.is_action_pressed("escape"):
quit()

View File

@ -1,16 +1,39 @@
[gd_scene load_steps=6 format=3 uid="uid://ddlwnsccsmr8u"]
[gd_scene load_steps=11 format=3 uid="uid://ddlwnsccsmr8u"]
[ext_resource type="Script" uid="uid://bo0i4wlcgmax2" path="res://scene/ux/panel/ux_panel.gd" id="1_8dnsb"]
[ext_resource type="Texture2D" uid="uid://bi7l47cit2xs" path="res://asset/art/ui/ux_panel/完整背景.png" id="2_5mits"]
[ext_resource type="AudioStream" uid="uid://dyjifofhdx25w" path="res://asset/audio/sfx/交互/打开背包.wav" id="2_v1oku"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="3_a3uyd"]
[ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/inspect/inspect特写通用遮罩.png" id="3_mns6r"]
[ext_resource type="FontFile" uid="uid://255whp7fuig5" path="res://asset/font/字体/三极行楷简体-粗.ttf" id="4_mns6r"]
[ext_resource type="AudioStream" uid="uid://bghyinc16m1nx" path="res://asset/audio/sfx/交互/收起背包.wav" id="4_ombcf"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nw7ig"]
[sub_resource type="StyleBoxLine" id="StyleBoxLine_v1oku"]
color = Color(0.710047, 0.710047, 0.710047, 1)
[sub_resource type="StyleBoxLine" id="StyleBoxLine_a3uyd"]
color = Color(1, 1, 1, 1)
[node name="UxPanel" type="CanvasLayer"]
process_mode = 3
script = ExtResource("1_8dnsb")
[node name="SfxOpen" type="AudioStreamPlayer" parent="."]
process_mode = 1
stream = ExtResource("2_v1oku")
bus = &"game_sfx"
script = ExtResource("3_a3uyd")
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="SfxClose" type="AudioStreamPlayer" parent="."]
process_mode = 1
stream = ExtResource("4_ombcf")
bus = &"game_sfx"
script = ExtResource("3_a3uyd")
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="Bag" type="Panel" parent="."]
custom_minimum_size = Vector2(564, 240)
anchors_preset = 15
@ -40,57 +63,98 @@ grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("3_mns6r")
[node name="继续" type="Button" parent="Bag"]
[node name="MarginContainer" type="MarginContainer" parent="Bag"]
layout_mode = 0
offset_left = 44.0
offset_top = 88.0
offset_right = 191.0
offset_bottom = 122.0
offset_left = 43.0
offset_top = 81.0
offset_right = 203.0
offset_bottom = 121.0
metadata/_edit_use_anchors_ = true
[node name="继续" type="Button" parent="Bag/MarginContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 20)
layout_mode = 2
size_flags_horizontal = 4
theme_override_fonts/font = ExtResource("4_mns6r")
theme_override_font_sizes/font_size = 26
theme_override_font_sizes/font_size = 23
theme_override_styles/hover = SubResource("StyleBoxLine_v1oku")
theme_override_styles/pressed = SubResource("StyleBoxLine_a3uyd")
text = "ux_panel_继续"
flat = true
[node name="笔记" type="Button" parent="Bag"]
[node name="MarginContainer2" type="MarginContainer" parent="Bag"]
layout_mode = 0
offset_left = 123.0
offset_top = 119.0
offset_right = 270.0
offset_bottom = 153.0
offset_left = 119.0
offset_top = 124.0
offset_right = 279.0
offset_bottom = 164.0
[node name="笔记" type="Button" parent="Bag/MarginContainer2"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 20)
layout_mode = 2
size_flags_horizontal = 4
theme_override_fonts/font = ExtResource("4_mns6r")
theme_override_font_sizes/font_size = 26
theme_override_font_sizes/font_size = 23
theme_override_styles/hover = SubResource("StyleBoxLine_v1oku")
theme_override_styles/pressed = SubResource("StyleBoxLine_a3uyd")
text = "ux_panel_笔记"
flat = true
[node name="设置" type="Button" parent="Bag"]
[node name="MarginContainer3" type="MarginContainer" parent="Bag"]
layout_mode = 0
offset_left = 203.0
offset_top = 107.0
offset_right = 383.0
offset_bottom = 147.0
offset_left = 222.0
offset_top = 108.0
offset_right = 382.0
offset_bottom = 148.0
[node name="设置" type="Button" parent="Bag/MarginContainer3"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 20)
layout_mode = 2
size_flags_horizontal = 4
theme_override_fonts/font = ExtResource("4_mns6r")
theme_override_font_sizes/font_size = 26
theme_override_font_sizes/font_size = 23
theme_override_styles/hover = SubResource("StyleBoxLine_v1oku")
theme_override_styles/pressed = SubResource("StyleBoxLine_a3uyd")
text = "ux_panel_设置"
flat = true
[node name="返回主菜单" type="Button" parent="Bag"]
[node name="MarginContainer4" type="MarginContainer" parent="Bag"]
layout_mode = 0
offset_left = 279.0
offset_top = 161.0
offset_right = 489.0
offset_bottom = 195.0
offset_left = 266.0
offset_top = 164.0
offset_right = 495.0
offset_bottom = 204.0
[node name="返回主菜单" type="Button" parent="Bag/MarginContainer4"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 20)
layout_mode = 2
size_flags_horizontal = 4
theme_override_fonts/font = ExtResource("4_mns6r")
theme_override_font_sizes/font_size = 26
theme_override_font_sizes/font_size = 23
theme_override_styles/hover = SubResource("StyleBoxLine_v1oku")
theme_override_styles/pressed = SubResource("StyleBoxLine_a3uyd")
text = "ux_panel_返回主菜单"
flat = true
[node name="退出" type="Button" parent="Bag"]
[node name="MarginContainer5" type="MarginContainer" parent="Bag"]
layout_mode = 0
offset_left = 383.0
offset_top = 124.0
offset_right = 563.0
offset_bottom = 164.0
offset_left = 384.0
offset_top = 135.0
offset_right = 590.0
offset_bottom = 175.0
[node name="退出游戏" type="Button" parent="Bag/MarginContainer5"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 20)
layout_mode = 2
size_flags_horizontal = 4
theme_override_fonts/font = ExtResource("4_mns6r")
theme_override_font_sizes/font_size = 26
text = "ux_panel_退出"
theme_override_font_sizes/font_size = 23
theme_override_styles/hover = SubResource("StyleBoxLine_v1oku")
theme_override_styles/pressed = SubResource("StyleBoxLine_a3uyd")
text = "ux_panel_退出游戏"
flat = true