整理框架代码
整理手柄的摇杆/扳机支持代码
This commit is contained in:
@@ -9,9 +9,9 @@ local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
|
||||
stateInfo=SYSTEM.."-"..VERSION.string.." scene:"..ERRDATA[#ERRDATA].scene
|
||||
stateInfo=SYSTEM.."-"..VERSION.string.." scene:"..Z.errData[#Z.errData].scene
|
||||
errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author."
|
||||
errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes
|
||||
errorShot,errorInfo=Z.errData[#Z.errData].shot,Z.errData[#Z.errData].mes
|
||||
NET.wsclose_app()
|
||||
NET.wsclose_user()
|
||||
NET.wsclose_play()
|
||||
|
||||
@@ -162,7 +162,7 @@ function scene.update()
|
||||
if kb.isDown("down","s")then dy=dy-10 F=true end
|
||||
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=joysticks[1]
|
||||
local js1=Z.js[1]
|
||||
if js1 then
|
||||
local dir=js1:getAxis(1)
|
||||
if dir~="c"then
|
||||
|
||||
Reference in New Issue
Block a user