示例#1
0
 public void Play(Vibe p)
 {
     if (!_HasVibrator())
     {
         return;
     }
     mVibrating = true;
     CoroutineRunner.Start(PlayVibe(p));
 }
示例#2
0
        public void Vibrate(Vibe v)
        {
            if (Global.gApp.gAudioSource.vibe == 0)
            {
                return;
            }

            mVibro.Play(v);
        }
示例#3
0
            private IEnumerator PlayVibe(Vibe p)
            {
                if (p.startDelayMs > 0L)
                {
                    yield return(new WaitForSecondsRealtime(p.startDelayMs * 0.001f));

                    if (!mVibrating)
                    {
                        yield break;
                    }
                }
                if (p.durationMs >= 500L)
                {
                    _Vibrate();
                }
                else if (p.durationMs >= 100L)
                {
                    _VibratePop();
                }
                else
                {
                    _VibratePeek();
                }
            }
示例#4
0
 public void Play(Vibe vibe)
 {
     VibrateOnce(vibe);
 }
示例#5
0
 private void Fallback(Vibe vibe)
 {
     Handheld.Vibrate();
 }
示例#6
0
 private void BasicVibration(Vibe vibe)
 {
     OldVibrate(vibe);
 }
示例#7
0
            private void HapticVibration(Vibe vibe)
            {
                int amplitude = vibe.amplitude < 0 ? defaultAmplitude : vibe.amplitude;

                CreateVibrationEffect(vibrateOnceMethod, vibe.durationMs, amplitude);
            }
示例#8
0
 private void OldVibrate(Vibe v)
 {
     vibrator.Call(vibrateMethod, v.durationMs);
 }
示例#9
0
 public void Play(Vibe p)
 {
     //Debug.Log("Played single:" + p);
 }