mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-14 08:37:49 +00:00
PAUSE AND STEPPING WORKING WITH MUSIC
This commit is contained in:
parent
968c5b7a50
commit
341d8726b2
|
@ -1,12 +1,12 @@
|
||||||
package funkin;
|
package funkin;
|
||||||
|
|
||||||
import flixel.system.debug.log.LogStyle;
|
|
||||||
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
|
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
|
||||||
import flixel.addons.transition.FlxTransitionableState;
|
import flixel.addons.transition.FlxTransitionableState;
|
||||||
import flixel.addons.transition.TransitionData;
|
import flixel.addons.transition.TransitionData;
|
||||||
import flixel.graphics.FlxGraphic;
|
import flixel.graphics.FlxGraphic;
|
||||||
import flixel.math.FlxPoint;
|
import flixel.math.FlxPoint;
|
||||||
import flixel.math.FlxRect;
|
import flixel.math.FlxRect;
|
||||||
|
import flixel.system.debug.log.LogStyle;
|
||||||
import flixel.util.FlxColor;
|
import flixel.util.FlxColor;
|
||||||
import funkin.modding.module.ModuleHandler;
|
import funkin.modding.module.ModuleHandler;
|
||||||
import funkin.play.PlayState;
|
import funkin.play.PlayState;
|
||||||
|
@ -15,8 +15,8 @@ import funkin.play.event.SongEvent.SongEventHandler;
|
||||||
import funkin.play.song.SongData.SongDataParser;
|
import funkin.play.song.SongData.SongDataParser;
|
||||||
import funkin.play.stage.StageData;
|
import funkin.play.stage.StageData;
|
||||||
import funkin.ui.PreferencesMenu;
|
import funkin.ui.PreferencesMenu;
|
||||||
import funkin.util.macro.MacroUtil;
|
|
||||||
import funkin.util.WindowUtil;
|
import funkin.util.WindowUtil;
|
||||||
|
import funkin.util.macro.MacroUtil;
|
||||||
import openfl.display.BitmapData;
|
import openfl.display.BitmapData;
|
||||||
#if colyseus
|
#if colyseus
|
||||||
import io.colyseus.Client;
|
import io.colyseus.Client;
|
||||||
|
@ -59,6 +59,42 @@ class InitState extends FlxTransitionableState
|
||||||
FlxG.debugger.visible = false;
|
FlxG.debugger.visible = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
FlxG.debugger.addButton(CENTER, new BitmapData(20, 20, true, 0xFFCC2233), function()
|
||||||
|
{
|
||||||
|
if (FlxG.vcr.paused)
|
||||||
|
{
|
||||||
|
FlxG.vcr.resume();
|
||||||
|
|
||||||
|
for (snd in FlxG.sound.list)
|
||||||
|
snd.resume();
|
||||||
|
|
||||||
|
FlxG.sound.music.resume();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FlxG.vcr.pause();
|
||||||
|
|
||||||
|
for (snd in FlxG.sound.list)
|
||||||
|
snd.pause();
|
||||||
|
|
||||||
|
FlxG.sound.music.pause();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
FlxG.debugger.addButton(CENTER, new BitmapData(20, 20, true, 0xFF2222CC), function()
|
||||||
|
{
|
||||||
|
FlxG.game.debugger.vcr.onStep();
|
||||||
|
|
||||||
|
for (snd in FlxG.sound.list)
|
||||||
|
{
|
||||||
|
snd.pause();
|
||||||
|
snd.time += FlxG.elapsed * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
FlxG.sound.music.pause();
|
||||||
|
FlxG.sound.music.time += FlxG.elapsed * 1000;
|
||||||
|
});
|
||||||
|
|
||||||
FlxG.sound.muteKeys = [ZERO];
|
FlxG.sound.muteKeys = [ZERO];
|
||||||
FlxG.game.focusLostFramerate = 60;
|
FlxG.game.focusLostFramerate = 60;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue