Helper object for holding beginning and ending values of various properties.

Constructor

new(start:T, ?end:T)

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

Parameters:

start

The beginning value of the property.

end

The ending value of the property. Optional, will be set equal to start if ignored.

Variables

@:value(true)active:Bool = true

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

end:T

The ending value of this property.

start:T

The beginning value of this property.

Methods

inlineequals(OtherFlxRange:FlxRange<T>):Bool

Function to compare this FlxRange to another.

Parameters:

OtherFlxRange

The other FlxRange to compare to this one.

Returns:

True if the FlxRanges have the same start and end value, false otherwise.

set(start:T, ?end:T):FlxRange<T>

Handy function to set the initial and final values of this Range object in one line.

Parameters:

start

The new beginning value of the property.

end

The new final value of the property. Optional, will be set equal to start if ignored.

Returns:

This Range instance (nice for chaining stuff together).

toString():String

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