/// <summary> /// Unsubscribe from the headingUpdated event, which is called when the compass heading changes /// </summary> /// <param name="headingUpdated">The delegate to unsubscribe</param> public static void UnsubscribeHeadingUpdated(this IUsesCompassHeading obj, Action <float> headingUpdated) { obj.provider.headingUpdated -= headingUpdated; }
/// <summary> /// Get the current compass heading /// </summary> /// <returns>The compass heading</returns> public static float GetHeading(this IUsesCompassHeading obj) { return(obj.provider.GetHeading()); }