Helper object for holding minimum and maximum values of various properties.

Constructor

new(min:T, ?max:T)

Create a new Bounds object. Must be typed, e.g. var bounds = new FlxBounds<Float>(0, 0);

Parameters:

min

The minimum value of the property.

max

The maximum value of the property. Optional, will be set equal to min if ignored.

Variables

@:value(true)active:Bool = true

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

max:T

The maximum value of this property.

min:T

The minimum value of this property.

Methods

inlineequals(otherBounds:FlxBounds<T>):Bool

Function to compare this FlxBounds to another.

Parameters:

OtherFlxBounds

The other FlxBounds to compare to this one.

Returns:

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

set(min:T, ?max:T):FlxBounds<T>

Handy function to set the minimum and maximum values of this Bounds object in one line.

Parameters:

min

The new minimum value of the property.

max

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

Returns:

This Bounds instance (nice for chaining stuff together).

toString():String

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