private void OnTrackableObjectChanged(TrackableObjectChangedEventArgs e) { var handler = TrackableObjectChanged; handler?.Invoke(this, e); }
private void trackObject_TrackableObjectChanged(object sender, TrackableObjectChangedEventArgs e) { // We should make the new camera position the same as the position of the entity, minus the centering _position = new PointF((e.NewPosition.X + e.NewSize.Width) / 2.0f - RelativeCenter.X, (e.NewPosition.Y + e.NewSize.Height) / 2.0f - RelativeCenter.Y); }