
Lv.1
这个人很勤奋,什么都写了
签名:写作业写作业写作业写作业写作业写作业 目标:200赞 50收藏 15次在创作 1500次阅览 下面没有了 真没了 结束,就说没有
在 【代码岛3.0绝密文档泄露??!!】谁能破译 中回复
更新代码
WALK='walk',
RUN='run',
CROUCH='crouch',
JUMP='jump',
DOUBLE_JUMP='jump2',
FLY='fly',
ACTION0='action0',
ACTION1='action1'2020-03-13T20:05:17 点赞:0
在 求代码!! 中回复
//一个简单的射击PvP
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 + ' 击杀 ' + entity.player.name+'为他报仇')
}
entity.player.forceRespawn();
});
2020-04-03T19:31:23 点赞:0