修复触屏按虚拟按键爆炸

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

@@ -53,7 +53,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
@@ -73,7 +73,7 @@ function scene.keyDown(key)
if k>0 then
if noKey then return end
PLAYERS[1]:pressKey(k)
local vk=VK.getKeys()[k]
local vk=VK.keys[k]
vk.isDown=true
vk.pressTime=10
else