1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-10-02 07:28:53 +00:00

Fixed camera focus on game over.

This commit is contained in:
EliteMasterEric 2023-08-03 11:40:19 -04:00
parent 70d8a3638b
commit 050086fb36
3 changed files with 26 additions and 1 deletions

View file

@ -21,7 +21,7 @@ runs:
- name: Installing Haxe lol
run: |
haxe -version
haxelib git haxelib https://github.com/HaxeFoundation/haxelib.git
haxelib git haxelib https://github.com/HaxeFoundation/haxelib.git development
haxelib version
haxelib --global install hmm
haxelib --global run hmm install --quiet

View file

@ -1107,6 +1107,8 @@ class PlayState extends MusicBeatSubState
// super.stepHit() returns false if a module cancelled the event.
if (!super.stepHit()) return false;
if (isGamePaused) return false;
if (!startingSong
&& FlxG.sound.music != null
&& (Math.abs(FlxG.sound.music.time - (Conductor.songPosition - Conductor.offset)) > 200
@ -1131,6 +1133,8 @@ class PlayState extends MusicBeatSubState
// super.beatHit() returns false if a module cancelled the event.
if (!super.beatHit()) return false;
if (isGamePaused) return false;
if (generatedMusic)
{
// TODO: Sort more efficiently, or less often, to improve performance.

View file

@ -694,6 +694,27 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass
}
}
public override function kill()
{
_skipTransformChildren = true;
alive = false;
exists = false;
_skipTransformChildren = false;
if (group != null) group.kill();
}
public override function remove(Sprite:FlxSprite, Splice:Bool = false):FlxSprite
{
var sprite:FlxSprite = cast Sprite;
sprite.x -= x;
sprite.y -= y;
// alpha
sprite.cameras = null;
if (group != null) group.remove(Sprite, Splice);
return Sprite;
}
public function onScriptEvent(event:ScriptEvent) {}
public function onPause(event:PauseScriptEvent) {}