Fade field on torikan and show torikan time

This commit is contained in:
Not-A-Normal-Robot
2023-09-22 21:30:49 +07:00
parent 5e88b23980
commit 0fc4957b21
3 changed files with 16 additions and 5 deletions

View File

@@ -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)