class FlxShakeEffect
package flixel.addons.effects.chainable
implements IFlxEffect
Available on all platforms
This will shake the bitmapData.
Constructor
new(Intensity:Float = 5, Duration:Float = 0.5, ?OnComplete:() ‑> Void, ?Axes:FlxAxes)
A shake effect.
Parameters:
Intensity | Value in pixels representing the maximum distance that the bitmapData can move while shaking. |
|---|---|
Duration | The length in seconds that the shaking effect should last. |
OnComplete | Optional completion callback function. |
Axes | On what axes to shake. Default value is XY / both. |
Variables
intensity:Float = 0
Value in pixels representing the maximum distance that the bitmapData can move while shaking.
Methods
reset(Intensity:Float = 5, Duration:Float = 0.5, ?OnComplete:() ‑> Void, ?Axes:FlxAxes):Void
Reset the effect, need to set the parameters again. To use the same parameters call method start().
Parameters:
Intensity | Value in pixels representing the maximum distance that the bitmapData can move while shaking. |
|---|---|
Duration | The length in seconds that the shaking effect should last. |
OnComplete | Optional completion callback function. |
Axes | On what axes to shake. Default value is XY / both. |
start(Force:Bool = false):Void
Reset and start the effect with the same parameters.
Parameters:
Force | Force the effect to reset. |
|---|