From c3c151b375da98a072af16781a3665c524d1ffaa Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 24 Jul 2021 18:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8Fcubefield=E7=9A=84?= =?UTF-8?q?=E7=A2=B0=E6=92=9E=E5=88=A4=E5=AE=9A=E7=A7=BB=E5=87=BAdraw?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E4=BD=8E=E7=BB=98=E5=88=B6=E5=B8=A7?= =?UTF-8?q?=E7=8E=87=E5=AF=BC=E8=87=B4=E6=BC=8F=E5=88=A4=E5=AE=9A=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20close=20#138=20=EF=BC=88=E4=BD=8E=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=B8=A7=E7=8E=87=E8=BF=98=E6=98=AF=E4=BC=9A=E6=BC=8F?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_cubefield.lua | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/parts/scenes/app_cubefield.lua b/parts/scenes/app_cubefield.lua index c97275b4..eba75a83 100644 --- a/parts/scenes/app_cubefield.lua +++ b/parts/scenes/app_cubefield.lua @@ -29,8 +29,6 @@ local menu,ct,play local score local sunH,color,rot -local drawn=false - local function near(o,t) return o>t and max(o-.01,t)or o420 and y<480 and x<8 and x+size>-8 and inv==0 then + cubesX[i]=cubesX[i]-3 + hurt(650) + inv=40 + end + end + end + end + --Screen rotation if moveDir~=0 then player=player+moveDir*dt*.003*speed^.8 @@ -193,7 +206,6 @@ function scene.update(dt) end function scene.draw() - drawn=true --Health bar if life1>0 then gc.setColor(1,0,0) @@ -245,12 +257,6 @@ function scene.draw() gc.setColor(1,1,1) gc.rectangle('line',x,y-485,size,size) end - - if play and y>420 and y<480 and x<8 and x+size>-8 and inv==0 then - cubesX[i]=cubesX[i]-3 - hurt(650) - inv=40 - end end end