Lv.1
在 代码岛3.0围棋大赛 - 代码揭秘! 中回复
// 下棋处理
const removeTips = [false, false];
world.onPress(({ entity, button, raycast:{ hitPosition:{x, y, z}, hitEntity } }) => {
if (gameState === 'play') { // 正常落子
// 对局
if (button !== 'action0' || // 判断按钮
这样就可以使用enableActionA了?和action0一样?
2020-06-11T13:35:56 点赞:0
在 岛3作品招人 中回复
试试
world.querySelectorAll("彩蛋").forEach((e)=>e.onEntityContact(({entity,other})=>{
if(!other.isPlayer){return;}
world.say(entity.player.name+"找到了彩蛋,获得隐身buff");
}));2020-06-11T19:36:38 点赞:0
在 岛3作品招人 中回复
代码错误1.forEach后面的e没打括号。
2.倒数第二行不是entity.player.name。
再简单一点……试试可不可以吧……
world.querySelectorAll(".彩蛋").onEntityContact(({entity,other})=>{
if(!other.isPlayer){return;}
other.player.invisible=true;
world.say(other.player.name+"找到了彩蛋,获得隐身buff");
});2020-06-12T13:35:10 点赞:0