class flixel.addons.effects.FlxTrailArea extends FlxSprite

Available on all platforms

This provides an area in which the added sprites have a trail effect. Usage: Create the FlxTrailArea and * add it to the display. Then add all sprites that should have a trail effect via the add function. * @author KeyMaster

Instance Fields

var alphaMultiplier:Float

The bitmap's alpha value is multiplied by this every update

var alphaOffset:Float

The bitmap's alpha value is offsettet by this every update

var blendMode:BlendMode

Specifies the blendMode for the trails. * Ignored in simple render mode. Only works on the flash target.

var blueMultiplier:Float

The bitmap's blue value is multiplied by this every update

var blueOffset:Float

The bitmap's blue value is offsettet by this every update

var delay:Int

How often the trail is updated, in frames. Default value is 2, or "every frame".

var greenMultiplier:Float

The bitmap's green value is multiplied by this every update

var greenOffset:Float

The bitmap's green value is offsettet by this every update

var group:FlxTypedGroup<FlxSprite>

Stores all sprites that have a trail.

var redMultiplier:Float

The bitmap's red value is multiplied by this every update

var redOffset:Float

The bitmap's red value is offsettet by this every update

var simpleRender:Bool

If this is true, the render process ignores any color/scale/rotation manipulation of the sprites * with the advantage of being faster

function new(?X:Int = 0, ?Y:Int = 0, ?Width:Int = 0, ?Height:Int = 0, ?AlphaMultiplier:Float = 0.8f, ?Delay:Int = 2, ?SimpleRender:Bool = false, ?Antialiasing:Bool = false, ?TrailBlendMode:BlendMode = null):Void

Creates a new FlxTrailArea, in which all added sprites get a trail effect. * *

X

x position of the trail area *

Y

y position of the trail area *

Width

The width of the area - defaults to FlxG.width *

Height

The height of the area - defaults to FlxG.height *

AlphaMultiplier

By what the area's alpha is multiplied per update *

Delay

How often to update the trail. 1 updates every frame *

SimpleRender

If simple rendering should be used. Ignores all sprite transformations *

Antialiasing

If sprites should be smoothed when drawn to the area. Ignored when simple rendering is on *

TrailBlendMode

The blend mode used for the area. Only works in flash

function add(Sprite:FlxSprite):FlxSprite

Adds a FlxSprite to the FlxTrailArea. Not an add() in the traditional sense, * this just enables the trail effect for the sprite. You still need to add it to your state for it to update! * *

Sprite

The sprite to enable the trail effect for *

returns

The FlxSprite, useful for chaining stuff together

function destroy():Void

function draw():Void

function resetTrail():Void

Wipes the trail area

function setSize(Width:Float, Height:Float):Void

Sets the FlxTrailArea to a new size. Clears the area! * *

Width

The new width *

Height

The new height