This is a modified version of FlxGlitchSprite by Tim Hely

Constructor

@:value({ Delay : 0.05, Size : 1, Strength : 4 })new(Strength:Int = 4, Size:Int = 1, Delay:Float = 0.05, ?Direction:FlxGlitchDirection)

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

Parameters:

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).

Variables

@:value(true)active:Bool = true

@:value(0.05)delay:Float = 0.05

Time, in seconds, between glitch updates

direction:FlxGlitchDirection

Which direction the glitch effect should be applied.

@:value(FlxPoint.get())read onlyoffset:FlxPoint = FlxPoint.get()

@:value(1)size:Int = 1

How thick each glitch segment should be.

@:value(2)strength:Int = 2

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

Methods