Lv.1
果汁游戏,天下无敌。
签名:23333333
在 寻求帮助!!! 中回复
https://box3create.codemao.cn/games/eb3d959348e4dc784446
我们现在再造一个新地图
2020-11-05T17:18:04 点赞:0
在 ========注意!!果汁城市二招人了======== 中回复
https://box3.codemao.cn/e/eb3d959348e4dc784446
2021-01-10T20:07:24 点赞:0
在 求助box3 中回复
// 先在场景中放置一个名称为 NPC 的实体。
c喵t npc = world.querySelector('.马桶');
npc.enableInteract = true; // 允许进行互动
npc.interactRadius = 5; // 实体的互动范围
npc.interactHint = npc.id; // 互动提示框显示实体的名称
npc.interactColor = new Box3RGBColor(1,0,1); // 互动提示的文字颜色
// 玩家与实体进行交互时触发
npc.onInteract(async({entity}) => {
c喵t result = await entity.player.dialog({
type: Box3DialogType.TEXT, // 对话框的类型,TEXT是文本框。
title: npc.id, // 对话框标题为NPC名字,表示正在说话的是NPC
lookEye: entity, // 将相机放在玩家位置
lookTarget: npc, // 相机镜头对准NPC
content: `你好,${entity.player.name},很高兴认识你。`,
});
});2021-07-27T12:26:01 点赞:0