mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-29 16:26:48 +00:00
Merge branch 'master' of https://github.com/ninjamuffin99/ld47
This commit is contained in:
commit
d3ef83c25d
|
@ -29,6 +29,11 @@ class MainMenuState extends MusicBeatState
|
||||||
|
|
||||||
override function create()
|
override function create()
|
||||||
{
|
{
|
||||||
|
if (!FlxG.sound.music.playing)
|
||||||
|
{
|
||||||
|
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
|
||||||
|
}
|
||||||
|
|
||||||
persistentUpdate = persistentDraw = true;
|
persistentUpdate = persistentDraw = true;
|
||||||
|
|
||||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png);
|
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png);
|
||||||
|
@ -90,6 +95,11 @@ class MainMenuState extends MusicBeatState
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
|
if (FlxG.sound.music.volume < 0.8)
|
||||||
|
{
|
||||||
|
FlxG.sound.music.volume += 0.5 * FlxG.elapsed;
|
||||||
|
}
|
||||||
|
|
||||||
if (!selectedSomethin)
|
if (!selectedSomethin)
|
||||||
{
|
{
|
||||||
if (controls.UP_P)
|
if (controls.UP_P)
|
||||||
|
@ -116,10 +126,8 @@ class MainMenuState extends MusicBeatState
|
||||||
#if linux
|
#if linux
|
||||||
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
|
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
|
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
|
||||||
#end
|
#end
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -425,10 +425,12 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
function startSong():Void
|
function startSong():Void
|
||||||
{
|
{
|
||||||
|
startingSong = false;
|
||||||
|
|
||||||
previousFrameTime = FlxG.game.ticks;
|
previousFrameTime = FlxG.game.ticks;
|
||||||
lastReportedPlayheadPosition = 0;
|
lastReportedPlayheadPosition = 0;
|
||||||
|
|
||||||
startingSong = false;
|
if (!paused)
|
||||||
FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false);
|
FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false);
|
||||||
FlxG.sound.music.onComplete = endSong;
|
FlxG.sound.music.onComplete = endSong;
|
||||||
vocals.play();
|
vocals.play();
|
||||||
|
@ -623,7 +625,7 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
if (paused)
|
if (paused)
|
||||||
{
|
{
|
||||||
if (FlxG.sound.music != null)
|
if (FlxG.sound.music != null && !startingSong)
|
||||||
{
|
{
|
||||||
FlxG.sound.music.play();
|
FlxG.sound.music.play();
|
||||||
Conductor.songPosition = FlxG.sound.music.time;
|
Conductor.songPosition = FlxG.sound.music.time;
|
||||||
|
@ -797,7 +799,8 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
switch (totalBeats)
|
switch (totalBeats)
|
||||||
{
|
{
|
||||||
case 127:
|
case 128, 129, 130:
|
||||||
|
vocals.volume = 0;
|
||||||
// FlxG.sound.music.stop();
|
// FlxG.sound.music.stop();
|
||||||
// curLevel = 'Fresh';
|
// curLevel = 'Fresh';
|
||||||
// FlxG.switchState(new PlayState());
|
// FlxG.switchState(new PlayState());
|
||||||
|
|
Loading…
Reference in a new issue