Constructor

new()

Variables

@:value(0)read onlyscreenX:Int = 0

@:value(0)read onlyscreenY:Int = 0

@:value(0)read onlyx:Int = 0

@:value(0)read onlyy:Int = 0

Methods

getPosition(?point:FlxPoint):FlxPoint

Returns a FlxPoint with this input's x and y.

@:access(flixel.FlxCamera)getPositionInCameraView(?Camera:FlxCamera, ?point:FlxPoint):FlxPoint

Fetch the screen position of the pointer relative to given camera's viewport.

Parameters:

Camera

If unspecified, first/main global camera is used instead.

point

An existing point object to store the results (if you don't want a new one created).

Returns:

The touch point's location relative to camera's viewport.

getScreenPosition(?Camera:FlxCamera, ?point:FlxPoint):FlxPoint

Fetch the screen position of the pointer on any given camera. NOTE: screenX and screenY also store the screen position of the pointer on the main camera.

Parameters:

Camera

If unspecified, first/main global camera is used instead.

point

An existing point object to store the results (if you don't want a new one created).

Returns:

The touch point's location in screen space.

getWorldPosition(?Camera:FlxCamera, ?point:FlxPoint):FlxPoint

Fetch the world position of the pointer on any given camera. NOTE: x and y also store the world position of the pointer on the main camera.

Parameters:

Camera

If unspecified, first/main global camera is used instead.

point

An existing point object to store the results (if you don't want a new one created).

Returns:

The touch point's location in world space.

@:access(flixel.group.FlxTypedGroup.resolveGroup)overlaps(ObjectOrGroup:FlxBasic, ?Camera:FlxCamera):Bool

Checks to see if some FlxObject overlaps this FlxObject or FlxGroup. If the group has a LOT of things in it, it might be faster to use FlxG.overlaps(). WARNING: Currently tilemaps do NOT support screen space overlap checks!

Parameters:

ObjectOrGroup

The object or group being tested.

Camera

Specify which game camera you want. If null getScreenPosition() will just grab the first global camera.

Returns:

Whether or not the two objects overlap.

inlinesetGlobalScreenPositionUnsafe(newX:Float, newY:Float):Void

Directly set the underyling screen position variable. WARNING! You should never use this unless you are trying to manually dispatch low-level mouse / touch events to the stage.