Skip to content

Commit

Permalink
:(
Browse files Browse the repository at this point in the history
  • Loading branch information
x8c8r committed Jun 27, 2024
1 parent 51f4888 commit 85285a7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Binary file added assets/shared/images/stages/yay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ class MainMenuState extends MusicBeatState

override function update(elapsed:Float)
{
if (FlxG.keys.justPressed.END)
FlxG.switchState(new YouCanNowPlayFreeplayState());

if (FlxG.sound.music.volume < 0.8)
{
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
Expand Down
25 changes: 25 additions & 0 deletions source/YouCanNowPlayFreeplayState.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import flixel.FlxG;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import flixel.FlxSprite;
import flixel.FlxState;

class YouCanNowPlayFreeplayState extends FlxState {

override function create() {
FlxG.sound.music.destroy();

var img:FlxSprite = new FlxSprite().loadGraphic(Paths.image("stages/yay"));
add(img);
img.alpha = 0;
FlxTween.tween(img, {"alpha": 1}, 1, {ease: FlxEase.expoInOut});

super.create();
}

override function update(elapsed:Float) {
if (FlxG.keys.justPressed.ENTER)
FlxG.switchState(new MainMenuState());
super.update(elapsed);
}
}

0 comments on commit 85285a7

Please sign in to comment.