Attempt to fix StickerState bug

This commit is contained in:
EliteMasterEric 2024-02-12 16:50:40 -05:00
parent ef28d34520
commit 2d8e686b33

View file

@ -116,11 +116,20 @@ class StickerSubState extends MusicBeatSubState
{
grpStickers.cameras = FlxG.cameras.list;
/*
if (dipshit != null)
{
FlxG.removeChild(dipshit);
dipshit = null;
}
*/
if (grpStickers.members == null || grpStickers.members.length == 0)
{
switchingState = false;
close();
return;
}
for (ind => sticker in grpStickers.members)
{
@ -235,6 +244,9 @@ class StickerSubState extends MusicBeatSubState
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
// I think this grabs the screen and puts it under the stickers?
// Leaving this commented out rather than stripping it out because it's cool...
/*
dipshit = new Sprite();
var scrn:BitmapData = new BitmapData(FlxG.width, FlxG.height, true, 0x00000000);
var mat:Matrix = new Matrix();
@ -243,7 +255,8 @@ class StickerSubState extends MusicBeatSubState
var bitmap:Bitmap = new Bitmap(scrn);
dipshit.addChild(bitmap);
FlxG.addChildBelowMouse(dipshit);
// FlxG.addChildBelowMouse(dipshit);
*/
FlxG.switchState(() -> targetState(this));
}