public StockingCtrl(ICompressionCtrl compressionCtrl, IVibrator vibratorCtrl, ILED ledCtrlGreen, ILED ledCtrlRed) { _compressionCtrl = compressionCtrl; _vibratorCtrl = vibratorCtrl; _LEDCtrlGreen = ledCtrlGreen; _LEDCtrlRed = ledCtrlRed; }
protected override void OnButtonPressed() { blackFillPaint.Color = SKColors.Red; IVibrator vibrator = DependencyService.Get <IVibrator>(); vibrator.Vibrate(); }
public static void SetVibrationOn(bool on) { if (on) { Generate(); } else { vibrator = null; } }
public static void Generate() { if (vibrator == null) { if (vibrator == null) { #if UNITY_EDITOR return; #elif UNITY_ANDROID vibrator = new IAndroidVibrator(); #elif UNITY_IOS vibrator = new IPhoneVibrator(); #endif } } }
/// <summary> /// Default class constructor. /// </summary> public Vibrator() { _service = DependencyService.Get <IVibrator>(); }
public StockingController(ICompressionCtrl iCompressionCtrl, IVibrator vibrator, ILEDController ledController) { _compressionCtrl = iCompressionCtrl; _vibrator = vibrator; _ledController = ledController; }