From 05292df4566b5e3f65de1c1dab20d878f3fb1599 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 28 Nov 2021 17:43:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E5=9C=B0=E5=9B=BE=E4=B8=8A?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E6=89=8B=E6=9F=84=E6=8C=89=E9=94=AE=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/mode.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index e55d7ad3..5c9ec451 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -163,7 +163,7 @@ function scene.update() if kb.isDown('left', 'a')then dx=dx+10 F=true end if kb.isDown('right','d')then dx=dx-10 F=true end local js1=Z.js[1] - if js1 then + if js1 and js1.getGamepadAxis then dx=dx+12.6*js1:getGamepadAxis('leftx') dy=dy+12.6*js1:getGamepadAxis('lefty') F=true