コード例 #1
0
        private void SendHapticFeedback(SimpleHapticsController simpleHapticsController, int count)
        {
            var feedback = simpleHapticsController.SupportedFeedback.FirstOrDefault(f => f.Waveform == KnownSimpleHapticsControllerWaveforms.Click);

            if (feedback != null)
            {
                simpleHapticsController.SendHapticFeedbackForPlayCount(feedback, 1, count, TimeSpan.FromMilliseconds(100));
            }
        }
コード例 #2
0
        private void SendBuzzFeedback(SimpleHapticsController hapticController)
        {
            var feedbacks = hapticController.SupportedFeedback;

            foreach (SimpleHapticsControllerFeedback feedback in feedbacks)
            {
                if (feedback.Waveform == KnownSimpleHapticsControllerWaveforms.Click)
                {
                    //Click the RadialController 3 times, with a duration of 250ms between each click
                    hapticController.SendHapticFeedbackForPlayCount(feedback, 1, 3, TimeSpan.FromMilliseconds(250));
                    return;
                }
            }
        }