Skip to content

Commit

Permalink
Gitaroo easter egg
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjamuffin99 committed Feb 15, 2021
1 parent 6661a26 commit 23ecbe3
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 7 deletions.
1 change: 1 addition & 0 deletions assets/data/characterList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ gf-christmas
monster
bf-pixel
senpai
senpai-angry
spirit
3 changes: 1 addition & 2 deletions assets/data/introText.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ fashionably late--but here it is
yooooooooooo--yooooooooo
pico funny--pico funny
updates each friday--on time every time
shoutouts to mason--for da homies
references are an homage--but stealing is a crime
shoutouts to mason--for da homies
Binary file added assets/images/pauseAlt/bfLol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions assets/images/pauseAlt/bfLol.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="bfLol.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="funnyThing instance 10000" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10001" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10002" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10003" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10004" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10005" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10006" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10007" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10008" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10009" x="0" y="0" width="280" height="184" frameX="0" frameY="-12" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10010" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10011" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10012" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10013" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10014" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10015" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10016" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10017" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10018" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
<SubTexture name="funnyThing instance 10019" x="0" y="189" width="250" height="204" frameX="-11" frameY="0" frameWidth="280" frameHeight="204"/>
</TextureAtlas>
Binary file added assets/images/pauseAlt/pauseBG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/pauseAlt/pauseUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/images/pauseAlt/pauseUI.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="pauseUI.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="bluecancel instance 10000" x="0" y="0" width="977" height="200"/>
<SubTexture name="bluereplay instance 10000" x="261" y="409" width="256" height="200"/>
<SubTexture name="cancelyellow instance 10000" x="0" y="205" width="977" height="199"/>
<SubTexture name="yellowreplay instance 10000" x="0" y="409" width="256" height="200"/>
</TextureAtlas>
88 changes: 88 additions & 0 deletions source/GitarooPause.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package;

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;

class GitarooPause extends MusicBeatState
{
var replayButton:FlxSprite;
var cancelButton:FlxSprite;

var replaySelect:Bool = false;

public function new():Void
{
super();
}

override function create()
{
if (FlxG.sound.music != null)
FlxG.sound.music.stop();

var bg:FlxSprite = new FlxSprite().loadGraphic('assets/images/pauseAlt/pauseBG.png');
add(bg);

var bf:FlxSprite = new FlxSprite(0, 30);
bf.frames = FlxAtlasFrames.fromSparrow('assets/images/pauseAlt/bfLol.png', 'assets/images/pauseAlt/bfLol.xml');
bf.animation.addByPrefix('lol', "funnyThing", 13);
bf.animation.play('lol');
add(bf);
bf.screenCenter(X);

replayButton = new FlxSprite(FlxG.width * 0.28, FlxG.height * 0.7);
replayButton.frames = FlxAtlasFrames.fromSparrow('assets/images/pauseAlt/pauseUI.png', 'assets/images/pauseAlt/pauseUI.xml');
replayButton.animation.addByPrefix('selected', 'bluereplay', 0, false);
replayButton.animation.appendByPrefix('selected', 'yellowreplay');
replayButton.animation.play('selected');
add(replayButton);

cancelButton = new FlxSprite(FlxG.width * 0.58, replayButton.y);
cancelButton.frames = FlxAtlasFrames.fromSparrow('assets/images/pauseAlt/pauseUI.png', 'assets/images/pauseAlt/pauseUI.xml');
cancelButton.animation.addByPrefix('selected', 'bluecancel', 0, false);
cancelButton.animation.appendByPrefix('selected', 'cancelyellow');
cancelButton.animation.play('selected');
add(cancelButton);

changeThing();

super.create();
}

override function update(elapsed:Float)
{
if (controls.LEFT_P || controls.RIGHT_P)
changeThing();

if (controls.ACCEPT)
{
if (replaySelect)
{
FlxG.switchState(new PlayState());
}
else
{
FlxG.switchState(new MainMenuState());
}
}

super.update(elapsed);
}

function changeThing():Void
{
replaySelect = !replaySelect;

if (replaySelect)
{
cancelButton.animation.curAnim.curFrame = 0;
replayButton.animation.curAnim.curFrame = 1;
}
else
{
cancelButton.animation.curAnim.curFrame = 1;
replayButton.animation.curAnim.curFrame = 0;
}
}
}
17 changes: 12 additions & 5 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 23ecbe3

Please sign in to comment.