handlerPointerMove method
Implementation
@override
bool handlerPointerMove(PointerMoveEvent event) {
double distance = _startPoint.distanceTo(event.position.toVector2());
if (distance > 1) {
_initMove = true;
if (enabledMoveCameraWithClick &&
_acceptFromMouse(event, mouseButtonUsedToMoveCamera)) {
double px = _startPoint.x - event.position.dx;
double py = _startPoint.y - event.position.dy;
gameRef.camera.target = null;
gameRef.camera.snapTo(_startCameraPosition.translate(px, py));
}
}
return super.handlerPointerMove(event);
}