Sound effect fader.
Constructor
View source
Parameters:
new (sfx : Sfx, type : TweenType) : Void
Constructor.
Parameters:
| sfx | The Sfx object to alter. | |
| complete | Optional completion callback. | |
| type | Tween type. |
Variables
Functions
View source
Parameters:
crossFade (play : Sfx, loop : Bool, duration : Float, volume : Float = 1, ease : EaseFunction) : Void
Fades out the Sfx, while also playing and fading in a replacement Sfx.
Parameters:
| play | The Sfx to play and fade in. | |
| loop | If the new Sfx should loop. | |
| duration | Duration of the crossfade. | |
| volume | The volume to fade in the new Sfx to. | |
| ease | Optional easer function. |
View source
Parameters:
fadeTo (volume : Float, duration : Float, ease : EaseFunction) : Void
Fades the Sfx to the target volume.
Parameters:
| volume | The volume to fade to. | |
| duration | Duration of the fade. | |
| ease | Optional easer function. |