骑行计算逻辑调整

This commit is contained in:
lishuo committed 2021-03-30 17:29:39 +08:00
1 parent 971a6f7e0e
commit 0ab0e99597
15 files changed
+309 -393

No files matched your search

@@ -1,7 +1,9 @@
namespace Mapbox.Unity.Map
{
using System.Collections;
using Mapbox.Unity.Location;
using Assets.Scenes.Ride.Scripts;
using Assets.Scripts.Apis;
using Mapbox.Unity.Location;
using UnityEngine;
public class InitializeMapWithLocationProvider : MonoBehaviour
@@ -27,7 +29,19 @@
void LocationProvider_OnLocationUpdated(Unity.Location.Location location)
{
_locationProvider.OnLocationUpdated -= LocationProvider_OnLocationUpdated;
_map.Initialize(location.LatitudeLongitude, _map.AbsoluteZoom);
//_map.Initialize(location.LatitudeLongitude, _map.AbsoluteZoom);
MapApi mapApi = new MapApi();
var result = mapApi.GetData(5492);
if (result != null)
{
//全局保存当前路线信息
GameManger.MapData = result;
//初始化map
var point = result.List[0].Point;
_map.Initialize(new Utils.Vector2d(point[0], point[1]), _map.AbsoluteZoom);
//初始化人物 TODO
}
}
}
}