Table of Contents

Class Accelerometer

Namespace
MonoGame.Framework.Devices.Sensors
Assembly
MonoGame.Framework.dll

Provides Desktop applications access to the device's accelerometer sensor. Currently stubs, for cross-platform development.

public sealed class Accelerometer : SensorBase<AccelerometerReading>, IDisposable
Inheritance
Accelerometer
Implements
Inherited Members

Constructors

Accelerometer()

Creates a new instance of the Accelerometer object.

public Accelerometer()

Properties

IsSupported

Gets or sets whether the device on which the application is running supports the accelerometer sensor.

public static bool IsSupported { get; }

Property Value

bool

State

Gets the current state of the accelerometer. The value is a member of the SensorState enumeration.

public SensorState State { get; }

Property Value

SensorState

Methods

Dispose(bool)

Derived classes override this method to dispose of managed and unmanaged resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

True if unmanaged resources are to be disposed.

Start()

Starts data acquisition from the accelerometer.

public override void Start()

Stop()

Stops data acquisition from the accelerometer.

public override void Stop()