From 1c18060570a2ee4e6bdcd1156912816614ec5ce3 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 28 Nov 2021 04:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E8=8F=9C=E5=8D=95=E8=AF=BB=E5=8F=96=E6=89=8B=E6=9F=84?= =?UTF-8?q?=E6=91=87=E6=9D=86=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/mode.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index ded7c4ac..e55d7ad3 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -164,13 +164,9 @@ function scene.update() if kb.isDown('right','d')then dx=dx-10 F=true end local js1=Z.js[1] if js1 then - local dir=js1:getAxis(1) - if dir~="c"then - if dir=="u"or dir=="ul"or dir=="ur"then dy=dy+10 F=true end - 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 + dx=dx+12.6*js1:getGamepadAxis('leftx') + dy=dy+12.6*js1:getGamepadAxis('lefty') + F=true end end if F then