
Lv.1
yeeeeeeeeee
在 【代码教程】制作一个彩蛋(?) 中回复
for (const mb of world.querySelectorAll('.你被喵了')) {// 模型标签
mb.enableInteract = true;// 互动开启
mb.interactRadius = 3;// 互动距离
mb.onInteract(async ({ entity }) => {
const Quatduiwuu = new Box3Quaternion(0, 0, 0, -1);// 旋转
const budPos = mb.position;
const tgPos = entity.position;
const xDiff = (tgPos.x - budPos.x);
const zDiff = (tgPos.z - budPos.z);
mb.meshOrientation = Quatduiwuu.rotateY(Math.atan2(zDiff, xDiff));
entity.player.dialog({
type : 'text',
title : '彩蛋',// title说话的人()
content : '恭喜你找到了彩蛋!!!',// 文本框()
});
await sleep(5000);// 等待()1秒=1000毫秒()
entity.player.link('https://www.bilibili.com/video/BV1va411w7aM/', {// 彩蛋内容
isConfirm: false, isNewTab: false,// 关闭窗口()
});
});
};
2023-04-09T07:59:49 点赞:2