mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 15:37:49 +00:00
simple pause screen
This commit is contained in:
parent
65036334d2
commit
8bcdb7a8e8
11
CHANGELOG.md
Normal file
11
CHANGELOG.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Changelog
|
||||||
|
All notable changes will be documented in this file.
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
### Added
|
||||||
|
- 32bit support
|
||||||
|
- Controller (dancepads) support
|
||||||
|
|
||||||
|
## [1.0.0] - 2020-10-05
|
||||||
|
### Added
|
||||||
|
- Uh, everything. This the game's initial gamejam release. We put it out
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
<set name="BUILD_DIR" value="export/debug" if="debug" />
|
<set name="BUILD_DIR" value="export/debug" if="debug" />
|
||||||
<set name="BUILD_DIR" value="export/release" unless="debug" />
|
<set name="BUILD_DIR" value="export/release" unless="debug" />
|
||||||
|
<set name="BUILD_DIR" value="export/32bit" if="32bit" />
|
||||||
|
|
||||||
<classpath name="source" />
|
<classpath name="source" />
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,12 @@ cd ..
|
||||||
@echo on
|
@echo on
|
||||||
echo BUILDING GAME
|
echo BUILDING GAME
|
||||||
lime build windows -final
|
lime build windows -final
|
||||||
echo UPLOADING TO ITCH
|
echo UPLOADING 64 BIT VERSION TO ITCH
|
||||||
butler push ./export/release/windows/bin ninja-muffin24/friday-night-funkin:windows
|
butler push ./export/release/windows/bin ninja-muffin24/friday-night-funkin:windows-64bit
|
||||||
butler status ninja-muffin24/friday-night-funkin:windows
|
lime build windows -final -32
|
||||||
|
echo UPLOADING 32 BIT VERSION TO ITCH
|
||||||
|
butler push ./export/release/windows/bin ninja-muffin24/friday-night-funkin:windows-32bit
|
||||||
|
butler status ninja-muffin24/friday-night-funkin:windows-32bit
|
||||||
|
butler status ninja-muffin24/friday-night-funkin:windows-64bit
|
||||||
echo ITCH SHIT UPDATED LMAOOOOO
|
echo ITCH SHIT UPDATED LMAOOOOO
|
||||||
pause
|
pause
|
26
source/PauseSubState.hx
Normal file
26
source/PauseSubState.hx
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
package;
|
||||||
|
|
||||||
|
import flixel.FlxG;
|
||||||
|
import flixel.FlxSprite;
|
||||||
|
import flixel.FlxSubState;
|
||||||
|
import flixel.util.FlxColor;
|
||||||
|
|
||||||
|
class PauseSubState extends FlxSubState
|
||||||
|
{
|
||||||
|
public function new()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
|
||||||
|
bg.alpha = 0.6;
|
||||||
|
bg.scrollFactor.set();
|
||||||
|
add(bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
override function update(elapsed:Float)
|
||||||
|
{
|
||||||
|
super.update(elapsed);
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.ENTER)
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import flixel.FlxG;
|
||||||
import flixel.FlxObject;
|
import flixel.FlxObject;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.FlxState;
|
import flixel.FlxState;
|
||||||
|
import flixel.FlxSubState;
|
||||||
import flixel.addons.display.FlxGridOverlay;
|
import flixel.addons.display.FlxGridOverlay;
|
||||||
import flixel.addons.transition.FlxTransitionableState;
|
import flixel.addons.transition.FlxTransitionableState;
|
||||||
import flixel.graphics.atlas.FlxAtlas;
|
import flixel.graphics.atlas.FlxAtlas;
|
||||||
|
@ -388,10 +389,46 @@ class PlayState extends FlxTransitionableState
|
||||||
|
|
||||||
var sectionScored:Bool = false;
|
var sectionScored:Bool = false;
|
||||||
|
|
||||||
|
override function openSubState(SubState:FlxSubState)
|
||||||
|
{
|
||||||
|
if (paused)
|
||||||
|
{
|
||||||
|
FlxG.sound.music.pause();
|
||||||
|
vocals.pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
super.openSubState(SubState);
|
||||||
|
}
|
||||||
|
|
||||||
|
override function closeSubState()
|
||||||
|
{
|
||||||
|
if (paused)
|
||||||
|
{
|
||||||
|
vocals.time = FlxG.sound.music.time;
|
||||||
|
|
||||||
|
FlxG.sound.music.play();
|
||||||
|
vocals.play();
|
||||||
|
paused = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.closeSubState();
|
||||||
|
}
|
||||||
|
|
||||||
|
private var paused:Bool = false;
|
||||||
|
|
||||||
override public function update(elapsed:Float)
|
override public function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.ENTER)
|
||||||
|
{
|
||||||
|
persistentUpdate = false;
|
||||||
|
persistentDraw = true;
|
||||||
|
paused = true;
|
||||||
|
|
||||||
|
openSubState(new PauseSubState());
|
||||||
|
}
|
||||||
|
|
||||||
healthHeads.setGraphicSize(Std.int(FlxMath.lerp(100, healthHeads.width, 0.98)));
|
healthHeads.setGraphicSize(Std.int(FlxMath.lerp(100, healthHeads.width, 0.98)));
|
||||||
healthHeads.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (healthHeads.width / 2);
|
healthHeads.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01)) - (healthHeads.width / 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue