mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-12 15:17:57 +00:00
haha , also highscore.hx breaks switch
This commit is contained in:
parent
7dc6cb6b5e
commit
d12e8610ed
|
@ -43,7 +43,7 @@ class Preloader extends FlxBasePreloader
|
||||||
|
|
||||||
override function update(Percent:Float):Void
|
override function update(Percent:Float):Void
|
||||||
{
|
{
|
||||||
if(Percent < 75)
|
if(Percent < 69)
|
||||||
{
|
{
|
||||||
logo.scaleX += Percent / 1280;
|
logo.scaleX += Percent / 1280;
|
||||||
logo.scaleY += Percent / 1280;
|
logo.scaleY += Percent / 1280;
|
||||||
|
|
|
@ -119,6 +119,8 @@ class FreeplayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
|
trace("Freeplay Menu Updating");
|
||||||
|
|
||||||
lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.4));
|
lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.4));
|
||||||
scoreText.text = "PERSONAL BEST:" + lerpScore;
|
scoreText.text = "PERSONAL BEST:" + lerpScore;
|
||||||
|
|
||||||
|
@ -169,7 +171,9 @@ class FreeplayState extends MusicBeatState
|
||||||
if (curDifficulty > 2)
|
if (curDifficulty > 2)
|
||||||
curDifficulty = 0;
|
curDifficulty = 0;
|
||||||
|
|
||||||
|
#if !switch
|
||||||
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
||||||
|
#end
|
||||||
|
|
||||||
switch (curDifficulty)
|
switch (curDifficulty)
|
||||||
{
|
{
|
||||||
|
@ -197,7 +201,9 @@ class FreeplayState extends MusicBeatState
|
||||||
|
|
||||||
// selector.y = (70 * curSelected) + 30;
|
// selector.y = (70 * curSelected) + 30;
|
||||||
|
|
||||||
|
#if !switch
|
||||||
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
||||||
|
#end
|
||||||
// lerpScore = 0;
|
// lerpScore = 0;
|
||||||
|
|
||||||
var bullShit:Int = 0;
|
var bullShit:Int = 0;
|
||||||
|
|
|
@ -144,8 +144,10 @@ class MainMenuState extends MusicBeatState
|
||||||
{
|
{
|
||||||
case 'story mode':
|
case 'story mode':
|
||||||
FlxG.switchState(new StoryMenuState());
|
FlxG.switchState(new StoryMenuState());
|
||||||
|
trace("Story Menu Selected");
|
||||||
case 'freeplay':
|
case 'freeplay':
|
||||||
FlxG.switchState(new FreeplayState());
|
FlxG.switchState(new FreeplayState());
|
||||||
|
trace("Freeplay Menu Selected");
|
||||||
case 'options':
|
case 'options':
|
||||||
FlxG.switchState(new OptionsMenu());
|
FlxG.switchState(new OptionsMenu());
|
||||||
}
|
}
|
||||||
|
|
|
@ -844,7 +844,9 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
function endSong():Void
|
function endSong():Void
|
||||||
{
|
{
|
||||||
|
#if !switch
|
||||||
Highscore.saveScore(SONG.song, songScore, storyDifficulty);
|
Highscore.saveScore(SONG.song, songScore, storyDifficulty);
|
||||||
|
#end
|
||||||
|
|
||||||
if (isStoryMode)
|
if (isStoryMode)
|
||||||
{
|
{
|
||||||
|
@ -862,9 +864,8 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
#if !switch
|
#if !switch
|
||||||
NGio.unlockMedal(60961);
|
NGio.unlockMedal(60961);
|
||||||
#end
|
|
||||||
|
|
||||||
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
|
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
|
||||||
|
#end
|
||||||
|
|
||||||
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
|
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
|
||||||
FlxG.save.flush();
|
FlxG.save.flush();
|
||||||
|
|
|
@ -67,6 +67,8 @@ class StoryMenuState extends MusicBeatState
|
||||||
grpLocks = new FlxTypedGroup<FlxSprite>();
|
grpLocks = new FlxTypedGroup<FlxSprite>();
|
||||||
add(grpLocks);
|
add(grpLocks);
|
||||||
|
|
||||||
|
trace("Line 70");
|
||||||
|
|
||||||
for (i in 0...weekData.length)
|
for (i in 0...weekData.length)
|
||||||
{
|
{
|
||||||
var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 10, i);
|
var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 10, i);
|
||||||
|
@ -91,6 +93,8 @@ class StoryMenuState extends MusicBeatState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trace("Line 96");
|
||||||
|
|
||||||
for (char in 0...3)
|
for (char in 0...3)
|
||||||
{
|
{
|
||||||
var weekCharacterThing:MenuCharacter = new MenuCharacter((FlxG.width * 0.25) * (1 + char) - 150, weekCharacters[curWeek][char]);
|
var weekCharacterThing:MenuCharacter = new MenuCharacter((FlxG.width * 0.25) * (1 + char) - 150, weekCharacters[curWeek][char]);
|
||||||
|
@ -117,6 +121,8 @@ class StoryMenuState extends MusicBeatState
|
||||||
difficultySelectors = new FlxGroup();
|
difficultySelectors = new FlxGroup();
|
||||||
add(difficultySelectors);
|
add(difficultySelectors);
|
||||||
|
|
||||||
|
trace("Line 124");
|
||||||
|
|
||||||
leftArrow = new FlxSprite(grpWeekText.members[0].x + grpWeekText.members[0].width + 10, grpWeekText.members[0].y + 10);
|
leftArrow = new FlxSprite(grpWeekText.members[0].x + grpWeekText.members[0].width + 10, grpWeekText.members[0].y + 10);
|
||||||
leftArrow.frames = ui_tex;
|
leftArrow.frames = ui_tex;
|
||||||
leftArrow.animation.addByPrefix('idle', "arrow left");
|
leftArrow.animation.addByPrefix('idle', "arrow left");
|
||||||
|
@ -141,6 +147,8 @@ class StoryMenuState extends MusicBeatState
|
||||||
rightArrow.animation.play('idle');
|
rightArrow.animation.play('idle');
|
||||||
difficultySelectors.add(rightArrow);
|
difficultySelectors.add(rightArrow);
|
||||||
|
|
||||||
|
trace("Line 150");
|
||||||
|
|
||||||
add(yellowBG);
|
add(yellowBG);
|
||||||
add(grpWeekCharacters);
|
add(grpWeekCharacters);
|
||||||
|
|
||||||
|
@ -154,11 +162,15 @@ class StoryMenuState extends MusicBeatState
|
||||||
|
|
||||||
updateText();
|
updateText();
|
||||||
|
|
||||||
|
trace("Line 165");
|
||||||
|
|
||||||
super.create();
|
super.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
|
trace("Story Menu Updating");
|
||||||
|
|
||||||
// scoreText.setFormat('VCR OSD Mono', 32);
|
// scoreText.setFormat('VCR OSD Mono', 32);
|
||||||
lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.5));
|
lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.5));
|
||||||
|
|
||||||
|
@ -286,7 +298,10 @@ class StoryMenuState extends MusicBeatState
|
||||||
|
|
||||||
// USING THESE WEIRD VALUES SO THAT IT DOESNT FLOAT UP
|
// USING THESE WEIRD VALUES SO THAT IT DOESNT FLOAT UP
|
||||||
sprDifficulty.y = leftArrow.y - 15;
|
sprDifficulty.y = leftArrow.y - 15;
|
||||||
|
|
||||||
|
#if !switch
|
||||||
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
||||||
|
#end
|
||||||
|
|
||||||
FlxTween.tween(sprDifficulty, {y: leftArrow.y + 15, alpha: 1}, 0.07);
|
FlxTween.tween(sprDifficulty, {y: leftArrow.y + 15, alpha: 1}, 0.07);
|
||||||
}
|
}
|
||||||
|
@ -339,6 +354,8 @@ class StoryMenuState extends MusicBeatState
|
||||||
txtTracklist.screenCenter(X);
|
txtTracklist.screenCenter(X);
|
||||||
txtTracklist.x -= FlxG.width * 0.35;
|
txtTracklist.x -= FlxG.width * 0.35;
|
||||||
|
|
||||||
|
#if !switch
|
||||||
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue