Gitaroo easter egg

This commit is contained in:
Cameron Taylor
2021-02-14 19:03:02 -05:00
parent 6661a26734
commit 23ecbe3e2e
9 changed files with 136 additions and 7 deletions

View File

@ -1470,7 +1470,14 @@ class PlayState extends MusicBeatState
vocals.stop();
FlxG.sound.music.stop();
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
// 1 / 1000 chance for Gitaroo Man easter egg
if (FlxG.random.bool(0.1))
{
// gitaroo man easter egg
FlxG.switchState(new GitarooPause());
}
else
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
}
@ -1505,11 +1512,11 @@ class PlayState extends MusicBeatState
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
// i am so fucking sorry for this if condition
if (daNote.isSustainNote && daNote.y + daNote.offset.y <= strumLine.y + Note.swagWidth/2
&& (!daNote.mustPress || (daNote.wasGoodHit ||
(daNote.prevNote.wasGoodHit && !daNote.canBeHit))))
if (daNote.isSustainNote
&& daNote.y + daNote.offset.y <= strumLine.y + Note.swagWidth / 2
&& (!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit))))
{
var swagRect = new FlxRect(0, strumLine.y + Note.swagWidth/2 - daNote.y, daNote.width * 2, daNote.height * 2);
var swagRect = new FlxRect(0, strumLine.y + Note.swagWidth / 2 - daNote.y, daNote.width * 2, daNote.height * 2);
swagRect.y /= daNote.scale.y;
swagRect.height -= swagRect.y;