Uses bit flags to create a list of orthogonal directions. useful for many FlxObject features like allowCollisions and touching.

Available since

4.10.0

.

Static variables

staticread onlydegrees:Float

Calculates the angle (in degrees) of the facing flags. Returns 0 if two opposing flags are true.

Available since

5.0.0

.

staticread onlyradians:Float

Calculates the angle (in radians) of the facing flags. Returns 0 if two opposing flags are true.

Available since

5.0.0

.

Static methods

staticfromBools(left:Bool, right:Bool, up:Bool, down:Bool):FlxDirectionFlags

Generates a FlxDirectonFlags instance from 4 bools

Available since

5.0.0

.

staticinlinehas(this:Int, dir:FlxDirectionFlags):Bool

Returns true if this contains all of the supplied flags.

statictoString(this:Int):String

staticinlinewith(this:Int, dir:FlxDirectionFlags):FlxDirectionFlags

Creates a new FlxDirections that includes the supplied directions.

staticinlinewithout(this:Int, dir:FlxDirectionFlags):FlxDirectionFlags

Creates a new FlxDirections that excludes the supplied directions.

Variables

@:value(cast 0x1111)@:impl@:enuminlineread onlyANY:FlxDirectionFlags = 0x1111

Special-case constant meaning any, or all directions.

@:value(cast 0x0100)@:impl@:enuminlineread onlyCEILING:FlxDirectionFlags = 0x0100

Special-case constant meaning "up".

@:value(cast 0x1000)@:impl@:enuminlineread onlyDOWN:FlxDirectionFlags = 0x1000

@:value(cast 0x1000)@:impl@:enuminlineread onlyFLOOR:FlxDirectionFlags = 0x1000

Special-case constant meaning "down"

@:value(cast 0x0001)@:impl@:enuminlineread onlyLEFT:FlxDirectionFlags = 0x0001

@:value(cast 0x0000)@:impl@:enuminlineread onlyNONE:FlxDirectionFlags = 0x0000

Special-case constant meaning no directions.

@:value(cast 0x0010)@:impl@:enuminlineread onlyRIGHT:FlxDirectionFlags = 0x0010

@:value(cast 0x0100)@:impl@:enuminlineread onlyUP:FlxDirectionFlags = 0x0100

@:value(cast 0x0011)@:impl@:enuminlineread onlyWALL:FlxDirectionFlags = 0x0011

Special-case constant meaning "left" and "right".