fixes + debug feature
This commit is contained in:
parent
3184e0bacb
commit
1aade522ae
@ -94,6 +94,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
public static var rep:Replay;
|
public static var rep:Replay;
|
||||||
public static var loadRep:Bool = false;
|
public static var loadRep:Bool = false;
|
||||||
|
public static var inResults:Bool = false;
|
||||||
|
|
||||||
public static var noteBools:Array<Bool> = [false, false, false, false];
|
public static var noteBools:Array<Bool> = [false, false, false, false];
|
||||||
|
|
||||||
@ -214,6 +215,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
var funneEffect:FlxSprite;
|
var funneEffect:FlxSprite;
|
||||||
var inCutscene:Bool = false;
|
var inCutscene:Bool = false;
|
||||||
|
var usedTimeTravel:Bool = false;
|
||||||
|
|
||||||
public static var repPresses:Int = 0;
|
public static var repPresses:Int = 0;
|
||||||
public static var repReleases:Int = 0;
|
public static var repReleases:Int = 0;
|
||||||
@ -279,6 +281,7 @@ class PlayState extends MusicBeatState
|
|||||||
highestCombo = 0;
|
highestCombo = 0;
|
||||||
repPresses = 0;
|
repPresses = 0;
|
||||||
repReleases = 0;
|
repReleases = 0;
|
||||||
|
inResults = false;
|
||||||
|
|
||||||
PlayStateChangeables.useDownscroll = FlxG.save.data.downscroll;
|
PlayStateChangeables.useDownscroll = FlxG.save.data.downscroll;
|
||||||
PlayStateChangeables.safeFrames = FlxG.save.data.frames;
|
PlayStateChangeables.safeFrames = FlxG.save.data.frames;
|
||||||
@ -2308,6 +2311,45 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(FlxG.keys.justPressed.TWO) { //Go 10 seconds into the future, credit: Shadow Mario#9396
|
||||||
|
if (!usedTimeTravel && Conductor.songPosition + 10000 < FlxG.sound.music.length)
|
||||||
|
{
|
||||||
|
usedTimeTravel = true;
|
||||||
|
FlxG.sound.music.pause();
|
||||||
|
vocals.pause();
|
||||||
|
Conductor.songPosition += 10000;
|
||||||
|
notes.forEachAlive(function(daNote:Note)
|
||||||
|
{
|
||||||
|
if(daNote.strumTime - 500 < Conductor.songPosition) {
|
||||||
|
daNote.active = false;
|
||||||
|
daNote.visible = false;
|
||||||
|
|
||||||
|
|
||||||
|
daNote.kill();
|
||||||
|
notes.remove(daNote, true);
|
||||||
|
daNote.destroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for (i in 0...unspawnNotes.length) {
|
||||||
|
var daNote:Note = unspawnNotes[0];
|
||||||
|
if(daNote.strumTime - 500 >= Conductor.songPosition) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
unspawnNotes.splice(unspawnNotes.indexOf(daNote), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
FlxG.sound.music.time = Conductor.songPosition;
|
||||||
|
FlxG.sound.music.play();
|
||||||
|
|
||||||
|
vocals.time = Conductor.songPosition;
|
||||||
|
vocals.play();
|
||||||
|
new FlxTimer().start(0.5, function(tmr:FlxTimer)
|
||||||
|
{
|
||||||
|
usedTimeTravel = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
if (startingSong)
|
if (startingSong)
|
||||||
@ -2564,6 +2606,8 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (health <= 0)
|
if (health <= 0)
|
||||||
|
{
|
||||||
|
if (!usedTimeTravel)
|
||||||
{
|
{
|
||||||
boyfriend.stunned = true;
|
boyfriend.stunned = true;
|
||||||
|
|
||||||
@ -2594,6 +2638,9 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
health = 0.01;
|
||||||
|
}
|
||||||
if (FlxG.save.data.resetButton)
|
if (FlxG.save.data.resetButton)
|
||||||
{
|
{
|
||||||
if (FlxG.keys.justPressed.R)
|
if (FlxG.keys.justPressed.R)
|
||||||
@ -3044,10 +3091,17 @@ class PlayState extends MusicBeatState
|
|||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
vocals.stop();
|
vocals.stop();
|
||||||
if (FlxG.save.data.scoreScreen)
|
if (FlxG.save.data.scoreScreen)
|
||||||
|
{
|
||||||
openSubState(new ResultsScreen());
|
openSubState(new ResultsScreen());
|
||||||
|
new FlxTimer().start(1, function(tmr:FlxTimer)
|
||||||
|
{
|
||||||
|
inResults = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FlxG.sound.playMusic(Paths.music('freakyMenu'));
|
FlxG.sound.playMusic(Paths.music('freakyMenu'));
|
||||||
|
Conductor.changeBPM(102);
|
||||||
FlxG.switchState(new StoryMenuState());
|
FlxG.switchState(new StoryMenuState());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3115,7 +3169,13 @@ class PlayState extends MusicBeatState
|
|||||||
vocals.stop();
|
vocals.stop();
|
||||||
|
|
||||||
if (FlxG.save.data.scoreScreen)
|
if (FlxG.save.data.scoreScreen)
|
||||||
|
{
|
||||||
openSubState(new ResultsScreen());
|
openSubState(new ResultsScreen());
|
||||||
|
new FlxTimer().start(1, function(tmr:FlxTimer)
|
||||||
|
{
|
||||||
|
inResults = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
else
|
else
|
||||||
FlxG.switchState(new FreeplayState());
|
FlxG.switchState(new FreeplayState());
|
||||||
}
|
}
|
||||||
|
@ -54,10 +54,13 @@ class ResultsScreen extends FlxSubState
|
|||||||
background.scrollFactor.set();
|
background.scrollFactor.set();
|
||||||
add(background);
|
add(background);
|
||||||
|
|
||||||
|
if (!PlayState.inResults)
|
||||||
|
{
|
||||||
music = new FlxSound().loadEmbedded(Paths.music('breakfast'), true, true);
|
music = new FlxSound().loadEmbedded(Paths.music('breakfast'), true, true);
|
||||||
music.volume = 0;
|
music.volume = 0;
|
||||||
music.play(false, FlxG.random.int(0, Std.int(music.length / 2)));
|
music.play(false, FlxG.random.int(0, Std.int(music.length / 2)));
|
||||||
FlxG.sound.list.add(music);
|
FlxG.sound.list.add(music);
|
||||||
|
}
|
||||||
|
|
||||||
background.alpha = 0;
|
background.alpha = 0;
|
||||||
|
|
||||||
@ -168,7 +171,7 @@ class ResultsScreen extends FlxSubState
|
|||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
if (music.volume < 0.5)
|
if (music != null && music.volume < 0.5)
|
||||||
music.volume += 0.01 * elapsed;
|
music.volume += 0.01 * elapsed;
|
||||||
|
|
||||||
// keybinds
|
// keybinds
|
||||||
@ -194,6 +197,7 @@ class ResultsScreen extends FlxSubState
|
|||||||
if (PlayState.isStoryMode)
|
if (PlayState.isStoryMode)
|
||||||
{
|
{
|
||||||
FlxG.sound.playMusic(Paths.music('freakyMenu'));
|
FlxG.sound.playMusic(Paths.music('freakyMenu'));
|
||||||
|
Conductor.changeBPM(102);
|
||||||
FlxG.switchState(new MainMenuState());
|
FlxG.switchState(new MainMenuState());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -265,6 +269,7 @@ class ResultsScreen extends FlxSubState
|
|||||||
|
|
||||||
var poop:String = Highscore.formatSong(songFormat, PlayState.storyDifficulty);
|
var poop:String = Highscore.formatSong(songFormat, PlayState.storyDifficulty);
|
||||||
|
|
||||||
|
if (music != null)
|
||||||
music.fadeOut(0.3);
|
music.fadeOut(0.3);
|
||||||
|
|
||||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.SONG.song);
|
PlayState.SONG = Song.loadFromJson(poop, PlayState.SONG.song);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user