用户:
幻影游船查看:0 回复:1 评论:0 创建时间:2023-06-25T19:23:55
const s = world.querySelector('#传送门');
s.enableInteract = true; // 允许进行互动
s.interactRadius = 5; // 实体的互动范围
s.interactHint = '传送门'; // 互动提示框显示实体的名称
s.interactColor = new Box3RGBColor(1,0,1); // 互动提示的文字颜色
s.onInteract(async({entity}) => {
const a = await entity.player.dialog({
type: Box3DialogType.SELECT,
content: `
你要去哪???
`,
options: ['武馆'],
})
if (!a || a === null) {
return;
}
if(a.value == '武馆') {
entity.position.set(27,13,17);
}
})