用户:
中國萬歲_青铁迷查看: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)//停站中
} })();