// Use this for initialization
    void Start()
    {
        shakePlugin = ShakePlugin.GetInstance();
        shakePlugin.SetDebug(0);
        shakePlugin.Init();
        SetSensitivitySlider();
        SetDelayUpdateSlider();

        shakePlugin.SetCallbackListener(OnShake);
        shakePlugin.RegisterSensorListener();
    }
    // Use this for initialization
    void Start()
    {
        shakePlugin = ShakePlugin.GetInstance();
        shakePlugin.SetDebug(0);
        shakePlugin.Init();
        SetSensitivitySlider();
        SetDelayUpdateSlider();

        shakePlugin.SetCallbackListener(OnShake);
        shakePlugin.RegisterSensorListener();
    }
 private void OnApplicationPause(bool val)
 {
     if (val)
     {
         if (shakePlugin != null)
         {
             shakePlugin.RemoveSensorListener();
         }
     }
     else
     {
         if (shakePlugin != null)
         {
             shakePlugin.RegisterSensorListener();
         }
     }
 }
 private void OnApplicationPause(bool val)
 {
     if (val)
     {
         if (shakePlugin != null)
         {
             shakePlugin.RemoveSensorListener();
         }
     }
     else
     {
         if (shakePlugin != null)
         {
             shakePlugin.RegisterSensorListener(SensorDelay.SENSOR_DELAY_NORMAL);
         }
     }
 }