Added score counter.
This commit is contained in:
parent
c8136b01f4
commit
9754a82694
6
main.lua
6
main.lua
|
@ -248,11 +248,13 @@ OnVictory = function()
|
|||
|
||||
|
||||
text.Draw( 119 )
|
||||
|
||||
local score = state.longestStreak * state.longestStreak / totalTime
|
||||
|
||||
love.graphics.setColor( 1, 1, 1, 1 )
|
||||
love.graphics.printf(
|
||||
string.format( "time:\t%.3f\nstreak:\t%d", totalTime, state.longestStreak ):gsub( "%.", "," ),
|
||||
0, 0.5 * love.graphics.getHeight() - love.graphics.getFont():getHeight(),
|
||||
string.format( "time:\t%.2f\nstreak:\t%d\nscore:%.2f", totalTime, state.longestStreak, score):gsub( "%.", "," ),
|
||||
0, 0.5 * love.graphics.getHeight() - 2.0* love.graphics.getFont():getHeight(),
|
||||
love.graphics.getWidth(),
|
||||
"center"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue