From bbe6614ddc6b69f31b30db88bb6f6b2dc764e541 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 22 Jan 2021 01:02:02 +0800 Subject: [PATCH] =?UTF-8?q?staff=E5=A2=9E=E5=8A=A0=E5=BD=A9=E8=9B=8B?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/staff.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/parts/scenes/staff.lua b/parts/scenes/staff.lua index 838d155f..639589da 100644 --- a/parts/scenes/staff.lua +++ b/parts/scenes/staff.lua @@ -12,10 +12,11 @@ function scene.sceneInit() end function scene.mouseDown(x,y) + local T=40*math.min(time,45) if x>230 and x<1050 then - if math.abs(y-800+time*40)<70 then + if math.abs(y-800+T)<70 then loadGame("sprintLock",true) - elseif math.abs(y-2160+time*40)<70 then + elseif math.abs(y-2160+T)<70 then loadGame("sprintFix",true) end end @@ -43,18 +44,20 @@ function scene.update(dt) elseif v>1 then v=v-.26 end - time=math.min(time+v*dt,45) + time=time+v*dt end function scene.draw() + local T=40*math.min(time,45) local L=text.staff setFont(40) gc.setColor(1,1,1) for i=1,#L do - mStr(L[i],640,800+70*i-time*40) + mStr(L[i],640,800+70*i-T) end - mDraw(IMG.title_color,640,800-time*40,nil,2) - mDraw(IMG.title_color,640,2160-time*40,nil,2) + mDraw(IMG.title_color,640,800-T,nil,2) + mDraw(IMG.title_color,640,2160-T,nil,2) + if time>55 then gc.print("CLICK ME →",50,550,-.5)end end scene.widgetList={