
Lv.1
我叫张浩宇,笔名叫浩瀚宇宙,QQ号码为705444180,邮箱账号为705444180@qq.com
在 Box3_这段JavaScript代码为什么超时 中回复
已解决,放在async函数里就可以了。
async function main()
{
console.clear()
init()
while (true)
{
// if (Math.random() < 0.5)
// {
// world.rainDensity = 0//停雨
// }
// else
// {
// world.rainDensity = 0.5//下雨
// }
// if (Math.random() < 0.5) {
// world.snowDensity = 0//停雪
// }
// else
// {
// world.snowDensity = 0.1//下雪
// }
if (cnt矿 == 0)
{
init()
}
await sleep(20000)
}
}2022-05-29T12:03:29 点赞:0