actorTouched
void actorTouched(Actor actor,
GGTouch touch,
android.graphics.Point spot)
Event callback method to report events with the touch area
of an actor's sprite. Touch area types available: IMAGE (default,
events on non-transparent pixels of sprite image),
RECTANGLE, CIRCLE. The non-default types can be selected for each sprite ID
with Actor.setActorTouchRectangle(), Actor.setActorTouchCircle().
The parameter touch is used to get the type of the touch event and
the current touch position. spot contains the event coordinates relative
to the touch area with the following fixed coordinate system:
x-axis to the left, y-axis downward, origin at center of touch area.
The actor's location offset is respected.
If the touch areas of several actors overlays, all actors get the
notification unless the ActorTouchListener is registered by setting the
onTopOnly flag to true.
Drag events ar only reported if a press was reported before
(actor touched inside the touch area).
- Parameters:
actor
- the reference of the actor that reports the touchtouch
- the touch reference to get to get information about the eventspot
- the pixel coordinates relative to the touch area where the event occurred