This creates a trail copying the bitmapData many times.

Constructor

@:value({ CachePixels : true, FramesDelay : 2, Alpha : 0.5, Length : 10 })new(Target:FlxEffectSprite, Length:Int = 10, Alpha:Float = 0.5, FramesDelay:Int = 2, CachePixels:Bool = true)

Creates a trail effect.

Parameters:

Target

The FlxEffectSprite the trail is attached to.

Length

The amount of trail images to create.

Alpha

The alpha value for the first trailsprite.

FramesDelay

How many frames wait until next trail updated.

CachePixels

Whether to cache current pixels bitmapData of the target for every trail position. Disable if target never update graphics.

Variables

@:value(true)active:Bool = true

alpha:Float

The alpha value for the first trail.

cachePixels:Bool

Whether to cache current pixels bitmapData of the target for every trail position.

framesDelay:Int

Number of frames to wait until next updated.

length:Int

The amount of trail images to create.

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

read onlytarget:FlxEffectSprite

The target FlxEffectSprite that to apply the trail.

Methods

clear():Void

Available since

2.1.0

.

update(elapsed:Float):Void