新版骑行页面前备份
This commit is contained in:
1 parent
4896fab824
commit
e7ad9473a5
85 files changed
+6816
-5424
No files matched your search
@@ -14,6 +14,7 @@ using GeoJSON.Net.Geometry;
|
||||
using TurfCS;
|
||||
using Mapbox.Utils;
|
||||
using Assets.Scripts;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class CyclingController : DeviceServiceMonoBase
|
||||
{
|
||||
@@ -42,11 +43,20 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
public bool isPause;
|
||||
#endregion
|
||||
GameObject loadingcanvas;
|
||||
|
||||
private async Task Login()
|
||||
{
|
||||
var result = await new UserApi().Login("13115011550", "laozhong", "");
|
||||
App.CurrentUser = result.data;
|
||||
}
|
||||
void Awake()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
Login();
|
||||
#endif
|
||||
//获取路书信息
|
||||
mapApi = ConfigHelper.mapApi;
|
||||
RouteId = App.RouteIdParam > 0? App.RouteIdParam : 376;
|
||||
RouteId = App.RouteIdParam > 0? App.RouteIdParam : 5492;
|
||||
MapDataModel result = mapApi.GetData(RouteId);
|
||||
mapRoute = GetNewInstace(RouteId);//获取一个路书所有的数据
|
||||
MapUDPService.Init();//初始化TCP
|
||||
@@ -101,6 +111,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
UIObject.SetActive(true);
|
||||
}
|
||||
|
||||
//设置骑行模式
|
||||
public void SetCyclingModel(CyclingModel mode)
|
||||
{
|
||||
this.cyclingModel = mode;
|
||||
@@ -116,6 +127,33 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
}
|
||||
}
|
||||
|
||||
#region
|
||||
public bool Is3dView;
|
||||
public void ChangeMapImageStyle(GameObject arrowGameObj)
|
||||
{
|
||||
if (!Is3dView)
|
||||
{
|
||||
map.Terrain.ExaggerationFactor = 1.5f;
|
||||
map.Terrain.SetElevationType(ElevationLayerType.TerrainWithElevation);
|
||||
map.ImageLayer.SetLayerSource(ImagerySourceType.Custom);
|
||||
//map.SetTileMaterial(new Material());
|
||||
player.transform.localScale = new Vector3(3f, 3f, 3f);
|
||||
Is3dView = true;
|
||||
arrowGameObj.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
map.Terrain.ExaggerationFactor = 0f;
|
||||
map.Terrain.SetElevationType(ElevationLayerType.FlatTerrain);
|
||||
map.ImageLayer.SetLayerSource(ImagerySourceType.MapboxDark);
|
||||
player.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
|
||||
Is3dView = false;
|
||||
arrowGameObj.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 游戏状态控制
|
||||
//开始骑行
|
||||
public void SetStart()
|
||||
|
||||
Reference in new issue
Block a user