骑行计算逻辑调整
This commit is contained in:
1 parent
398628017c
commit
60d12fcab2
15 files changed
+310
-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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user