单人骑行界面
This commit is contained in:
1 parent
cdccd78602
commit
c5586b3eb1
41 files changed
+69375
-2628
No files matched your search
@@ -25,8 +25,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
public override void InjectController(CyclingController controller)
|
||||
{
|
||||
|
||||
panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Match/LoadingPanel"), transform);
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/LoadingPanel"), transform);
|
||||
#else
|
||||
panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/LoadingPanel"), transform);
|
||||
#endif
|
||||
cyclingController = controller;
|
||||
PFUIPanel mainPanel = panel.GetComponent<PFUIPanel>();
|
||||
PFUIPanel modelPanel = transform.Find("ModalPanel").GetComponent<PFUIPanel>();
|
||||
@@ -44,6 +47,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
InitGameObject();
|
||||
InitGameObjectData();
|
||||
}
|
||||
GameObject enable3D { get; set; }
|
||||
protected override void InitGameObject()
|
||||
{
|
||||
base.InitGameObject();
|
||||
@@ -62,6 +66,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var route = cyclingController.mapRoute;
|
||||
#region 绑定路书基本信息
|
||||
//mapName.text = route.Name;
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
enable3D = panel.transform.Find("Enable3D").gameObject;
|
||||
enable3D.SetActive(route.Enable3D);
|
||||
#endif
|
||||
mapName.text = GetMaxString(route.Name, 40);
|
||||
level.text = route.Hard;
|
||||
elevaction.text = Math.Round(route.TotalClimb.GetValueOrDefault(0), 2).ToString() + "M";
|
||||
@@ -97,7 +105,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//创建排行榜
|
||||
public void CreateRankingList(List<MapRouteRanking> list)
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var prefab = Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/RankingItem");
|
||||
#else
|
||||
var prefab = Resources.Load<GameObject>("UI/Prefab/Ride/RankingItem");
|
||||
#endif
|
||||
var parent = panel.transform.Find("MapRanking");
|
||||
var title = panel.transform.Find("RankingTitle").gameObject;
|
||||
if (list.Count == 0)
|
||||
|
||||
Reference in new issue
Block a user