猫史档案馆


为什么我按鼠标右键不打开背包

用户:烨烨小栗子烨烨小栗子查看: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}]`)
        }
    })
})


回复

上一页1 页 / 共 1下一页
安静的疾风雀G7gi安静的疾风雀G7gi

textdialog函数是吉吉喵自己定义的函数,对话框请参考下面的链接:https://docs.box3.codemao.cn/box3dialogcall.html#box3inputdialogparams

点赞0


评论


egg鸡蛋蛋egg鸡蛋蛋

textDialog

不是Box3Entity

你这个是从哪里复制的吧

textDialog

这个是一个定义的函数

应该用这个

const result = await entity.player.dialog({
        type: Box3DialogType.INPUT,
        title: "吉吉喵",
        content: `${entity.player.name},你知道进入隐藏地图的暗号吗?`,
        confirmText: '确定', // 确定按钮上面的文字。按下确定按钮后,提交回答。
        placeholder: '据说,是一个非常可爱的称呼。', // 输入框背景上的提示文字
    });

点赞0


评论


云裳ovo云裳ovo

63905

点赞0


评论