用户:
hanabi花火查看:0 回复:3 评论:0 创建时间:2021-07-25T19:25:52
如何设置:当玩家碰到模型时,给玩家加分。 和 当玩家按下右键时,查看分数。 ?
星辰Lolitaworld.onPlayerJoin(({entity})=>{
entity.point = 0;
entity.onEntityContact(({other})=>{
if(!other.isPlayer){
other.point++;
}
})
entity.player.onPress(({button})=>{
if(button == 'action1'){
entity.player.directMessage('当前分数:' + entity.point);
}
})
})点赞0
评论