/// <summary> /// Invokes the <see cref="SensorsUpdated"/> event. /// If the frame contains a gesture, also invokes the <see cref="GestureDetected"/> event. /// </summary> /// <param name="frame"></param> private void OnSensorsUpdated(SensorFrame frame) { if (SensorsUpdated != null) { SensorsUpdated.Invoke(frame); } if (frame.gestureId != GestureId.None) { if (GestureDetected != null) { GestureDetected.Invoke(frame.gestureId); } switch (frame.gestureId) { case GestureId.DoubleTap: if (DoubleTapDetected != null) { DoubleTapDetected.Invoke(); } break; case GestureId.None: default: throw new ArgumentOutOfRangeException(); } } }
protected virtual void OnDoubleTapDetected(SKTapDetectedEventArgs e) => DoubleTapDetected?.Invoke(this, e);