用户:
老李头13zl查看:1 回复:2 评论:1 创建时间:2023-02-14T18:12:57
world.onPlayerJoin(({entity, other}) => {
for(e of world.querySelectorAll('.行李')) {
e.onEntityContact((entity, other) => {
if(entity == world.querySelector('.行李') && other == world.querySelector('#吉普车-1')){
console.log('tick')
if(Math.round(Math.random()*1)){
e.positon.set(32,19,247)
} else {
e.posiotn.set(4,19,244)
}
}
})
}
})
我想让当
带有标签为行李的碰到了
名字为吉普车-1时
将带有标签为行李的实体
传到指定位置
求解答!!!