mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-02-12 14:33:03 +00:00
camera flash fix
This commit is contained in:
parent
29e1c480fd
commit
0b58a4f664
|
@ -166,13 +166,11 @@ class ScreenshotPlugin extends FlxBasic
|
||||||
*/
|
*/
|
||||||
function showCaptureFeedback():Void
|
function showCaptureFeedback():Void
|
||||||
{
|
{
|
||||||
if (_flashColor != null)
|
var flashBitmap = new Bitmap(new BitmapData(Std.int(FlxG.stage.width), Std.int(FlxG.stage.height), false, 0xFFFFFFFF));
|
||||||
{
|
var flashSpr = new Sprite();
|
||||||
for (camera in FlxG.cameras.list)
|
flashSpr.addChild(flashBitmap);
|
||||||
{
|
FlxG.stage.addChild(flashSpr);
|
||||||
camera.flash(_flashColor, CAMERA_FLASH_DURATION);
|
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.
|
static final PREVIEW_INITIAL_DELAY = 0.25; // How long before the preview starts fading in.
|
||||||
|
|
Loading…
Reference in a new issue