Beispiel #1
0
 /// <summary> Send a vibration command based on an AnimationCurve. With optional override parameters. </summary>
 /// <param name="buzz"></param>
 /// <param name="overrideFingers"></param>
 /// <param name="magnitude"></param>
 public virtual void SendCmd(SG_Waveform buzz, bool[] overrideFingers, int magnitude)
 {
     if (buzz != null)
     {
         this.SendCmd(buzz, overrideFingers, magnitude, buzz.duration_s);
     }
 }
Beispiel #2
0
 /// <summary> Send a vibration command based on an AnimationCurve. With optional override parameters. </summary>
 /// <param name="buzz"></param>
 /// <param name="overrideFingers"></param>
 /// <param name="magnitude"></param>
 /// <param name="duration_s"></param>
 public virtual void SendCmd(SG_Waveform buzz, bool[] overrideFingers, int magnitude, float duration_s)
 {
     if (this.isActiveAndEnabled && this.lastGlove != null && buzz != null)
     {
         if (buzz.wrist && this.DeviceType != SGCore.DeviceType.SENSEGLOVE)
         {
             //Debug.Log("Converted a Waveform into a thumper cmd");
             ThumperWaveForm cmd = new ThumperWaveForm(magnitude, duration_s, buzz.waveForm, -Time.deltaTime);
             this.thumperQueue.Add(cmd);
             if (this.thumperQueue.Count > maxQueue)
             {
                 thumperQueue.RemoveAt(0);
             }
         }
         else
         {
             //Debug.Log("Converted a Waveform into a buzzCmd");
             SG_WaveFormCmd iCmd = new SG_WaveFormCmd(buzz.waveForm, duration_s, magnitude, overrideFingers, -Time.deltaTime);
             this.buzzQueue.Add(((SGCore.Haptics.SG_TimedBuzzCmd)iCmd.Copy()));
             if (this.buzzQueue.Count > maxQueue)
             {
                 buzzQueue.RemoveAt(0);
             }
         }
     }
 }
Beispiel #3
0
 /// <summary> Send a vibration command based on an AnimationCurve. With optional override parameters. </summary>
 /// <param name="buzz"></param>
 public virtual void SendCmd(SG_Waveform buzz)
 {
     if (buzz != null)
     {
         this.SendCmd(buzz, buzz.fingers, buzz.magnitude, buzz.duration_s);
     }
 }