/// <summary> /// Resets the <see cref="HapticPulser.Intensity"/> to the given value. /// </summary> /// <param name="process">The process to update.</param> /// <param name="value">The value to set the Intensity to.</param> protected virtual void ResetIntensity(HapticProcess process, float?value) { HapticPulser pulser = process as HapticPulser; if (pulser != null && value != null) { pulser.Intensity = (float)value; } }
/// <summary> /// Updates the <see cref="HapticPulser.Intensity"/> on the given <see cref="HapticProcess"/>. /// </summary> /// <param name="process">The process to update</param> /// <returns>the original Intensity value to restore.</returns> protected virtual float?UpdateIntensity(HapticProcess process) { float? cachedIntensity = null; HapticPulser pulser = process as HapticPulser; if (pulser != null) { cachedIntensity = pulser.Intensity; pulser.Intensity = Facade.Intensity; } return(cachedIntensity); }