Files
whale-town-front/scenes/prefabs/items/WelcomeBoard.gd
2026-02-07 14:11:00 +08:00

14 lines
427 B
GDScript

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