From 214918423d2e9d7ee187a86a5668894f2a6a7e54 Mon Sep 17 00:00:00 2001 From: cakipaul Date: Wed, 16 Jul 2025 16:42:59 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BC=98=E5=8C=96balloon=E5=9C=A8=E6=B8=B8?= =?UTF-8?q?=E6=88=8F/=E5=9B=9E=E5=BF=86=E7=9A=84=E4=B8=8D=E5=90=8Clayer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/config_manager/global_config.gd | 5 +++-- scene/dialog/balloon.gd | 2 +- scene/ux/memory/clips/clip1.gd | 2 +- scene/ux/memory/clips/clip2.gd | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/manager/config_manager/global_config.gd b/manager/config_manager/global_config.gd index a51b395c..f080e3a7 100644 --- a/manager/config_manager/global_config.gd +++ b/manager/config_manager/global_config.gd @@ -15,8 +15,9 @@ const CANVAS_LAYER_SETTINGS = 30 const CANVAS_LAYER_NOTE = 25 const CANVAS_LAYER_MEM_ITEM = 23 const CANVAS_LAYER_UX_PANEL = 22 -# dialog -const CANVAS_LAYER_DIALOG_MEM = 30 +# dialog 在游戏场景中使用 CANVAS_LAYER_DIALOG +# 在回忆中使用 CANVAS_LAYER_DIALOG_MEM +const CANVAS_LAYER_DIALOG_MEM = 29 const CANVAS_LAYER_DIALOG = 22 # main 场景的 UI 层(prop hud、上下mask、notification) const CANVAS_LAYER_UI = 21 diff --git a/scene/dialog/balloon.gd b/scene/dialog/balloon.gd index 5ce541a3..ad38df94 100755 --- a/scene/dialog/balloon.gd +++ b/scene/dialog/balloon.gd @@ -154,7 +154,7 @@ func start( dialogue_resource: DialogueResource, title: String, extra_game_states: Array = [] ) -> void: if extra_game_states.has(GlobalConfig.DIALOG_MEM_LAYER): - pass + layer = GlobalConfig.CANVAS_LAYER_DIALOG_MEM temporary_game_states = [self] + extra_game_states is_waiting_for_input = false resource = dialogue_resource diff --git a/scene/ux/memory/clips/clip1.gd b/scene/ux/memory/clips/clip1.gd index d78f488c..0b743aea 100644 --- a/scene/ux/memory/clips/clip1.gd +++ b/scene/ux/memory/clips/clip1.gd @@ -12,7 +12,7 @@ func run_clip(card_mode: bool): $"李氏赖子房间人影".play() if not card_mode: # 增加配音 - dialog_node = DialogueManager.show_dialogue_balloon(dialogue_c02, "c02_04_李氏癞子") + dialog_node = DialogueManager.show_dialogue_balloon(dialogue_c02, "c02_04_李氏癞子", [GlobalConfig.DIALOG_MEM_LAYER]) dialog_node.process_mode = Node.PROCESS_MODE_ALWAYS await DialogueManager.dialogue_ended display_finished.emit() diff --git a/scene/ux/memory/clips/clip2.gd b/scene/ux/memory/clips/clip2.gd index d1710b56..d0fe5201 100644 --- a/scene/ux/memory/clips/clip2.gd +++ b/scene/ux/memory/clips/clip2.gd @@ -13,7 +13,7 @@ func run_clip(card_mode: bool): if not card_mode: await Util.wait(3.0) # 增加配音 - dialog_node = DialogueManager.show_dialogue_balloon(dialogue_res, "c02_井边疯子对话") + dialog_node = DialogueManager.show_dialogue_balloon(dialogue_res, "c02_井边疯子对话", [GlobalConfig.DIALOG_MEM_LAYER]) dialog_node.process_mode = Node.PROCESS_MODE_ALWAYS await DialogueManager.dialogue_ended display_finished.emit()