触屏每帧只采样一次
This commit is contained in:
@@ -23,7 +23,7 @@ local function onVirtualkey(x,y)
|
||||
end
|
||||
|
||||
local noTouch,noKey=false,false
|
||||
local touchMoveLastFrame=0
|
||||
local touchMoveLastFrame=false
|
||||
|
||||
local scene={}
|
||||
|
||||
@@ -80,9 +80,8 @@ function scene.touchUp(_,x,y)
|
||||
end
|
||||
end
|
||||
function scene.touchMove()
|
||||
if noTouch then return end
|
||||
if touchMoveLastFrame>1 then return end
|
||||
touchMoveLastFrame=touchMoveLastFrame+1
|
||||
if noTouch or touchMoveLastFrame then return end
|
||||
touchMoveLastFrame=true
|
||||
|
||||
local L=tc.getTouches()
|
||||
for i=#L,1,-1 do
|
||||
@@ -161,7 +160,7 @@ function scene.update(dt)
|
||||
local GAME=GAME
|
||||
GAME.frame=GAME.frame+1
|
||||
|
||||
touchMoveLastFrame=0
|
||||
touchMoveLastFrame=false
|
||||
|
||||
--Update virtualkey animation
|
||||
if SETTING.VKSwitch then
|
||||
|
||||
Reference in New Issue
Block a user