猫史档案馆


求助!!! 谁会喵战的PVP

用户:哈利波特_哈利波特_查看:6 回复:4 评论:6 创建时间:2020-04-26T15:52:48


各位编程大佬求助,会的点网址即可https://box3create.codemao.cn/games/eabdf856f03b17e54486


回复

上一页1 页 / 共 1下一页
hecoshecos

emmmm

 

点赞0


评论


J_K_Hermione_build白泽J_K_Hermione_build白泽

我可以建筑,也可以代码,我会pvp

点赞0


评论


TLOCKTLOCK

我会

点赞0


评论


小乐ZOWX小乐ZOWX

//一个简单的射击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(2 * Math.random() + 1, {
attacker: entity,
});
});
});

world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' killed ' + entity.player.name)
}
entity.player.forceRespawn();
});
undefined;

点赞0


评论