mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-23 21:56:46 +00:00
hopefully final polish?
This commit is contained in:
parent
82a6ca5916
commit
d07564cdc2
|
@ -71,8 +71,6 @@ class Countdown
|
|||
// @:privateAccess
|
||||
// PlayState.instance.dispatchEvent(new SongTimeScriptEvent(SONG_BEAT_HIT, 0, 0));
|
||||
|
||||
fetchNoteStyle();
|
||||
|
||||
// The timer function gets called based on the beat of the song.
|
||||
countdownTimer = new FlxTimer();
|
||||
|
||||
|
@ -90,10 +88,10 @@ class Countdown
|
|||
// PlayState.instance.dispatchEvent(new SongTimeScriptEvent(SONG_BEAT_HIT, 0, 0));
|
||||
|
||||
// Countdown graphic.
|
||||
showCountdownGraphic(countdownStep, noteStyle);
|
||||
showCountdownGraphic(countdownStep);
|
||||
|
||||
// Countdown sound.
|
||||
playCountdownSound(countdownStep, noteStyle);
|
||||
playCountdownSound(countdownStep);
|
||||
|
||||
// Event handling bullshit.
|
||||
var cancelled:Bool = propagateCountdownEvent(countdownStep);
|
||||
|
@ -223,7 +221,7 @@ class Countdown
|
|||
/**
|
||||
* Retrieves the graphic to use for this step of the countdown.
|
||||
*/
|
||||
public static function showCountdownGraphic(index:CountdownStep, noteStyle:NoteStyle):Void
|
||||
public static function showCountdownGraphic(index:CountdownStep):Void
|
||||
{
|
||||
var indexString:String = null;
|
||||
switch (index)
|
||||
|
@ -240,7 +238,7 @@ class Countdown
|
|||
if (indexString == null) return;
|
||||
|
||||
var spritePath:String = null;
|
||||
spritePath = resolveGraphicPath(noteStyle, indexString);
|
||||
spritePath = resolveGraphicPath(indexString);
|
||||
|
||||
if (spritePath == null) return;
|
||||
|
||||
|
@ -259,26 +257,21 @@ class Countdown
|
|||
countdownSprite.cameras = [PlayState.instance.camHUD];
|
||||
|
||||
countdownSprite.updateHitbox();
|
||||
countdownSprite.screenCenter();
|
||||
|
||||
// Fade sprite in, then out, then destroy it.
|
||||
FlxTween.tween(countdownSprite, {y: countdownSprite.y += 100}, Conductor.instance.beatLengthMs / 1000,
|
||||
FlxTween.tween(countdownSprite, {alpha: 0}, Conductor.instance.beatLengthMs / 1000,
|
||||
{
|
||||
ease: FlxEase.cubeInOut,
|
||||
ease: fadeEase,
|
||||
onComplete: function(twn:FlxTween) {
|
||||
countdownSprite.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
FlxTween.tween(countdownSprite, {alpha: 0}, Conductor.instance.beatLengthMs / 1000,
|
||||
{
|
||||
ease: fadeEase
|
||||
});
|
||||
|
||||
PlayState.instance.add(countdownSprite);
|
||||
countdownSprite.screenCenter();
|
||||
}
|
||||
|
||||
static function resolveGraphicPath(noteStyle:NoteStyle, index:String):Null<String>
|
||||
static function resolveGraphicPath(index:String):Null<String>
|
||||
{
|
||||
fetchNoteStyle();
|
||||
var basePath:String = 'ui/countdown/';
|
||||
|
@ -307,12 +300,12 @@ class Countdown
|
|||
/**
|
||||
* Retrieves the sound file to use for this step of the countdown.
|
||||
*/
|
||||
public static function playCountdownSound(step:CountdownStep, noteStyle:NoteStyle):Void
|
||||
public static function playCountdownSound(step:CountdownStep):Void
|
||||
{
|
||||
return FunkinSound.playOnce(Paths.sound(resolveSoundPath(noteStyle, step)), Constants.COUNTDOWN_VOLUME);
|
||||
return FunkinSound.playOnce(Paths.sound(resolveSoundPath(step)), Constants.COUNTDOWN_VOLUME);
|
||||
}
|
||||
|
||||
static function resolveSoundPath(noteStyle:NoteStyle, step:CountdownStep):Null<String>
|
||||
static function resolveSoundPath(step:CountdownStep):Null<String>
|
||||
{
|
||||
if (step == CountdownStep.BEFORE || step == CountdownStep.AFTER) return null;
|
||||
fetchNoteStyle();
|
||||
|
|
|
@ -30,8 +30,6 @@ class PopUpStuff extends FlxTypedGroup<FunkinSprite>
|
|||
override public function new()
|
||||
{
|
||||
super();
|
||||
|
||||
fetchNoteStyle();
|
||||
}
|
||||
|
||||
static function fetchNoteStyle():Void
|
||||
|
@ -44,7 +42,7 @@ class PopUpStuff extends FlxTypedGroup<FunkinSprite>
|
|||
isPixel = false;
|
||||
}
|
||||
|
||||
static function resolveGraphicPath(noteStyle:NoteStyle, index:String):Null<String>
|
||||
static function resolveGraphicPath(index:String):Null<String>
|
||||
{
|
||||
fetchNoteStyle();
|
||||
var basePath:String = 'ui/popup/';
|
||||
|
@ -75,7 +73,7 @@ class PopUpStuff extends FlxTypedGroup<FunkinSprite>
|
|||
|
||||
if (daRating == null) daRating = "good";
|
||||
|
||||
var ratingPath:String = resolveGraphicPath(noteStyle, daRating);
|
||||
var ratingPath:String = resolveGraphicPath(daRating);
|
||||
|
||||
// if (PlayState.instance.currentStageId.startsWith('school')) ratingPath = "weeb/pixelUI/" + ratingPath + "-pixel";
|
||||
|
||||
|
@ -131,7 +129,7 @@ class PopUpStuff extends FlxTypedGroup<FunkinSprite>
|
|||
|
||||
if (combo == null) combo = 0;
|
||||
|
||||
var comboPath:String = resolveGraphicPath(noteStyle, 'combo');
|
||||
var comboPath:String = resolveGraphicPath('combo');
|
||||
var comboSpr:FunkinSprite = FunkinSprite.create(comboPath);
|
||||
comboSpr.y = (FlxG.camera.height * 0.44) + offsets[1];
|
||||
comboSpr.x = (FlxG.width * 0.507) + offsets[0];
|
||||
|
@ -186,7 +184,7 @@ class PopUpStuff extends FlxTypedGroup<FunkinSprite>
|
|||
var daLoop:Int = 1;
|
||||
for (i in seperatedScore)
|
||||
{
|
||||
var numScore:FunkinSprite = FunkinSprite.create(0, comboSpr.y, resolveGraphicPath(noteStyle, 'num' + Std.int(i)));
|
||||
var numScore:FunkinSprite = FunkinSprite.create(0, comboSpr.y, resolveGraphicPath('num' + Std.int(i)));
|
||||
|
||||
if (graphicSuffix.toLowerCase().contains('pixel'))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue