Fade field on torikan and show torikan time
This commit is contained in:
Submodule Zframework updated: 3c84cf4c9a...4a60827b8b
@@ -986,9 +986,6 @@ function draw.norm(P,repMode)
|
||||
|
||||
-- Torikan miss amount
|
||||
if P.result=='torikan' then
|
||||
gc_setColor(COLOR.dX)
|
||||
gc_rectangle('fill',150,450,300,60,20,20)
|
||||
|
||||
local diff=P.stat.time-P.stat.torikanReq
|
||||
if diff>=60 then gc_setColor(COLOR.R)
|
||||
elseif diff>=30 then gc_setColor(COLOR.F)
|
||||
@@ -997,6 +994,8 @@ function draw.norm(P,repMode)
|
||||
elseif diff>=5 then gc_setColor(COLOR.flicker(COLOR.G,COLOR.L,.1))
|
||||
else gc_setColor(COLOR.flicker(COLOR.G,COLOR.J,.05)) end
|
||||
setFont(40)
|
||||
-- self:_showText(STRING.time(self.stat.time).." / "..STRING.time(requiredTime),0,160,50,'beat',.5,.2)
|
||||
GC.mStr(STRING.time(P.stat.time).." / "..STRING.time(P.stat.torikanReq),300,401)
|
||||
GC.mStr("(+"..STRING.time_short(diff)..")",300,451)
|
||||
end
|
||||
|
||||
|
||||
@@ -2200,6 +2200,18 @@ local function task_finish(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
local function task_fade(self)
|
||||
while true do
|
||||
yield()
|
||||
self.endCounter=self.endCounter+1
|
||||
if self.endCounter<40 then
|
||||
-- Make field invisible
|
||||
for j=1,#self.field do for i=1,10 do
|
||||
self.visTime[j][i]=math.max(3,self.visTime[j][i]-.5)
|
||||
end end
|
||||
elseif self.endCounter==60 then return end
|
||||
end
|
||||
end
|
||||
local function task_lose(self)
|
||||
while true do
|
||||
yield()
|
||||
@@ -2832,7 +2844,7 @@ function Player:torikanEnd(requiredTime)
|
||||
gameOver()
|
||||
TASK.new(task_autoPause)
|
||||
end
|
||||
self:newTask(task_finish)
|
||||
self:newTask(task_fade)
|
||||
return true
|
||||
end
|
||||
function Player:win(result)
|
||||
|
||||
Reference in New Issue
Block a user