Added score counter.

This commit is contained in:
yaw-man 2023-01-16 11:09:22 -04:00
parent c8136b01f4
commit 9754a82694
1 changed files with 4 additions and 2 deletions

View File

@ -249,10 +249,12 @@ 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"
)