Lv.1
皮卡丘冫果汁(XCL)的小号之一(ID比主号都早)
在 互动的代码 中回复
// 先在场景中放置一个名称为 NPC 的实体。
const npc = world.querySelector('#NPC');
npc.enableInteract = true; // 允许进行互动
npc.interactRadius = 16; // 实体的互动范围
npc.interactHint = npc.id; // 互动提示框显示实体的名称
npc.interactColor = new Box3RGBColor(1,0,1); // 互动提示的文字颜色
// 玩家与实体进行交互时触发
npc.onInteract(async({entity}) => {
const result = await entity.player.dialog({
type: Box3DialogType.TEXT, // 对话框的类型,TEXT是文本框。
title: npc.id, // 对话框标题为NPC名字,表示正在说话的是NPC
lookEye: entity, // 将相机放在玩家位置
lookTarget: npc, // 相机镜头对准NPC
content: `你好,${entity.player.name},很高兴认识你。`,
});
});
2022-01-01T20:47:30 点赞:0
在 互动的代码 中回复
// 先在场景中放置一个名称为 NPC 的实体。
const npc = world.querySelector('#NPC');
npc.enableInteract = true; // 允许进行互动
npc.interactRadius = 16; // 实体的互动范围
npc.interactHint = npc.id; // 互动提示框显示实体的名称
npc.interactColor = new Box3RGBColor(1,0,1); // 互动提示的文字颜色
// 玩家与实体进行交互时触发
npc.onInteract(async({entity}) => {
const result = await entity.player.dialog({
type: Box3DialogType.TEXT, // 对话框的类型,TEXT是文本框。
title: npc.id, // 对话框标题为NPC名字,表示正在说话的是NPC
content: `你好,${entity.player.name},很高兴认识你。`,
});
});
2022-01-01T20:49:11 点赞:0
在 关于加强神奇代码岛不良风气监管的公告 中回复
不吵架!恶语伤人太吵闹,谁吵谁就学猫叫。
不恋 爱!这是学习的平台,谁想看你秀恩爱?
不毁图!创作地图很辛苦,莫把信任都辜负。
不刷屏!别人都是顶呱呱,你除刷屏还会啥?
2022-01-10T20:04:27 点赞:5