hitTouch method
Determines whether the localPoint
specified in the local coordinates of
this object lies inside its bounds.
If useShape
is false
, this method uses the axis-aligned bounding box
of the display object to test for a hit. If useShape
is true
, this
method uses the object's shape Graphics to test for a hit, this applies
to GSprite and GShape.
This method returns true
if the point is inside the object's bounds,
and false
otherwise.
Implementation
bool hitTouch(GPoint localPoint, [bool useShape = false]) {
return hitTest(localPoint, useShape) != null;
}