猫史档案馆


npc问题:出现这个是咋回事?

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


center_image

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


回复

上一页1 页 / 共 1下一页
USS繁星USS繁星

链接给我

点赞0


评论


yee剑走天下yee剑走天下

。?报错截屏截上面一点啊

点赞0


评论