public CameraWrapper(Racer racer) { stage = CameraStage.ShipSelect; this.racer = racer; properties = new SharedCameraProperties(Viewports.fullViewport); revolveCamera = new RevolveCamera(ref properties); currentCamera = revolveCamera; #if WINDOWS mouseCamera = new MouseCamera(ref properties, getShipPosition, getShipOrientation); #endif }
private void SetStage(CameraStage calibStage) { myCanvas.Children.Clear(); if (calibStage == CameraStage.First) visualHost = new MyVisualHost(true); else visualHost = new MyVisualHost(true, sampleOneCamera, sampleOneCamera); myCanvas.Children.Add(visualHost); visualHost.onPositionChanged += new MyVisualHost.PositionChanged(visualHost_onPositionChanged); curStage = calibStage; visualHost.Stage = curStage; myCanvas.InvalidateVisual(); if (calibStage == CameraStage.Second) { txtVolumeH.IsEnabled = false; txtVolumeL.IsEnabled = false; txtHeightH.IsEnabled = false; txtHeightL.IsEnabled = false; btnNext.IsEnabled = false; btnNext.Content = "完成"; workingCameraID = 2; } SetHint(); }