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
Specifies the blendMode for the trails. * Ignored in simple render mode. Only works on the flash target.
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 |