尝试修复地图菜单读取手柄摇杆位置错误
This commit is contained in:
@@ -164,13 +164,9 @@ function scene.update()
|
|||||||
if kb.isDown('right','d')then dx=dx-10 F=true end
|
if kb.isDown('right','d')then dx=dx-10 F=true end
|
||||||
local js1=Z.js[1]
|
local js1=Z.js[1]
|
||||||
if js1 then
|
if js1 then
|
||||||
local dir=js1:getAxis(1)
|
dx=dx+12.6*js1:getGamepadAxis('leftx')
|
||||||
if dir~="c"then
|
dy=dy+12.6*js1:getGamepadAxis('lefty')
|
||||||
if dir=="u"or dir=="ul"or dir=="ur"then dy=dy+10 F=true end
|
F=true
|
||||||
if dir=="d"or dir=="dl"or dir=="dl"then dy=dy-10 F=true end
|
|
||||||
if dir=="l"or dir=="ul"or dir=="dl"then dx=dx+10 F=true end
|
|
||||||
if dir=="r"or dir=="ur"or dir=="dr"then dx=dx-10 F=true end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if F then
|
if F then
|
||||||
|
|||||||
Reference in New Issue
Block a user