/ perc get in chal result

This commit is contained in:
FajsiEx 2021-11-21 21:09:39 +01:00
parent dced5cabb6
commit e5d00ae0a2
1 changed files with 10 additions and 2 deletions

View File

@ -58,6 +58,7 @@ local gradeImages = {
}
local percRequired = 1;
local percGet = 0;
-- AUDIO
game.LoadSkinSample("challenge_result.wav")
@ -236,11 +237,11 @@ function drawCompletion()
gfx.BeginPath()
gfx.ImageRect(63, 1331, 766*0.85, 130*0.85, completitionImage, 1, 0)
draw_number(925, 1370, 1.0, result.avgPercentage, 3, scoreNumber, true, 0.3, 1.12)
draw_number(925, 1370, 1.0, percGet, 3, scoreNumber, true, 0.3, 1.12)
gfx.BeginPath();
gfx.Rect(741, 1402, 278*math.min(1, result.avgPercentage / percRequired), 6);
gfx.Rect(741, 1402, 278*math.min(1, percGet / percRequired), 6);
gfx.FillColor(255, 128, 0, 255);
gfx.Fill()
end
@ -256,6 +257,13 @@ function result_set()
end
game.Log(percRequired, game.LOGGER_ERROR);
local a = 0;
for i, chart in ipairs(result.charts) do
a = a + chart.percent;
game.Log('#' .. i .. ' got ' .. chart.percent .. '% // ACC at ' .. a, game.LOGGER_ERROR);
end
percGet = a / #result.charts;
end