From 36cefcc0006f08331c74a30400de085a7cd37ea5 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 17 Dec 2021 21:57:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E7=A9=BA=E8=83=8C=E6=99=AF=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BB=BB=E6=84=8F=E5=B8=A7=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/backgrounds/space.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parts/backgrounds/space.lua b/parts/backgrounds/space.lua index 96a3c1b5..48be71ad 100644 --- a/parts/backgrounds/space.lua +++ b/parts/backgrounds/space.lua @@ -22,12 +22,12 @@ function back.resize(w,h) S[i+4]=(rnd()-.5)*.01*s--Vy end end -function back.update() +function back.update(dt) local S=stars --Star moving for i=1,1260,5 do - S[i+1]=(S[i+1]+S[i+3])%W - S[i+2]=(S[i+2]+S[i+4])%H + S[i+1]=(S[i+1]+S[i+3]*dt*60)%W + S[i+2]=(S[i+2]+S[i+4]*dt*60)%H end end function back.draw()