
Lv.1
以后我继续叫明星喵!
签名:已退猫 B站同名 uid:512878896 QQ:不再在此平台公布,请前往b站 看什么看 鸡你太美 啊啊啊! 算了 --------------------------------
在 求Box3地图和pvp代码 中回复
//一个简单的射击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;2020-04-15T13:46:32 点赞:0
在 【Box3科普帖】满满的干货及喵代码,快来看看 中回复
顶
要顶
必须顶
不得不顶
用尽全力顶
再加上千斤顶
总之把它顶到顶
接着使出葵花宝顶
就算顶到史前也要顶
老子看了会用道德经顶
孔子亲自拜你为师天天顶
秦始皇站在阿房宫上使劲顶
汉高祖挥师杀向东罗马为你顶
吕布抛弃了貂禅而选择了帮你顶
汉高祖挥师杀向东罗马为你顶
秦始皇站在阿房宫上使劲顶
孔子亲自拜你为师天天顶
老子看了会用道德经顶
就算顶到史前也要顶
接着使出葵花宝顶
总之把它顶到顶
再加上千斤顶
用尽全力顶
不得不顶
必须顶
要顶
顶
2020-04-15T13:51:58 点赞:0
在 [教程]如何做出像故宫开车一样的变身效果 中回复
//选中所有带有标签target的实体,并遍历循环.
world.querySelectorAll('.target').forEach((e)=>{
e.onEntityContact(({entity,other})=>{ //设置目标模型的碰撞事件.
if(!other.isPlayer){return} //防止非玩家实体参与检测.
other.mesh=entity.mesh; //设置玩家的外观.
other.meshScale=entity.meshScale; //设置玩家外观缩放比例.
other.player.invisible=true; //如果模型比玩家小,就需要隐藏玩家的皮肤.
})
})2020-04-15T13:53:43 点赞:0