generated from ShadowMario/FNF-PsychEngine
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8edaf3c
commit 48a3bc4
Showing
4 changed files
with
67 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,100 @@ | ||
package meta.substate; | ||
|
||
import flixel.FlxG; | ||
import flixel.FlxSprite; | ||
import flixel.text.FlxText; | ||
import flixel.tweens.FlxEase; | ||
import flixel.tweens.FlxTween; | ||
import flixel.util.FlxColor; | ||
import flixel.FlxSprite; | ||
import flixel.addons.transition.FlxTransitionableState; | ||
import flixel.group.FlxGroup.FlxTypedGroup; | ||
|
||
import meta.*; | ||
import meta.state.*; | ||
import meta.state.PlayState; | ||
import meta.substate.PauseSubState; | ||
|
||
import meta.substate.*; | ||
|
||
// nothing much yet... | ||
// ? <-- looks like the glottal stop!! | ||
class ResultsSubState extends MusicBeatSubState { | ||
class ResultsSubState extends MusicBeatSubState | ||
{ | ||
var titleTxt:FlxText; | ||
var resultsTxt:FlxText; | ||
|
||
var bg:FlxSprite; | ||
|
||
public function new(sicks:Int, goods:Int, bads:Int, shits:Int, score:Int, misses:Int, ?weekScore:Int, ?weekMisses:Int, percent:Float, rating:String) { | ||
var sick = 0; | ||
var good = 0; | ||
var bad = 0; | ||
var shit = 0; | ||
var score = 0; | ||
var miss = 0; | ||
var percentage = 0.0; | ||
var rate = ''; | ||
|
||
public function new(sicks:Int, goods:Int, bads:Int, shits:Int, score:Int, misses:Int, percent:Float, rating:String) | ||
{ | ||
super(); | ||
|
||
sick = sicks; | ||
good = goods; | ||
bad = bads; | ||
shit = shits; | ||
score = score; | ||
miss = misses; | ||
percentage = percent; | ||
rate = rating; | ||
} | ||
|
||
override function create() | ||
{ | ||
persistentUpdate = true; | ||
|
||
bg = new FlxSprite().loadGraphic(Paths.image('menuDesat')); | ||
bg.screenCenter(); | ||
bg.alpha = 0.4; | ||
add(bg); | ||
|
||
var titleTxt:FlxText = new FlxText(5, 0, 0, (PauseSubState.daSelected == 'Skip Song') ? 'y u skip??' : 'RESULTS', 72); | ||
titleTxt = new FlxText(0, 0, 0, (PauseSubState.daSelected == 'Skip Song') ? 'y u skip??' : 'RESULTS', 72); | ||
titleTxt.scrollFactor.set(); | ||
titleTxt.setFormat("VCR OSD Mono", 48, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); | ||
titleTxt.screenCenter(X); | ||
titleTxt.updateHitbox(); | ||
add(titleTxt); | ||
|
||
resultsTxt = new FlxText(0, 0, 0, | ||
'Sicks: ' + sick | ||
+ '\nGoods: ' + good | ||
+ '\nBads: ' + bad | ||
+ '\nShits: ' + shit | ||
+ '\nScore: ' + score | ||
+ '\nMisses: ' + miss | ||
+ '\nPercent Rating: ' + percentage | ||
+ '\nRating: ' + rate | ||
, 72); | ||
resultsTxt.scrollFactor.set(); | ||
resultsTxt.setFormat("VCR OSD Mono", 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); | ||
resultsTxt.screenCenter(XY); | ||
resultsTxt.updateHitbox(); | ||
add(resultsTxt); | ||
|
||
super.create(); | ||
|
||
cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]]; | ||
} | ||
|
||
override function update(elapsed:Float) { | ||
override function update(elapsed:Float) | ||
{ | ||
super.update(elapsed); | ||
|
||
if (controls.ACCEPT) { | ||
if (controls.ACCEPT) | ||
{ | ||
if (PlayState.isStoryMode) | ||
MusicBeatState.switchState(new StoryMenuState()); | ||
else { | ||
else | ||
{ | ||
if (PlayState.inMini) { | ||
inMini = false; | ||
MusicBeatState.switchState(new MinigamesState()); | ||
} else { | ||
MusicBeatState.switchState(new FreeplayState()); | ||
} | ||
} | ||
FlxG.sound.playMusic(Paths.music('freakyMenu')); | ||
} | ||
} | ||
} | ||
} |