* This creates a central handler for events
*/
pointer().setListener(new Pointer.Listener() {
@Override
public void onPointerStart(Pointer.Event event) {
GameEvent gameEvent = EventApi.normalizeEvent(EventType.POINTERSTART, event);
EventApi.enqueue(gameEvent);
}
@Override
public void onPointerEnd(Pointer.Event event) {
GameEvent gameEvent = EventApi.normalizeEvent(EventType.POINTEREND, event);
EventApi.enqueue(gameEvent);
}
@Override
public void onPointerDrag(Pointer.Event event) {
GameEvent gameEvent = EventApi.normalizeEvent(EventType.POINTERDRAG, event);
EventApi.enqueue(gameEvent);
}
});
// bind listeners to targets (circles)