Helper object for holding beginning minimum/maximum and ending minimum/maximum values of different properties. It would extend Range> but this allows a more practical use of set().

Constructor

new(startMin:T, ?startMax:T, ?endMin:T, ?endMax:T)

Create a new RangeBounds object. Must be typed, e.g. var myRangeBounds = new RangeBounds(0, 0, 0, 0);

Parameters:

startMin

The minimum possible initial value of this property for particles launched from this emitter.

startMax

The maximum possible initial value of this property for particles launched from this emitter. Optional, will be set equal to startMin if ignored.

endMin

The minimum possible final value of this property for particles launched from this emitter. Optional, will be set equal to startMin if ignored.

endMax

The maximum possible final value of this property for particles launched from this emitter. Optional, will be set equal to startMax if ignored.

Returns:

This RangeBounds instance (nice for chaining stuff together).

Variables

@:value(true)active:Bool = true

A flag that can be used to toggle the use of this property.

end:FlxBounds<T>

The ending minimum and maximum values of this property.

start:FlxBounds<T>

The beginning minimum and maximum values of this property.

Methods

inlineequals(OtherRangeBounds:FlxRangeBounds<T>):Bool

Function to compare this FlxRangeBounds to another.

Parameters:

OtherFlxRangeBounds

The other FlxRangeBounds to compare to this one.

Returns:

True if the FlxRangeBounds have the same min and max value, false otherwise.

set(startMin:T, ?startMax:T, ?endMin:T, ?endMax:T):FlxRangeBounds<T>

Handy function to set the the beginning and ending range of values for an emitter property in one line.

Parameters:

startMin

The minimum possible initial value of this property for particles launched from this emitter.

startMax

The maximum possible initial value of this property for particles launched from this emitter. Optional, will be set equal to startMin if ignored.

endMin

The minimum possible final value of this property for particles launched from this emitter. Optional, will be set equal to startMin if ignored.

endMax

The maximum possible final value of this property for particles launched from this emitter. Optional, will be set equal to startMax if ignored.

Returns:

This RangeBounds instance (nice for chaining stuff together).

toString():String

Convert object to readable string name. Useful for debugging, save games, etc.