From fcae6c61e47978714a80d2b4a993f79a2e7587a6 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 28 Apr 2021 13:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=85=A8=E5=B1=80=E5=8F=98=E9=87=8F=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E7=A7=BB=E5=85=A5Zframework=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 7 ++++++- Zframework/sysFX.lua | 2 +- main.lua | 4 ---- parts/player/getSeqGen.lua | 2 +- parts/player/update.lua | 2 +- parts/scenes/setting_game.lua | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 5981781a..95b96f20 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -1,3 +1,8 @@ +NONE={}function NULL()end +EDITING="" +LOADED=false +ERRDATA={} + SCR= require"Zframework.screen" COLOR= require"Zframework.color" SCN= require"Zframework.scene" @@ -128,7 +133,7 @@ function love.mousemoved(x,y,dx,dy,touch) if SCN.swapping then return end dx,dy=dx/SCR.k,dy/SCR.k if SCN.mouseMove then SCN.mouseMove(mx,my,dx,dy)end - if ms.isDown(1) then + if ms.isDown(1)then WIDGET.drag(mx,my,dx,dy) else WIDGET.cursorMove(mx,my) diff --git a/Zframework/sysFX.lua b/Zframework/sysFX.lua index 3f2204bb..4dfe5253 100644 --- a/Zframework/sysFX.lua +++ b/Zframework/sysFX.lua @@ -114,7 +114,7 @@ end local SYSFX={} function SYSFX.update(dt) for i=#fx,1,-1 do - if fx[i]:update(dt) then + if fx[i]:update(dt)then rem(fx,i) end end diff --git a/main.lua b/main.lua index 9c42dbd5..58dd68ea 100644 --- a/main.lua +++ b/main.lua @@ -15,7 +15,6 @@ --Declaration goto REM love=require"love"::REM::--Just tell IDE to load love-api, no actual usage local fs=love.filesystem -NONE={}function NULL()end DBP=print--Use this in temporary code, easy to find and remove TIME=love.timer.getTime YIELD=coroutine.yield @@ -24,10 +23,7 @@ MOBILE=SYSTEM=="Android"or SYSTEM=="iOS" SAVEDIR=fs.getSaveDirectory() --Global Vars & Settings -LOADED=false DAILYLAUNCH=false -EDITING="" -ERRDATA={} --System setting math.randomseed(os.time()*626) diff --git a/parts/player/getSeqGen.lua b/parts/player/getSeqGen.lua index 7d5df9e3..70e104a3 100644 --- a/parts/player/getSeqGen.lua +++ b/parts/player/getSeqGen.lua @@ -2,7 +2,7 @@ local ins,rem=table.insert,table.remove local yield=YIELD local seqGens={ - none=function() while true do yield()end end, + none=function()while true do yield()end end, bag=function(P,seq0) local len=#seq0 local bag={} diff --git a/parts/player/update.lua b/parts/player/update.lua index 2495b6c3..acf19da4 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -398,7 +398,7 @@ function update.remote_alive(P,dt) frmDelta<20 and 1 or frmDelta<45 and rnd(2)or frmDelta<90 and 2 or - frmDelta<180 and rnd(2,3) or + frmDelta<180 and rnd(2,3)or 3 do local eventTime=P.stream[P.streamProgress] diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index 529eda54..1b0ba33b 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -33,7 +33,7 @@ scene.widgetList={ WIDGET.newSwitch{name="dataSaving", x=750, y=550, font=20,disp=SETval("dataSaving"), code=SETrev("dataSaving")}, WIDGET.newSwitch{name="autoPause", x=1060, y=310, font=20,disp=SETval("autoPause"), code=SETrev("autoPause")}, WIDGET.newSwitch{name="swap", x=1060, y=370, font=20,disp=SETval("swap"), code=SETrev("swap")}, - WIDGET.newSwitch{name="fine", x=1060, y=430, font=20,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play("finesseError",.6) end end}, + WIDGET.newSwitch{name="fine", x=1060, y=430, font=20,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play("finesseError",.6)end end}, WIDGET.newSwitch{name="appLock", x=1060, y=490, font=20,disp=SETval("appLock"), code=SETrev("appLock")}, WIDGET.newSwitch{name="simpMode", x=1060, y=550, font=25,disp=SETval("simpMode"), code=function()