This is a modified version of FlxRainbowSprite by Tim Hely

Constructor

@:value({ StartHue : 0, Speed : 5, Brightness : 1, Alpha : 1 })new(Alpha:Float = 1, Brightness:Float = 1, Speed:Float = 5, StartHue:Int = 0)

Creates a new FlxEffectRainbow, which applies a color-cycling effect, using the target's bitmap as a mask.

Parameters:

Alpha

A number between 0 and 1 to change the opacity of the effect.

Brightness

A number between 0 and 1, indicating how bright the color should be.

Speed

How fast the hue should change each tick.

StartHue

The initial hue of the effect.

Variables

@:value(true)active:Bool = true

@:value(1)alpha:Float = 1

Set alpha to a number between 0 and 1 to change the opacity of the effect.

@:value(1)brightness:Float = 1

A number between 0 and 1, indicating how bright the color should be. 0 is black, 1 is full bright.

read onlyoffset:FlxPoint

@:value(5)speed:Float = 5

How fast the hue should change each tick.

Methods