整理代码
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
--Cool liquid background
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
local shader=SHADER.aura
|
||||
local t
|
||||
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
BG.resize(SCR.w,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
--Horizonal red-blue gradient
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
local shader=SHADER.grad1
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
back.resize()
|
||||
end
|
||||
function back.resize()
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
--Vertical red-green gradient
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
local shader=SHADER.grad2
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
BG.resize(nil,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
--Flash after random time
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--Light-dark
|
||||
local gc=love.graphics
|
||||
local rnd,sin=math.random,math.sin
|
||||
local sin=math.sin
|
||||
local back={}
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
--Lightning
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
--Black-White grid
|
||||
local gc=love.graphics
|
||||
local rnd,sin=math.random,math.sin
|
||||
local sin=math.sin
|
||||
local ceil=math.ceil
|
||||
local back={}
|
||||
|
||||
local t
|
||||
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
--Colorful RGB
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
local shader=SHADER.rgb1
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
BG.resize(SCR.w,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
--Blue RGB
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local back={}
|
||||
local shader=SHADER.rgb2
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
BG.resize(SCR.w,SCR.h)
|
||||
end
|
||||
function back.resize(_,h)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--Changing pure color
|
||||
local gc=love.graphics
|
||||
local rnd,sin=math.random,math.sin
|
||||
local sin=math.sin
|
||||
local back={}
|
||||
|
||||
local t
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
end
|
||||
function back.update(dt)
|
||||
t=t+dt
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--Welcome to Techmino
|
||||
local gc=love.graphics
|
||||
local rnd,sin=math.random,math.sin
|
||||
local sin=math.sin
|
||||
local back={}
|
||||
|
||||
local t
|
||||
local txt
|
||||
function back.init()
|
||||
t=rnd()*2600
|
||||
t=math.random()*2600
|
||||
txt=gc.newText(getFont(80),"Welcome To Techmino")
|
||||
end
|
||||
function back.update(dt)
|
||||
|
||||
Reference in New Issue
Block a user