示例#1
0
 void FeedBack(SteamVR_Controller.Device device, int power, float duration)
 {
     this.UpdateAsObservable()
         .TakeUntil(Observable.Timer(TimeSpan.FromMilliseconds(duration)))
         .Subscribe(v =>
         {
             device.TriggerHapticPulse((ushort)power);
         }
         );
 }