用户:
杏花无处微雨查看:0 回复:2 评论:0 创建时间:2022-04-14T19:06:44
world.onPlayerJoin(({ entity }) => { entity.enableDamage = true; entity.player.onPress(({ button, raycast: { hitEntity, direction } }) => { if (button !== 'action0' || !hitEntity) { return; } hitEntity.velocity.x += direction.x; hitEntity.velocity.y += 0.3; hitEntity.velocity.z += direction.z; hitEntity.hurt(10 * Math.random() + 10, { attacker: entity, }); }); });
world.onDie(({ entity, attacker }) => { if (attacker) { world.say(attacker.player.name + '击杀 ' + entity.player.name) } entity.player.forceRespawn(); })
Robot一只屑代码师world.onPlayerJoin(({ entity }) => { entity.enableDamage = true; entity.player.onPress(({ button, raycast: { hitEntity, direction } }) => { if (button !== 'action0' || !hitEntity) { return; } hitEntity.velocity.x += direction.x; hitEntity.velocity.y += 0.3; hitEntity.velocity.z += direction.z; hitEntity.hurt(10 * Math.random() + 10, { attacker: entity, }); }); });
world.onDie(({ entity, attacker }) => { if (attacker) { world.say(attacker.player.name + '击杀 ' + entity.player.name) } entity.player.forceRespawn(); })点赞0
评论