细节调整
This commit is contained in:
1 parent
bbc3deeef2
commit
02b8f97d83
16 files changed
+3692
-3565
No files matched your search
@@ -63,8 +63,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
//获取路书信息
|
||||
mapApi = ConfigHelper.mapApi;
|
||||
routeId = App.RouteIdParam > 0? App.RouteIdParam : 2633;
|
||||
mapRoute = mapApi.GetById(routeId).data;
|
||||
miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
//mapRoute = mapApi.GetById(routeId).data;
|
||||
//miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
resultPanel = transform.Find("SingleUI/Panel/ResultPanel").gameObject;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
loadingController = FindObjectOfType<LoadingController>();
|
||||
loadingController.InjectController(this);
|
||||
//开始loading
|
||||
Init();
|
||||
StartCoroutine(Init());
|
||||
}
|
||||
|
||||
public void AddEvent(GameObject sender, EventTriggerType eventType,UnityAction<BaseEventData> unityAction)
|
||||
@@ -92,14 +92,17 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
{
|
||||
return UIManager.Instance.loginRegOptions.GetCountryImageByName(name);
|
||||
}
|
||||
private void Init()
|
||||
private IEnumerator Init()
|
||||
{
|
||||
loadingController.Init(mapRoute);//初始化loading页面 10
|
||||
loadingController.AddProcess(10);
|
||||
MapUDPService.Init();//初始化TCP
|
||||
yield return new WaitForSeconds(1);
|
||||
mapRoute = mapApi.GetById(routeId).data;
|
||||
miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
loadingController.Init(mapRoute);//初始化loading页面
|
||||
loadingController.AddProcess(10);
|
||||
InitData();//初始化数据
|
||||
InitGameObject();//初始化场景
|
||||
MapUDPService.Init();//初始化TCP
|
||||
loadingController.AddProcess(10);
|
||||
}
|
||||
//初始化数据
|
||||
private void InitData()
|
||||
@@ -134,6 +137,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
App.routeResult = null;
|
||||
|
||||
#endregion
|
||||
//异步请求mapbox画出当前路书路线图
|
||||
loadingController.DrawMapRoute(mapData);
|
||||
//计算上次骑行距离调整地图中心点
|
||||
double endDistance = selectParamModel.EndDistance;
|
||||
coordiantes = Along(endDistance);
|
||||
@@ -146,8 +151,6 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
loadingController.CreateRankingList(mapRouteRankingList);
|
||||
loadingController.AddProcess(10);
|
||||
}
|
||||
//异步请求mapbox画出当前路书路线图
|
||||
loadingController.DrawMapRoute(mapData);
|
||||
}
|
||||
//加载人物和地图以及UI界面
|
||||
private void InitGameObject()
|
||||
@@ -269,14 +272,15 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
cyclingController.recorderData.AntModelId = AntModelId;
|
||||
cyclingController.recorderData.ManufacturerId = ManufacturerId;
|
||||
cyclingController.recorderData.DeviceNumber = DeviceNumber;
|
||||
#if !UNITY_EDITOR
|
||||
cyclingController.recorderData.SaveData(cyclingModel, selectParamModel, imageFileName);
|
||||
#endif
|
||||
//显示骑行结果
|
||||
resultPanel.SetActive(true);
|
||||
var rs = resultPanel.GetComponent<ResultPanelScript>();
|
||||
rs.InjectController(this);
|
||||
rs.SetDataSource(cyclingController.recorderData);
|
||||
#if !UNITY_EDITOR
|
||||
cyclingController.recorderData.SaveData(cyclingModel, selectParamModel, imageFileName);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
protected string CaptureCamera(Camera camera, Rect rect)
|
||||
|
||||
Reference in new issue
Block a user