猫史档案馆


【岛3】求跑酷的代码(有传送的)

用户:小玥玥小月月小玥玥小月月查看:4 回复:6 评论:4 创建时间:2020-12-25T19:34:06


如题…………………………


回复

上一页1 页 / 共 1下一页
卫道士32_32*2没了卫道士32_32*2没了

有什么报酬

点赞0


评论


迷失冷光迷失冷光

Object.position.set(x,y,z);

点赞0


评论


ICE_NET_沉着的大黄鸡7NCNICE_NET_沉着的大黄鸡7NCN

emmmmmmmmm

一起作图吗????

 

点赞0


评论


氦岸氦岸

一起做地图吗

点赞0


评论


荷花编程荷花编程

world.querySelectorAll('.起点').forEach((e)=>{
    e.meshEmissive=0;
    e.onEntityContact(({entity,other})=>{
        if(other.player.Start==false){
            world.say(other.player.name+'出发了!');
            other.player.Start=true;
            other.player.canFly = false
            other.player.runSpeed = 0.4
            other.player.spawnPoint.copy(other.position);
        }
    })
})
world.querySelectorAll('.存档').forEach((e)=>{
    e.meshEmissive=0;
    e.onEntityContact(({entity,other})=>{
        if(other.player.Start==true){
            world.say(other.player.name+'存档成功!');
            other.player.spawnPoint.copy(other.position);
        }
    })
})
world.querySelectorAll('.终点').forEach((e)=>{
    e.meshEmissive=0;
    e.onEntityContact(({entity,other})=>{
        if(other.player.Start==true){
            world.say(other.player.name+'到达了终点,获得飞行权限!');
            other.player.spawnPoint.copy(other.position);
            other.player.Start = false
            other.player.canFly = true
        }
    })
})

点赞1


评论


卫道士32_32*2没了卫道士32_32*2没了

const quanxian={canFly:true};
world.onPlayerJoin(({entity})=>{
    entity.isRun=false;
    entity.backupPosition=new Box3Vector3(55,55,55);//你的跑酷的初始存档点
});
world.querySelector('.起点').onEntityContact(({entity,other})=>{
    entity.say(`${other.player.name}出发了。`);
    other.isRun=true;
    other.position.copy(other.backupPosition.clone());
});
world.querySelectorAll('.存档点').forEach(x=>{
    x.onEntityContact(({entity,other})=>{
        if(other.isRun){
            entity.say(`${other.player.name}跑到了${x.id}关。`);
            other.backupPosition.copy(new Box3Vector3(other.position.x,other.position.y+other.bounds.y/2,other.position.z));
        }else{
            entity.say(`对付什么呀?!@${other.player.name}重跑吧!`);
            other.position.copy(other.backupPosition);
        }
    });
});
world.querySelector('.终点').onEntityContact(({entity,other})=>{
    if(other.isRun){
        entity.say(`${other.player.name}跑完了全程。`);
        Object.assign(other.player,quanxian);
    }else{
        entity.say(`对付什么呀?!@${other.player.name}重跑吧!`);
        other.position.copy(other.backupPosition);
    }
});

 

点赞1


评论