Exemple #1
0
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var delay = sensorSpeed.ToPlatform();

            listener  = new GyroscopeListener();
            gyroscope = Platform.SensorManager.GetDefaultSensor(SensorType.Gyroscope);
            Platform.SensorManager.RegisterListener(listener, gyroscope, delay);
        }
Exemple #2
0
        internal static void PlatformStop()
        {
            if (listener == null || gyroscope == null)
            {
                return;
            }

            Platform.SensorManager.UnregisterListener(listener, gyroscope);
            listener.Dispose();
            listener = null;
        }