用户:
404room查看:0 回复:1 评论:0 创建时间:2021-05-04T10:16:31
【求助】box3的选择对话框中的的选择对话框 我是想要一个选择某一项后又跳出一个选择对话框,自己尝试写了一下,要不是第2个不显示,要不就是第二个显示了,但选项无效,贴上代码1: world.onPress(({button,entity})=>{ if(button===Box3ButtonType.CROUCH){ constshua=entity.player.dialog({ type:Box3DialogType.SELECT, title:"物品提示", content:`你有:\n${entity.wood}个木头\n${entity.ston}个石头\n${entity.tu}个泥土\n以及\n${entity.bag}`, options:['保存','制作合成站','切换手持物'], }) if(shua.index==2){ constshub=entity.player.dialog({ type:Box3DialogType.SELECT, title:"物品提示", content:`请选择`, options:['木头','石头','泥土','空手'], }) if(shub.index==0){ entity.sc=1; } if(shub.index==1){ entity.sc=2; } if(shub.index==2){ entity.sc=3; } if(shub.index==3){ entity.sc=0; } } } }) 此外,我还试过循环法、函数法