feat: 增加欢迎板

- 增加欢迎板场景
- 增加与玩家的交互,点击E弹出弹出框
This commit is contained in:
2026-01-11 00:52:43 +08:00
parent 8a5a4a0005
commit 449cd1e8f3
10 changed files with 218 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
extends StaticBody2D
func interact():
# Prevent multiple dialogs
if get_tree().root.has_node("WelcomeDialog"):
return null
# Spawn the Welcome Dialog
var dialog = preload("res://scenes/ui/welcome_dialog.tscn").instantiate()
dialog.name = "WelcomeDialog"
# Add to the Scene Root (World) or CanvasLayer if it has one
get_tree().root.add_child(dialog)
return null # Return null prevents Player from showing a bubble