用户:
帅气的导弹鲨leZl查看:3 回复:3 评论:3 创建时间:2022-08-15T20:37:42
world.onPlayerJoin(async({entity})=>{ entity.position.copy(one.position) entity.num = 1 main(entity) })
const one = world.querySelector("#出生点-1") const two = world.querySelector("#出生点-2") const three = world.querySelector("#出生点-3")
one.collides = true; one.fixed = true; two.collides = true; two.fixed = true; three.fixed = true; three.collides = true;
world.onEntityContact(async({entity, other})=>{ if (entity.id == "出生点-2"){ entity.num = 2 other.player.directMessage("存档成功") console.log(entity.num) } if (entity.id == "出生点-3"){ entity.num = 3 other.player.directMessage("存档成功") console.log(entity.num) } if (entity.id == "出生点-1"){ entity.num = 1 other.player.directMessage("存档成功") console.log(entity.num) } })
codewyxentity.num = 2;entity.num = 3× entity.num== 2;entity.num ==3√ =是赋值,==才是比较等于 可以从这里学习:www.w3school.com.cn/js/js_operators.asp
点赞0
评论