mirror of
https://github.com/Theaninova/HitScoreVisualizer.git
synced 2026-01-09 11:02:48 +00:00
Basic functionality obtained
This commit is contained in:
@@ -397,19 +397,48 @@ namespace HitScoreVisualizer
|
|||||||
afterCutScore = saberAfterCutSwingRatingCounter.rating;
|
afterCutScore = saberAfterCutSwingRatingCounter.rating;
|
||||||
|
|
||||||
int beforeCutScore, accuracyScore, afterCutScore;
|
int beforeCutScore, accuracyScore, afterCutScore;
|
||||||
|
int beforeMax, accuracyMax, afterMax;
|
||||||
|
|
||||||
if (percentages)
|
if (percentages)
|
||||||
{
|
{
|
||||||
beforeCutScore = Mathf.Round(100f * beforeCut);
|
beforeMax = 100;
|
||||||
accuracyScore = Mathf.Round(100f * accuracy);
|
accuracyMax = 100;
|
||||||
afterCutScore = Mathf.Round(100f * afterCut);
|
afterMax = 100;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
beforeCutScore = Mathf.RoundToInt(70f * beforeCut);
|
beforeMax = 70;
|
||||||
accuracyScore = Mathf.RoundToInt(10f * accuracy);
|
accuracyMax = 10;
|
||||||
afterCutScore = Mathf.RoundToInt(30f * afterCut);
|
afterMax = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
beforeCutScore = Mathf.Round((float) beforeMax * beforeCut);
|
||||||
|
accuracyScore = Mathf.Round((float) accuracyMax * accuracy);
|
||||||
|
afterCutScore = Mathf.Round((float) afterMax * afterCut);
|
||||||
|
|
||||||
|
if (beforeCutScore == beforeMax && accuracyScore == acMulti && afterCutScore == afterMax)
|
||||||
|
{
|
||||||
|
text.text = "Perfect!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder formattedBuilder = new StringBuilder();
|
||||||
|
|
||||||
|
if (beforeCutScore == beforeMax)
|
||||||
|
formattedBuilder.Append("P | ");
|
||||||
|
else
|
||||||
|
formattedBuilder.Append(beforeCutScore + " | ");
|
||||||
|
|
||||||
|
if (accuracyScore == accuracyMax)
|
||||||
|
formattedBuilder.Append("P | ");
|
||||||
|
else
|
||||||
|
formattedBuilder.Append(accuracyScore + " | ");
|
||||||
|
|
||||||
|
if (afterCutScore == accuracyMax)
|
||||||
|
formattedBuilder.Append("P");
|
||||||
|
else
|
||||||
|
formattedBuilder.Append(afterCutScore);
|
||||||
|
|
||||||
|
text.text = formattedBuilder.ToString();
|
||||||
}
|
}
|
||||||
else if (instance.displayMode == mode_format)
|
else if (instance.displayMode == mode_format)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user