class flixel.addons.effects.FlxGlitchSprite extends FlxSprite

Available on all platforms

This creates a FlxSprite which copies a target FlxSprite and applies a non-destructive wave-distortion effect. * Usage: Create a FlxSprite object, position it where you want (don't add it), and then create a new FlxWaveSprite, * passing the Target object to it, and then add the FlxWaveSprite to your state/group. * Based, in part, from PhotonStorm's GlitchFX Class in Flixel Power Tools. * @author Tim Hely / tims-world.com

Instance Fields

var delay:Float

Time, in seconds, between glitch updates

var direction:GlitchDirection

Which direction the glitch effect should be applied.

var size:Int

How thick each glitch segment should be.

var strength:Int

How strong the glitch effect should be (how much it should move from the center)

var target:FlxSprite

The target FlxSprite that the glitch effect copies from.

function new(Target:FlxSprite, ?Strength:Int = 4, ?Size:Int = 1, ?Delay:Float = 0.05f, ?Direction:GlitchDirection = null):Void

Creates a new FlxGlitchSprite, which clones a target FlxSprite and applies a Glitch-distortion effect to the clone. * This effect is non-destructive to the target's pixels, and can be used on animated FlxSprites. * *

Target

The target FlxSprite you want to clone. *

Strength

How strong you want the effect *

Size

How 'thick' you want each piece of the glitch *

Delay

How long (in seconds) between each glitch update *

Direction

Which Direction you want the effect to be applied (HORIZONTAL or VERTICAL)

function draw():Void