Constructor

new()

Variables

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

The position relative to the FlxGame's position in the window, where 0 is the left edge of the game and FlxG.width is the right

Available since

5.9.0

.

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

The position relative to the FlxGame's position in the window, where 0 is the top edge of the game and FlxG.height is the bottom

Available since

5.9.0

.

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

Deprecated: "screenX is deprecated, use viewX, instead"

The world position relative to the main camera's scroll position

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

Deprecated: "screenY is deprecated, use viewY, instead"

The world position relative to the main camera's scroll position

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

The world position relative to the main camera's scroll position, cam.viewMarginX or cam.viewMarginLeft is the left edge of the camera and cam.viewMarginRight is the right

Available since

5.9.0

.

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

The world position relative to the main camera's scroll position, cam.viewMarginY or cam.viewMarginTop is the top edge of the camera and cam.viewMarginBottom is the bottom

Available since

5.9.0

.

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

The position in the world

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

The position in the world

Methods

getGamePosition(?result:FlxPoint):FlxPoint

The position relative to the game's position in the window, where (0, 0) is the top-left edge of the game and (FlxG.width, FlxG.height) is the bottom-right

Note: Fields gameX and gameY also store this result

Parameters:

result

An existing point to store the results, if unspecified, one is created

Available since

5.9.0

.

getPosition(?result:FlxPoint):FlxPoint

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

getPositionInCameraView(?camera:FlxCamera, ?result:FlxPoint):FlxPoint

Deprecated: "getPositionInCameraView is deprecated, use getViewPosition, instead"

Fetch the position of the pointer relative to given camera's scroll position, where (cam.viewMarginLeft, cam.viewMarginTop) is the top-left of the camera and (cam.viewMarginRight, cam.viewMarginBottom) is the bottom right of the camera

Note: Fields viewX and viewY also store this result for FlxG.camera

Parameters:

camera

If unspecified, FlxG.camera is used, instead.

result

An existing point to store the results, if unspecified, one is created

Returns:

The pointer's location relative to camera's viewport.

getScreenPosition(?camera:FlxCamera, ?result:FlxPoint):FlxPoint

Deprecated: "getScreenPosition is deprecated, use getViewPosition, instead"

Fetch the position of the pointer relative to given camera's scroll position, where (cam.viewMarginLeft, cam.viewMarginTop) is the top-left of the camera and (cam.viewMarginRight, cam.viewMarginBottom) is the bottom right of the camera

Note: Fields viewX and viewY also store this result for FlxG.camera

Parameters:

camera

If unspecified, FlxG.camera is used, instead

result

An existing point to store the results, if unspecified, one is created

getViewPosition(?camera:FlxCamera, ?result:FlxPoint):FlxPoint

Fetch the world position relative to the main camera's scroll position, where (cam.viewMarginLeft, cam.viewMarginTop) is the top-left of the camera and (cam.viewMarginRight, cam.viewMarginBottom) is the bottom right

Note: Fields viewX and viewY also store this result

Parameters:

camera

If unspecified, FlxG.camera is used, instead

result

An existing point to store the results, if unspecified, one is created

getWorldPosition(?camera:FlxCamera, ?result:FlxPoint):FlxPoint

Fetch the world position of the pointer on any given camera

Note: Fields x and y also store this result

Parameters:

camera

If unspecified, FlxG.camera is used, instead

result

An existing point to store the results, if unspecified, one is created

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

Checks to see if this pointer overlaps some FlxObject or FlxGroup.

Parameters:

objectOrGroup

The object or group being tested

camera

Helps determine the world position. If unspecified, FlxG.camera is used

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

Deprecated: "setGlobalScreenPositionUnsafe is deprecated, use setRawPositionUnsafe, instead"

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.

@:haxe.warning("-WDeprecated")setRawPositionUnsafe(x:Float, y:Float):Void

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

Available since

5.9.0

.