private void FocusToSelectedLocation() { if (selectedLocation != null) { float zoom = (selectedLocation is Place ? 0.5f : 0.75f); NavigationCamera.FocusTo(selectedLocation.position, zoom); } }
public NavigationCameraTests() { _requestBuilderMock = new Mock <IRequestBuilder>(); _requestBuilderMock .Setup(m => m.AddQueryParameter("camera", It.IsAny <string>())) .Returns(_requestBuilderMock.Object); _camera = new NavigationCamera(_requestBuilderMock.Object); }
private void MarkByCursor() { if (cursor == null) { return; } Rect cursorRect = RectTransformToScreenSpace(cursor); Vector3 position = NavigationCamera.GetPosition(cursorRect.position); LocationMarker marker = new LocationMarker("Custom Marker", position); if (OnMark != null) { OnMark(marker); } }