用户:让一下老年人查看:28 回复:10 评论:28 创建时间:2020-04-04T17:01:44
你还在为没有权限而烦恼吗?
你还在为你的代码编程技术没有用武之地而烦恼吗?
进来!!!
这里有优越的待遇,
还有丰厚的报酬!
要求:对JS与岛3熟悉,我要的代码是团队对抗的代码,有意者留言!!!
_Rise_突然想起我还没给你攻击代码
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.5;
hitEntity.velocity.z += direction.z;
hitEntity.hurt(20 * Math.random() + 5, {
attacker: entity,
});
});
});
world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' killed ' + entity.player.name)
}
entity.player.forceRespawn();
});点赞0
评论