class flixel.addons.effects.FlxWaveSprite 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. * @author Tim Hely / tims-world.com

Instance Fields

var center:Int

The 'center' of our sprite (where the wave effect should start/end)

var mode:WaveMode

Which mode we're using for the effect

var speed:Float

How fast should the wave effect be (higher = faster)

var strength:Int

How strong the wave effect should be

function new(Target:FlxSprite, ?Mode:WaveMode = null, ?Strength:Int = 20, ?Center:Int = -1, ?Speed:Float = 3):Void

Creates a new FlxWaveSprite, which clones a target FlxSprite and applies a wave-distortion effect to the clone. * *

Target

The target FlxSprite you want to clone. *

Mode

Which Mode you would like to use for the effect. ALL = applies a constant distortion throughout the image, BOTTOM = makes the effect get stronger towards the bottom of the image, and TOP = the reverse of BOTTOM *

Strength

How strong you want the effect *

Center

The 'center' of the effect when using BOTTOM or TOP modes. Anything above(BOTTOM)/below(TOP) this point on the image will have no distortion effect. *

Speed

How fast you want the effect to move. Higher values = faster.

function draw():Void