用户:
全能代码师查看:0 回复:2 评论:0 创建时间:2021-09-03T20:03:13
async function textDialog(entity, content, title) {
for (let i = 0; i < content.length + 1; i++) {
var text = ''
for (let j = 0; j < i; j++) {
text += `${content[j]}`
}
var a = entity.player.dialog({ //弹出对话框
type: Box3DialogType.TEXT, //对话框类型为纯文本
content: text, //文本内容
title, //对话框左上角标题内容
})
await sleep(200)
if (i == content.length) {
await sleep(2000)
}
a.cancel()
}
}