From 85e5464bf328861ab5d1a3a393f8dc7a88a07b61 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 2 Mar 2021 00:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=B8=B8=E6=88=8F15p=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E3=80=90=E7=A7=BB=E5=8A=A8=E6=95=B0=E3=80=91=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=EF=BC=8C=E5=90=8C=E6=97=B6=E7=A7=BB=E5=8A=A8=E4=B8=80?= =?UTF-8?q?=E6=8E=92=E5=8F=AA=E7=AE=97=E4=B8=80=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/mg_15p.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/parts/scenes/mg_15p.lua b/parts/scenes/mg_15p.lua index dd3943f3..4079d1ed 100644 --- a/parts/scenes/mg_15p.lua +++ b/parts/scenes/mg_15p.lua @@ -8,7 +8,7 @@ local scene={} local board,cx,cy local startTime,time -local move,state +local move,push,state local color,blind local slide,pathVis,revKB @@ -20,7 +20,7 @@ function scene.sceneInit() cx,cy=4,4 startTime=0 time=0 - move=0 + move,push=0,0 state=2 color=0 @@ -108,6 +108,7 @@ local function tapBoard(x,y,key) end end if moves>0 then + push=push+1 move=move+moves if state==0 then state=1 @@ -147,7 +148,7 @@ function scene.keyDown(key) shuffleBoard() state=0 time=0 - move=0 + move,push=0,0 elseif key=="q"then if state~=1 then color=(color+1)%5 @@ -264,9 +265,11 @@ local backColor={ } function scene.draw() setFont(40) - gc.setColor(1,1,1) gc.print(format("%.3f",time),1026,80) - gc.print(move,1026,150) + gc.setColor(1,.8,.8) + gc.print(move,1026,130) + gc.setColor(.8,.8,1) + gc.print(push,1026,180) if state==2 then --Draw no-setting area