Files
whale-town-front/scenes/prefabs/items/NoticeBoard.gd
xiangwang 75eb227b18 feat: 增加通知板场景
- 增加通知板与用户交互,点击E,弹出通知消息
- 预留前端调用后端获取通知的接口,当不可用时,使用mock data
2026-01-11 01:55:19 +08:00

14 lines
348 B
GDScript

extends StaticBody2D
func interact():
print("Interacted with Notice Board")
# Check if dialog already exists
if get_tree().root.has_node("NoticeDialog"):
return
var dialog = preload("res://scenes/ui/notice_dialog.tscn").instantiate()
dialog.name = "NoticeDialog"
get_tree().root.add_child(dialog)
return null # No bubble text needed