예제 #1
0
 public void StartInterpolatedCurveVibration()
 {
     // Play the vibration with control points extracted from the animation curve
     // The control points are not copied, but the curve will be more accurately imitated, as the
     //      control points used are defined by the actual value of the curve at each time.
     WiggleKit.StartVibration(intensityCurve, sharpnessCurve, false, 0.05f);
 }
예제 #2
0
 public void OnApplicationFocus(bool hasFocus)
 {
     if (hasFocus)
     {
         WiggleKit.StartHapticEngine();
     }
 }
예제 #3
0
 public void StartSimpleCurveVibration()
 {
     // Play the vibration with control points matching the control points of the animation curve
     // Although the control points will be copied, the curve will not be imitated, as the in and
     //      out tangents of the control points are ignored. This is a cheaper calculation, but the
     //		vibration will be less accurate.
     WiggleKit.StartVibration(intensityCurve, sharpnessCurve, true);
 }
예제 #4
0
    void Awake()
    {
        if (_instance != null)
        {
            Destroy(gameObject);
            return;
        }

        WiggleKit.StartHapticEngine();
        DontDestroyOnLoad(gameObject);
    }
예제 #5
0
 public void StartSimpleVibration()
 {
     // Play the default vibration
     WiggleKit.StartVibration();
 }