Add color to torikan diff text

This commit is contained in:
Not-A-Normal-Robot
2023-09-22 21:03:46 +07:00
parent b1dbc4fa87
commit 5e88b23980
3 changed files with 19 additions and 4 deletions

View File

@@ -984,6 +984,22 @@ function draw.norm(P,repMode)
ENV.mesDisp[i](P,repMode)
end
-- 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)
elseif diff>=15 then gc_setColor(COLOR.O)
elseif diff>=10 then gc_setColor(COLOR.Y)
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)
GC.mStr("(+"..STRING.time_short(diff)..")",300,451)
end
if P.frameRun<180 then
_drawStartCounter(P.frameRun)
end

View File

@@ -2827,8 +2827,7 @@ function Player:torikanEnd(requiredTime)
VOC.play('win')
end
self:_showText(text.torikan,0,0,90,'beat',.5,.2)
self:_showText(STRING.time(self.stat.time).." / "..STRING.time(requiredTime),0,160,30,'beat',.5,.2)
self:_showText("(+"..STRING.time_short(self.stat.time-requiredTime)..")",0,200,30,'beat',.5,.2)
self.stat.torikanReq=requiredTime
if self.type=='human' then
gameOver()
TASK.new(task_autoPause)
@@ -2972,6 +2971,6 @@ function Player:lose(force)
-- ::BREAK_notFinished::
end
end
--------------------------<\Event>--------------------------
--------------------------</Event>--------------------------
return Player