用户:
ASWRYTS查看:0 回复:2 评论:0 创建时间:2020-04-25T10:13:07
怎样做出七色彩虹色变化改下代码
const COLOR=[
new Box3RGBColor(255,0,0),
new Box3RGBColor(255,165,0),
new Box3RGBColor(255,255,0),
new Box3RGBColor(0,255,0),
new Box3RGBColor(0,255,255),
new Box3RGBColor(0,0,255),
new Box3RGBColor(160,32,240)
]
中间略
(async () => {
while (true) {
world.say('战场进入了奇怪的状态,下一个是...');
world.fogColor=COLOR[Math.round(Math.random()*COLOR.length)]
await sleep(180e3);
}
})(); //TODO:每隔180秒发送广播并改变雾气颜色
console.clear()
console.warn('Code Start')