Utility class for handling touch input within the FlxG context.
Static variables
Static methods
staticoverlaps(?object:FlxBasic, ?camera:FlxCamera):Bool
Checks if the specified object overlaps with any active touch.
Parameters:
object | The FlxBasic object to check for overlap. |
|---|---|
camera | Optional camera for the overlap check. Defaults to the object's camera. |
Returns:
true if there is an overlap with any touch; false otherwise.
staticoverlapsComplex(?object:FlxObject, ?camera:FlxCamera):Bool
Checks if the specified object overlaps with any active touch using precise point checks.
Parameters:
object | The FlxObject to check for overlap. |
|---|---|
camera | Optional camera for the overlap check. Defaults to all cameras of the object. |
Returns:
true if there is a precise overlap with any touch; false otherwise.
staticoverlapsComplexPoint(?object:FlxObject, point:FlxPoint, inScreenSpace:Bool = false, ?camera:FlxCamera):Bool
Checks if the specified object overlaps with a specific point using precise point checks.
Parameters:
object | The FlxObject to check for overlap. |
|---|---|
point | The FlxPoint to check against the object. |
inScreenSpace | Whether to take scroll factors into account when checking for overlap. |
camera | Optional camera for the overlap check. Defaults to all cameras of the object. |
Returns:
true if there is a precise overlap with the specified point; false otherwise.
staticpressAction(?object:FlxBasic, ?camera:FlxCamera, useOverlapsComplex:Bool = true):Bool
A helper function to check if the selection is pressed using touch.
Parameters:
object | The optional FlxBasic to check for overlap. |
|---|---|
camera | Optional camera for the overlap check. Defaults to all cameras of the object. |
useOverlapsComplex | If true and atleast the object is not null, the function will use complex overlaps method. |