1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-02-07 12:07:19 +00:00

camera flash fix

This commit is contained in:
Cameron Taylor 2024-02-16 18:58:27 -05:00
parent 29e1c480fd
commit 0b58a4f664

View file

@ -166,13 +166,11 @@ class ScreenshotPlugin extends FlxBasic
*/
function showCaptureFeedback():Void
{
if (_flashColor != null)
{
for (camera in FlxG.cameras.list)
{
camera.flash(_flashColor, CAMERA_FLASH_DURATION);
}
}
var flashBitmap = new Bitmap(new BitmapData(Std.int(FlxG.stage.width), Std.int(FlxG.stage.height), false, 0xFFFFFFFF));
var flashSpr = new Sprite();
flashSpr.addChild(flashBitmap);
FlxG.stage.addChild(flashSpr);
FlxTween.tween(flashSpr, {alpha: 0}, 0.15, {ease: FlxEase.quadOut, onComplete: _ -> FlxG.stage.removeChild(flashSpr)});
}
static final PREVIEW_INITIAL_DELAY = 0.25; // How long before the preview starts fading in.