1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-01-26 14:47:09 +00:00

results ending variations

This commit is contained in:
Cameron Taylor 2022-09-20 13:18:40 -04:00
parent 37267dd7e2
commit 7c0c09775a

View file

@ -5,9 +5,18 @@ import flixel.text.FlxText;
class ResultState extends MusicBeatSubstate
{
var resultsVariation:ResultVariations;
override function create()
{
FlxG.sound.playMusic(Paths.music("resultsNormal"));
if (Highscore.tallies.sick == Highscore.tallies.totalNotes && Highscore.tallies.maxCombo == Highscore.tallies.totalNotes)
resultsVariation = PERFECT;
else if (Highscore.tallies.missed + Highscore.tallies.bad + Highscore.tallies.shit >= Highscore.tallies.totalNotes * 0.50)
resultsVariation = SHIT; // if more than half of your song was missed, bad, or shit notes, you get shit ending!
else
resultsVariation = NORMAL;
FlxG.sound.playMusic(Paths.music("results" + resultsVariation));
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFF000000);
bg.alpha = 0.8;
@ -43,3 +52,10 @@ class ResultState extends MusicBeatSubstate
super.update(elapsed);
}
}
enum abstract ResultVariations(String)
{
var PERFECT;
var NORMAL;
var SHIT;
}