From 1ea54de4509df04c53f375dfbe12d6befacf21d2 Mon Sep 17 00:00:00 2001 From: cakipaul Date: Thu, 10 Jul 2025 13:25:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20npc=20=E5=90=B8=E9=99=84?= =?UTF-8?q?=E5=90=8E=E7=9A=84=20speaking=20=E7=8A=B6=E6=80=81=E6=9C=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9B=E5=8D=95=E4=B8=80app=E5=90=AF?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.godot | 5 ----- scene/entity/npc.gd | 10 ++++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/project.godot b/project.godot index bdf5af67..c1d437a8 100644 --- a/project.godot +++ b/project.godot @@ -87,11 +87,6 @@ window/subwindows/embed_subwindows=false window/stretch/mode="canvas_items" window/per_pixel_transparency/allowed=true -[editor] - -version_control/plugin_name="GitPlugin" -version_control/autoload_on_startup=true - [editor_plugins] enabled=PackedStringArray("res://addons/debug_menu/plugin.cfg", "res://addons/dialogue_manager/plugin.cfg", "res://addons/gif-importer/plugin.cfg", "res://addons/project-statistics/plugin.cfg", "res://addons/property-inspector/plugin.cfg") diff --git a/scene/entity/npc.gd b/scene/entity/npc.gd index 94a2884a..1e57d9ec 100644 --- a/scene/entity/npc.gd +++ b/scene/entity/npc.gd @@ -69,6 +69,7 @@ var speaking_sign_mode := 0: speaking_sign_tween = create_tween() if val == 0: speaking_sign_tween.tween_property(speaking_sign, "modulate:a", 0.0, 0.3) + speaking_animation.stop() elif val == 1: speaking_sign_tween.tween_property(speaking_sign, "modulate", base_mod, 0.3) speaking_sign_tween.parallel().tween_property( @@ -133,10 +134,10 @@ func _align_signs_status(): func _on_toggle_active(activated: bool) -> void: - if activated and speaking_sign_mode == 0: - speaking_sign_mode = 1 - elif not activated and speaking_sign_mode > 0: + if not activated: speaking_sign_mode = 0 + elif speaking_sign_mode == 0: + speaking_sign_mode = 1 func _on_interacted() -> void: @@ -147,9 +148,10 @@ func _on_interacted() -> void: ground_archive.set_pair(name, "icount", icount) DialogueManager.show_dialogue_balloon(dialogue_res, dialogue_title) interacted.emit() + var out_of_range = speaking_sign_mode == 0 speaking_sign_mode = 2 await DialogueManager.dialogue_ended - speaking_sign_mode = 1 + speaking_sign_mode = 0 if out_of_range else 1 # 在 unlock 之前发射 talk_finished.emit() SceneManager.unlock_player()