猫史档案馆


【求助】代码岛

用户:中國萬歲_青铁迷中國萬歲_青铁迷查看:0 回复:2 评论:0 创建时间:2022-04-12T14:51:22


怎样在这段代码里加一个播放音乐的代码

(async function(){
while (true) {
        for(let i=0;i<15;i++){//火车向前加速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z-=0.07;    
            })
            await sleep(150)
        }
        
        await sleep(4500)//行驶中
        for(let i=0;i<15;i++){//火车向前减速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z+=0.07;    
            })
            await sleep(150)
        }
        await sleep(16000)//停站中
        for(let i=0;i<15;i++){//火车向后加速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z+=0.07;    
            })
            await sleep(150)
        }
        
        await sleep(4500)//行驶中
        for(let i=0;i<15;i++){//火车向后减速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z-=0.07;    
            })
            await sleep(150)
        }
        await sleep(16000)//停站中
  } })();

 


回复

上一页1 页 / 共 1下一页
中國萬歲_青铁迷中國萬歲_青铁迷

 

 

 

点赞0


评论


坦率的血翼蝠5801坦率的血翼蝠5801

world.sound('audio/cach.mp3')

点赞1


评论