用户:
五梦樱川查看:2 回复:2 评论:2 创建时间:2023-08-08T14:53:33

for (const npc of world.querySelectorAll('.npc')) {
npc.enableInteract = true
npc.interactRadius = 4.5
npc.interactHint = npc.id
npc.interactColor.set(0,1,0)
if (npc.id == '李白') {
npc.onInteract(async ({ entity }) => {
textDialog(entity, `你好!`, npc.id)
})
}
}
//报错是未定义textDialog