From c7dc7088c4ac8109fe34cd4427e660ef557ee91b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 29 Dec 2020 00:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A6=E5=B1=8F=E9=99=90=E5=88=B6=E6=AF=8F?= =?UTF-8?q?=E5=B8=A7=E9=87=87=E6=A0=B7=E4=B8=A4=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/play.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/parts/scenes/play.lua b/parts/scenes/play.lua index 91145956..5abbfa38 100644 --- a/parts/scenes/play.lua +++ b/parts/scenes/play.lua @@ -23,7 +23,8 @@ local function onVirtualkey(x,y) return nearest end -local noTouch,noKey +local noTouch,noKey=false,false +local touchMoveLastFrame=0 local scene={} @@ -81,6 +82,9 @@ function scene.touchUp(_,x,y) end function scene.touchMove() if noTouch then return end + if touchMoveLastFrame>1 then return end + touchMoveLastFrame=touchMoveLastFrame+1 + local L=tc.getTouches() for i=#L,1,-1 do L[2*i-1],L[2*i]=SCR.xOy:inverseTransformPoint(tc.getPosition(L[i])) @@ -157,6 +161,8 @@ function scene.update(dt) local GAME=GAME GAME.frame=GAME.frame+1 + touchMoveLastFrame=0 + --Update virtualkey animation if SETTING.VKSwitch then for i=1,#VK do