修复触屏按虚拟按键爆炸

This commit is contained in:
MrZ626
2021-04-23 08:23:59 +08:00
parent 420abe8240
commit c7d15fbd3d
3 changed files with 22 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ function scene.touchMove()
for i=#L,1,-1 do
L[2*i-1],L[2*i]=SCR.xOy:inverseTransformPoint(tc.getPosition(L[i]))
end
local keys=VK.getKeys
local keys=VK.keys
for n=1,#keys do
local B=keys[n]
if B.ava then
@@ -86,7 +86,7 @@ function scene.keyDown(key)
local k=keyMap.keyboard[key]
if k and k>0 then
PLAYERS[1]:pressKey(k)
local vk=VK.getKeys()[k]
local vk=VK.keys[k]
vk.isDown=true
vk.pressTime=10
end