Constructor
Variables
Methods
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.
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.