猫史档案馆


代码又双错了!!!

用户:不喝只因汤的屑嘶令不喝只因汤的屑嘶令查看:0 回复:0 评论:0 创建时间:2022-08-18T17:46:56


world.onDie(async({entity})=>{ if(!entity.isPlayer)return; entity.player.onPress(({button})=>{//每当有按钮被按下 if(button==Box3ButtonType.ACTION1){//如果按钮是右键 constentity=awaitentity.player.dialog({ type:Box3DialogType.SELECT, title:"", titleTextColor:newBox3RGBAColor(0,0,0,1), titleBackgroundColor:newBox3RGBAColor(0.968,0.702,0.392,1), content:`${entity.player.name}选择你的复活方式`, options:['使用金币','60秒后复活','花费200经验','复活药水'],//将提供玩家选择的选项放入数组里。 contentTextColor:newBox3RGBAColor(0,0,0,1), contentBackgroundColor:newBox3RGBAColor(1,1,1,1), lookEye:entity.position.add(entity.player.facingDirection.scale(5)), lookTarget:entity, }); //判断玩家选了什么选项。 switch(result.index){ case0: world.say('dd1') break; case1: for(lett=1;t<=61;t++){ entity.player.directMessage(`倒计时${String(5-t)}秒后复活`); awaitsleep(1000); entity.player.forceRespawn();//让玩家重生 } }; break; }; }); 我一阵瞎改,代码又双坏了,求大神指点!!!! imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E6%90%93%E5%A4%B4.gif"alt="emotion_编程猫_搓头"


回复

上一页1 页 / 共 0下一页