用户:
0夏斐重度依赖0查看:1 回复:2 评论:1 创建时间:2023-11-17T22:38:18
async function updownflag(){ const flag=world.querySelector('#国旗') while(true){ var date=new Date() if(date.getHours()===0&&date.getMinutes()===30){//是国际标准时间,北京时间是标准时间+8小时(东八区) world.say('*升旗敬礼!奏唱国歌!') world.ambientSound='audio/无.mp3' world.sound('audio/国歌.mp3') const ani = flag.animate([ { position: [125,12,122], duration: 110}, { position: [125,12,122], duration: 560}, { position: [125,40,122], duration: 19} ], { iterations: 1, direction: Box3AnimationDirection.NORMAL, duration: 16*49 }) ani.onReady(()=>{ world.querySelectorAll('player').forEach((e)=>{ e.player.forceRespawn() e.player.jumpPower=0 e.player.walkSpeed=0 e.player.runSpeed=0 e.player.flySpeed=0 }) }) ani.onFinish(()=>{ world.querySelectorAll('player').forEach((e)=>{ e.player.jumpPower=0.96 e.player.walkSpeed=0.22 e.player.runSpeed=0.4 e.player.flySpeed=2 }) }) }else if(date.getHours()===0&&date.getMinutes()===25){ world.say('*5分钟后进行升旗仪式!') }else if(date.getHours()===0&&date.getMinutes()===20){ world.say('*10分钟后进行升旗仪式!') }else if(date.getHours()===13&&date.getMinutes()===0){ world.say('即将清校!') flag.position.copy([125,8,122]) }else{ world.ambientSound='audio/windy hill(原版).mp3' } await sleep(60000) } }
很好!你们学会了吗?还有什么不懂的,快来评论区回复问答吧!
水莉不好惹imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E5%8E%89%E5%AE%B3%E4%BA%86.gif"alt="emotion_编程猫_厉害了"
点赞0
评论