feat: add nearby social interactions

This commit is contained in:
ANG-Server
2026-07-21 22:19:41 +08:00
parent 0bab768b14
commit 9dee47492c
43 changed files with 1499 additions and 77 deletions

View File

@@ -125,6 +125,7 @@ var _send_failure_handled_by_ui: bool = false
# 准备就绪
func _ready() -> void:
add_to_group("whaletown_escape_dismissible")
_configure_mouse_focus()
# 初始隐藏聊天框
@@ -182,6 +183,8 @@ func _get_settings_manager() -> Node:
# 处理全局输入
func _input(event: InputEvent) -> void:
if get_viewport().is_input_handled():
return
if event is InputEventMouseButton:
_handle_global_mouse_button_input(event as InputEventMouseButton)
return
@@ -366,6 +369,15 @@ func hide_chat(immediate: bool = false) -> void:
_transition_tween.tween_property(chat_panel, "modulate:a", 0.0, CHAT_TRANSITION_DURATION)
_transition_tween.finished.connect(_on_hide_transition_finished)
func is_escape_dismissible() -> bool:
return _is_chat_visible
func get_escape_priority() -> int:
return 480
func request_escape_close() -> void:
hide_chat()
# 创建隐藏计时器
func _create_hide_timer() -> void:
_hide_timer = Timer.new()