Constructor
Variables
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
5.9.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
5.9.0
.read onlyscreenX:Int = 0
The world position relative to the main camera's scroll position
read onlyscreenY:Int = 0
The world position relative to the main camera's scroll position
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
5.9.0
.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 |
|---|
5.9.0
.getPositionInCameraView(?camera:FlxCamera, ?result:FlxPoint):FlxPoint
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, |
|---|---|
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
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, |
|---|---|
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, |
|---|---|
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, |
|---|---|
result | An existing point to store the results, if unspecified, one is created |
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, |
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.
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.
5.9.0
.