mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-28 15:47:04 +00:00
results ending variations
This commit is contained in:
parent
37267dd7e2
commit
7c0c09775a
|
@ -5,9 +5,18 @@ import flixel.text.FlxText;
|
||||||
|
|
||||||
class ResultState extends MusicBeatSubstate
|
class ResultState extends MusicBeatSubstate
|
||||||
{
|
{
|
||||||
|
var resultsVariation:ResultVariations;
|
||||||
|
|
||||||
override function create()
|
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);
|
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0xFF000000);
|
||||||
bg.alpha = 0.8;
|
bg.alpha = 0.8;
|
||||||
|
@ -43,3 +52,10 @@ class ResultState extends MusicBeatSubstate
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum abstract ResultVariations(String)
|
||||||
|
{
|
||||||
|
var PERFECT;
|
||||||
|
var NORMAL;
|
||||||
|
var SHIT;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue