整理代码

This commit is contained in:
MrZ626
2021-01-05 19:45:05 +08:00
parent c0e44b324b
commit cf57caea70
9 changed files with 19 additions and 35 deletions

View File

@@ -13,7 +13,7 @@ function back.init()
video=love.data.decompress("string","zlib",love.filesystem.read("parts/backgrounds/badapple.dat"))
end
t=0
BG.resize()
back.resize()
end
function back.resize()
local W,H=SCR.w,SCR.h

View File

@@ -7,7 +7,7 @@ local shader=SHADER.grad1
local t
function back.init()
t=rnd()*2600
BG.resize()
back.resize()
end
function back.resize()
shader:send("w",SCR.W)

View File

@@ -12,7 +12,7 @@ function back.init()
t=rnd(2600)
fan=title_fan
petal={}
BG.resize()
back.resize()
end
function back.update()
t=t+1

View File

@@ -10,7 +10,6 @@ local firework,particle
function back.init()
t=26
firework,particle={},{}
BG.resize()
end
function back.update(dt)
t=t-1

View File

@@ -11,7 +11,7 @@ local snow
function back.init()
t=0
snow={}
BG.resize()
back.resize()
end
function back.update()
t=t+1

View File

@@ -26,7 +26,7 @@ function back.init()
end
gc.pop()
gc.setCanvas()
BG.resize()
back.resize()
end
function back.resize()
crystal={}

View File

@@ -6,18 +6,12 @@ local mStr=mStr
local scene={}
local board
local cx,cy
local startTime
local time
local move
local state
local board,cx,cy
local startTime,time
local move,state
local color
local blind
local slide
local pathVis
local revKB
local color,blind
local slide,pathVis,revKB
function scene.sceneInit()
BG.set("rainbow2")

View File

@@ -25,14 +25,10 @@ local levels={
local scene={}
local levelName
local targetString
local progress
local frameKeyCount
local mistake
local startTime
local time
local state
local levelName,targetString
local startTime,time
local state,progress
local frameKeyCount,mistake
function scene.sceneInit()
BG.set("bg2")

View File

@@ -9,16 +9,11 @@ local mStr=mStr
local scene={}
local board
local rank
local blind
local disappear
local tapFX
local startTime
local time
local mistake
local state
local progress
local board,rank
local blind,disappear
local startTime,time
local state,progress
local tapFX,mistake
function scene.sceneInit()
BG.set("space")
BGM.play("way")