mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-18 22:14:37 +00:00
Add a screenshot sound provided by Isaac.
This commit is contained in:
parent
758a8378e7
commit
818e80ed74
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit c8f320e89f65f9e6242354b25f04aac2c07cceeb
|
Subproject commit 14abe753a2af62879f7ebaf717331297ff7d7a81
|
|
@ -13,6 +13,7 @@ import flixel.util.FlxSignal;
|
||||||
import flixel.util.FlxTimer;
|
import flixel.util.FlxTimer;
|
||||||
import funkin.graphics.FunkinSprite;
|
import funkin.graphics.FunkinSprite;
|
||||||
import funkin.input.Cursor;
|
import funkin.input.Cursor;
|
||||||
|
import funkin.audio.FunkinSound;
|
||||||
import openfl.display.Bitmap;
|
import openfl.display.Bitmap;
|
||||||
import openfl.display.Sprite;
|
import openfl.display.Sprite;
|
||||||
import openfl.display.BitmapData;
|
import openfl.display.BitmapData;
|
||||||
|
@ -162,7 +163,7 @@ class ScreenshotPlugin extends FlxBasic
|
||||||
final CAMERA_FLASH_DURATION = 0.25;
|
final CAMERA_FLASH_DURATION = 0.25;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visual (and audio?) feedback when a screenshot is taken.
|
* Visual and audio feedback when a screenshot is taken.
|
||||||
*/
|
*/
|
||||||
function showCaptureFeedback():Void
|
function showCaptureFeedback():Void
|
||||||
{
|
{
|
||||||
|
@ -171,6 +172,9 @@ class ScreenshotPlugin extends FlxBasic
|
||||||
flashSpr.addChild(flashBitmap);
|
flashSpr.addChild(flashBitmap);
|
||||||
FlxG.stage.addChild(flashSpr);
|
FlxG.stage.addChild(flashSpr);
|
||||||
FlxTween.tween(flashSpr, {alpha: 0}, 0.15, {ease: FlxEase.quadOut, onComplete: _ -> FlxG.stage.removeChild(flashSpr)});
|
FlxTween.tween(flashSpr, {alpha: 0}, 0.15, {ease: FlxEase.quadOut, onComplete: _ -> FlxG.stage.removeChild(flashSpr)});
|
||||||
|
|
||||||
|
// Play a sound (auto-play is true).
|
||||||
|
FunkinSound.load(Paths.sound('screenshot'), 1.0, false, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
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