整理代码

This commit is contained in:
MrZ626
2020-12-15 23:55:32 +08:00
parent cf3ca2e9e0
commit e732aae87b
30 changed files with 149 additions and 168 deletions

View File

@@ -1,6 +1,6 @@
local gc=love.graphics
local tc=love.touch
local Timer=love.timer.getTime
local TIME=TIME
local max,sin=math.max,math.sin
local log=math.log
@@ -254,10 +254,10 @@ function scene.update(dt)
end
local function drawAtkPointer(x,y)
local t=sin(Timer()*20)
local t=sin(TIME()*20)
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
gc.circle("fill",x,y,25,6)
local a=Timer()*3%1*.8
local a=TIME()*3%1*.8
gc.setColor(0,.6,1,.8-a)
gc.circle("line",x,y,30*(1+a),6)
end
@@ -299,9 +299,9 @@ local function drawVirtualkey()
end
end
function scene.draw()
local t=TIME()
if MARKING then
setFont(25)
local t=Timer()
gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t)))
mStr(text.marking,190,60+26*sin(t))
end
@@ -337,7 +337,7 @@ function scene.draw()
--Replaying
if GAME.replaying then
gc.setColor(1,1,Timer()%1>.5 and 1 or 0)
gc.setColor(1,1,t%1>.5 and 1 or 0)
mText(drawableText.replaying,410,17)
end