微调
This commit is contained in:
parent
3fcc6c0489
commit
570bd1554f
@ -1,5 +1,6 @@
|
||||
using Assets.Scenes.Ride.Scripts.Model;
|
||||
using Assets.Scenes.Ride.Scripts.Model.CyclingModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
@ -137,7 +138,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
competitionRankingItem.setHead(item.Headimage);
|
||||
var countryTexture = cyclingController.GetCountryImageByName(item.CountryImg);
|
||||
competitionRankingItem.setCountry(countryTexture);
|
||||
competitionRankingItem.setDistance(currentPlayer.UserId == item.UserId?"0KM": item.Near.ToString() + "KM");
|
||||
var near = Math.Round((item.EndDistance - cyclingController.currentPlayer.TotalDistance)*1000);
|
||||
competitionRankingItem.setDistance(cyclingController.currentPlayer.UserId == item.UserId?"0M": near.ToString() + "M");
|
||||
competitionRankingItem.transform.SetSiblingIndex(item.Index);
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,14 +17,14 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
GameObject countDownPanel { get; set; }
|
||||
Text title { get; set; }
|
||||
Text timer { get; set; }
|
||||
GameObject raceViewBtn { get; set; }
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
reviewPanel.SetActive(false);
|
||||
//隐藏单人骑行时间
|
||||
var spilitLineH2 = transform.Find("Panel/ComputerPanel/SpilitLineH2").gameObject;
|
||||
var raceViewBtn = transform.Find("Panel/RaceViewButton").gameObject;
|
||||
raceViewBtn.SetActive(mainController.isWatch);
|
||||
raceViewBtn = transform.Find("Panel/RaceViewButton").gameObject;
|
||||
viewButton.gameObject.SetActive(false);
|
||||
UIManager.AddEvent(raceViewBtn, UnityEngine.EventSystems.EventTriggerType.PointerClick, ChangeView);
|
||||
|
||||
@ -70,6 +70,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
private void CountDown()
|
||||
{
|
||||
raceViewBtn.SetActive(mainController.isWatch);
|
||||
miniMap.SetActive(false); //隐藏小地图
|
||||
//viewButton.gameObject.SetActive(false);//隐藏切换视角
|
||||
headPanel.SetActive(!mainController.isWatch); //隐藏海拔图观察者的头像
|
||||
|
||||
@ -51,7 +51,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//显示倒计时面板信息
|
||||
ShowCountDown(s.Item1, "Get The First Place. Time Limit");
|
||||
}
|
||||
else if (s.Item1 > 0)
|
||||
else if (s.Item1 >= 0)
|
||||
{
|
||||
//显示倒计时面板信息
|
||||
//ShowCountDown(s.Item1, "remaining");
|
||||
|
||||
@ -55,10 +55,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
cadance = mainController.UpdateCadence();
|
||||
weight = App.CurrentUser.Weight;
|
||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||
//#if UNITY_EDITOR
|
||||
power = 500;
|
||||
//#endif
|
||||
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
||||
#if UNITY_EDITOR
|
||||
power = 500;
|
||||
#endif
|
||||
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user