用户:
烨烨小栗子查看:1 回复:3 评论:1 创建时间:2021-12-25T11:10:56
world.onPlayerJoin(({entity}) => { //
entity.junk = 0 //
entity.money = 0 //
entity.itemLisL = [] //
entity.player.onPress(({ button }) => {
if (button == Box3AssetType.ACTION1) {
textDialog(entity, `你身上有:\n\n${entity.money}元, ${entity.junk}个废品\n道具: [${entity.itemLisL}]`)
}
})
})
world.onPlayerJoin(({entity}) => { //
entity.junk = 0 //
entity.money = 0 //
entity.itemLisL = [] //
entity.player.onPress(({ button }) => {
if (button == Box3AssetType.ACTION1) {
textDialog(entity, `你身上有:\n\n${entity.money}元, ${entity.junk}个废品\n道具: [${entity.itemLisL}]`)
}
})
})textdialog函数是吉吉喵自己定义的函数,对话框请参考下面的链接:https://docs.box3.codemao.cn/box3dialogcall.html#box3inputdialogparams
点赞0
评论
egg鸡蛋蛋textDialog
不是Box3Entity
你这个是从哪里复制的吧
textDialog
这个是一个定义的函数
应该用这个
const result = await entity.player.dialog({
type: Box3DialogType.INPUT,
title: "吉吉喵",
content: `${entity.player.name},你知道进入隐藏地图的暗号吗?`,
confirmText: '确定', // 确定按钮上面的文字。按下确定按钮后,提交回答。
placeholder: '据说,是一个非常可爱的称呼。', // 输入框背景上的提示文字
});点赞0
评论