From 9754a8269492edcf5b014c1a706cfe5016d95c49 Mon Sep 17 00:00:00 2001 From: yaw-man Date: Mon, 16 Jan 2023 11:09:22 -0400 Subject: [PATCH] Added score counter. --- main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.lua b/main.lua index 3e91ff1..f26c134 100644 --- a/main.lua +++ b/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" )