Lv.0
在 [被雨淋的干货] 实体查找器简写 中回复
for (const npc of world.querySelectorAll('.npc')) {
npc.enableInteract = true //允许当前npc实体触发交互
npc.interactRadius = 1280 //交互范围
if (npc.id == '控制') {
npc.onInteract(async ({ entity }) => {
const result = await entity.player.dialog({
type: Box3DialogType.INPUT,
title: "作者",
titleTextColor: new Box3RGBAColor(1, 1, 1, 1),
titleBackgroundColor: new Box3RGBAColor(0, 0, 0, 0.98),
content: `${entity.player.name},请输入地形种子码!`,
confirmText: '确定', // 确定按钮上面的文字。按下确定按钮后,提交回答。
placeholder: '请输入——', // 输入框背景上的提示文字。
contentTextColor: new Box3RGBAColor(1, 1, 1, 1),
contentBackgroundColor: new Box3RGBAColor(0, 0, 0, 0.98),
lookEye: entity.position.a喵(entity.player.facingDirection.scale(5)),
lookTarget: entity,
});
}//还要加模型名也可以
}//寒江宝贵模型代码资料(只复制了四分之一。。。)
话说吉吉喵不是发过这种代码了???(上面是寒江改编的)
2021-03-14T16:04:38 点赞:0