附近的人
This commit is contained in:
1 parent
725b510748
commit
2fcd9b23fa
94 files changed
+7063
-2007
No files matched your search
@@ -30,7 +30,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var mapdata = cyclingCotroller.GetMapData();
|
||||
//初始化map
|
||||
var point = cyclingCotroller.GetCenterCoordinate();
|
||||
if (_map != null)
|
||||
if (_map != null && mapdata !=null)
|
||||
{
|
||||
_map.OnInitialized += _map_OnInitialized;
|
||||
_map.OnUpdated += _map_OnUpdated;
|
||||
@@ -44,7 +44,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
_player.transform.localPosition = _map.GeoToWorldPosition(playerController.Nextlatlong);
|
||||
if (playerController != null)
|
||||
{
|
||||
_player.transform.localPosition = _map.GeoToWorldPosition(playerController.Nextlatlong);
|
||||
}
|
||||
}
|
||||
private bool init = false;
|
||||
private void _map_OnInitialized()
|
||||
@@ -86,7 +89,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var sw_world = _minicamera.ViewportToWorldPoint(new Vector3(0, 0, 180));
|
||||
var sw = _map.WorldToGeoPosition(sw_world);
|
||||
|
||||
var ne_world = _minicamera.ViewportToWorldPoint(new Vector3(0.6f, 0.6f, 180));
|
||||
var ne_world = _minicamera.ViewportToWorldPoint(new Vector3(0.6f, 1f, 180));
|
||||
var ne = _map.WorldToGeoPosition(ne_world);
|
||||
|
||||
return new Vector2dBounds(new Vector2d(sw.x, sw.y), new Vector2d(ne.x, ne.y));
|
||||
|
||||
Reference in new issue
Block a user