mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
mbu stats
This commit is contained in:
parent
1018208d5c
commit
1d24fb1976
5 changed files with 29 additions and 0 deletions
BIN
data/ui/game/blastbar.png
Normal file
BIN
data/ui/game/blastbar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
BIN
data/ui/game/blastbar_bargray.png
Normal file
BIN
data/ui/game/blastbar_bargray.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
data/ui/game/blastbar_bargreen.png
Normal file
BIN
data/ui/game/blastbar_bargreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
data/ui/game/blastbar_charged.png
Normal file
BIN
data/ui/game/blastbar_charged.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
|
|
@ -78,6 +78,11 @@ class StatisticsGui extends GuiImage {
|
|||
+ "Out of Bounds:<br/>" + "Respawns:<br/>" + "Hardest Level:<br/>" + "<br/>" + "Grand Total (hours:minutes:seconds):<br/>"
|
||||
+ "Total Wasted Time (hours:minutes:seconds):";
|
||||
}
|
||||
if (game == "ultra") {
|
||||
statLabel.text.text = "Beginner:<br/>" + "Intermediate:<br/>" + "Advanced:<br/>" + "Total:<br/>" + "<br/>" + "Gold times:<br/>"
|
||||
+ "Ultimate times:<br/>" + "Easter Eggs:<br/>" + "Out of Bounds:<br/>" + "Respawns:<br/>" + "Hardest Level:<br/>" + "<br/>"
|
||||
+ "Grand Total (hours:minutes:seconds):<br/>" + "Total Wasted Time (hours:minutes:seconds):<br/>";
|
||||
}
|
||||
|
||||
this.addChild(statText);
|
||||
|
||||
|
|
@ -207,5 +212,29 @@ class StatisticsGui extends GuiImage {
|
|||
+ '<p align="right">${Util.formatTimeHours(totalBestTime)}</p>'
|
||||
+ '<p align="right">${Util.formatTimeHours(Settings.playStatistics.totalTime)}</p>';
|
||||
}
|
||||
if (game == "ultra") {
|
||||
var beginnerCompletion = completions["beginner"].filter(x -> x.beatPar).length / completions["beginner"].length;
|
||||
var intermediateCompletion = completions["intermediate"].filter(x -> x.beatPar).length / completions["intermediate"].length;
|
||||
var advancedCompletion = completions["advanced"].filter(x -> x.beatPar).length / completions["advanced"].length;
|
||||
var totalCompletion:Float = completions["beginner"].filter(x -> x.beatPar).length
|
||||
+ completions["intermediate"].filter(x -> x.beatPar).length + completions["advanced"].filter(x -> x.beatPar).length;
|
||||
totalCompletion /= completions["beginner"].length + completions["intermediate"].length + completions["advanced"].length;
|
||||
|
||||
statText.text.text = '<p align="right">${Math.floor(beginnerCompletion * 100)}%</p>'
|
||||
+ '<p align="right">${Math.floor(intermediateCompletion * 100)}%</p>'
|
||||
+ '<p align="right">${Math.floor(advancedCompletion * 100)}%</p>'
|
||||
+ '<p align="right">${Math.floor(totalCompletion * 100)}%</p>'
|
||||
+ '<br/>'
|
||||
+ '<p align="right">${totalPlatinums}/61 ${Math.floor(totalPlatinums / 61.0 * 100)}%</p>'
|
||||
+ '<p align="right">${totalUltimates}/61 ${Math.floor(totalUltimates / 61.0 * 100)}%</p>'
|
||||
+ '<p align="right">${totalEggs}/20 ${Math.floor(totalEggs / 20 * 100)}%</p>'
|
||||
+ '<p align="right">${Settings.playStatistics.oobs}</p>'
|
||||
+ '<p align="right">${Settings.playStatistics.respawns}</p>'
|
||||
+ '<p align="right">${hardestLevel != null ? hardestLevel.title : ""}</p>'
|
||||
+
|
||||
'<p align="right">${hardestLevel != null ? 'With ${hardestStats.oobs} OOBs, ${hardestStats.respawns} Respawns, and ${Util.formatTimeHours(hardestStats.totalTime)} Played': ""}</p>'
|
||||
+ '<p align="right">${Util.formatTimeHours(totalBestTime)}</p>'
|
||||
+ '<p align="right">${Util.formatTimeHours(Settings.playStatistics.totalTime)}</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue