[TASK] Initial commit with basic product setup
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
namespace Mapbox.Unity.Location
|
||||
{
|
||||
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Wrap Unity's LocationService into MapboxLocationService
|
||||
/// </summary>
|
||||
public class MapboxLocationServiceUnityWrapper : IMapboxLocationService
|
||||
{
|
||||
|
||||
public bool isEnabledByUser { get { return Input.location.isEnabledByUser; } }
|
||||
|
||||
|
||||
public LocationServiceStatus status { get { return Input.location.status; } }
|
||||
|
||||
|
||||
public IMapboxLocationInfo lastData { get { return new MapboxLocationInfoUnityWrapper(Input.location.lastData); } }
|
||||
|
||||
|
||||
public void Start(float desiredAccuracyInMeters, float updateDistanceInMeters)
|
||||
{
|
||||
Input.location.Start(desiredAccuracyInMeters, updateDistanceInMeters);
|
||||
}
|
||||
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
Input.location.Stop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user