用户:
Robot一只屑代码师查看:3 回复:2 评论:3 创建时间:2022-04-11T12:04:47
怎么碰到模型就喵,,,求助啊!()
world.onEntityContact(async({ other }) => {
if(other.isPlayer) {//如果另一个碰撞体是玩家
other.enableDamage = true;//开启伤害
other.hurt(100);//玩家收到100点伤害
await sleep(2000);//等待两秒
other.player.forceRespawn();//复活
}
})点赞0
评论