android端发布前微调
This commit is contained in:
1 parent
d38330d969
commit
bd9696cd81
34 files changed
+859
-934
No files matched your search
@@ -309,25 +309,25 @@ public class MainController : BaseScene
|
||||
//{
|
||||
// UIManager.ShowHomePanel();
|
||||
//});
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
//#if UNITY_ANDROID || UNITY_IOS
|
||||
|
||||
#region 划船机功能:隐藏骑行
|
||||
UIManager.ShowRowerPanel();
|
||||
return;
|
||||
#endregion
|
||||
if (!App.IsRowerMode.HasValue)
|
||||
{
|
||||
UIManager.ShowHomePanel();
|
||||
UIManager.ShowRowerSelector();
|
||||
return;
|
||||
}
|
||||
if (App.IsRowerMode == true)
|
||||
{
|
||||
UIManager.ShowHomePanel();
|
||||
UIManager.ShowRowerPanel();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// #region 划船机功能:隐藏骑行
|
||||
// UIManager.ShowRowerPanel();
|
||||
// return;
|
||||
// #endregion
|
||||
// if (!App.IsRowerMode.HasValue)
|
||||
// {
|
||||
// UIManager.ShowHomePanel();
|
||||
// UIManager.ShowRowerSelector();
|
||||
// return;
|
||||
// }
|
||||
// if (App.IsRowerMode == true)
|
||||
// {
|
||||
// UIManager.ShowHomePanel();
|
||||
// UIManager.ShowRowerPanel();
|
||||
// return;
|
||||
// }
|
||||
//#endif
|
||||
LastRide();//检查本地异常中断的骑行并弹窗提示继续
|
||||
if (App.MainSceneParam.ContainsKey("Name") && !string.IsNullOrEmpty(App.MainSceneParam["Name"]))
|
||||
{
|
||||
|
||||
@@ -291,6 +291,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//计算当前海拔和坡度&当前区间距离
|
||||
elevation = pointList[CurrentIndex].Elevation;
|
||||
currentSlope = pointList[CurrentIndex].Grade;
|
||||
//格式化坡度最大不能超过15,-15
|
||||
PreSlope = PreSlope > 0 ?Math.Min(PreSlope, 15) : Math.Max(PreSlope, -15);
|
||||
currentSlope = currentSlope > 0? Math.Min(PreSlope, 15) : Math.Max(PreSlope, -15);
|
||||
CurrentDistance = pointList[CurrentIndex].Distance;
|
||||
//计算下一个海拔和坡度&当前区间距离
|
||||
nextSlope = pointList[nextIndex].Grade;
|
||||
|
||||
@@ -148,22 +148,12 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
DrawMapRouteAsync(route.Id);
|
||||
AddProcess(10);
|
||||
//查询排行榜
|
||||
var list = mapApi.GetRouteRanking(route.Id, "1", 0, 10000, "");
|
||||
var list = mapApi.GetRouteRanking(route.Id, "1", 0, 8, "");
|
||||
if (list.result)
|
||||
{
|
||||
//if (list.data.list.Count > RankingPageSize)
|
||||
//{
|
||||
// var ViewAll = panel.transform.Find("ViewAll").gameObject;
|
||||
// ViewAll.SetActive(true);
|
||||
// UIManager.AddEvent(ViewAll, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
// {
|
||||
// Application.OpenURL($"{App.CurrentUser.WebHost}Routes/{cyclingController.mapRoute.Id}?Token={App.CurrentUser.cookie}");
|
||||
// });
|
||||
//}
|
||||
CreateRankingList(list.data.list);
|
||||
AddProcess(10);
|
||||
}
|
||||
//StartCoroutine(HiddenLoading());
|
||||
}
|
||||
|
||||
//创建排行榜
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
}
|
||||
}
|
||||
//显示人物海拔图的头像
|
||||
public void CreateHeadImage()
|
||||
protected virtual void CreateHeadImage()
|
||||
{
|
||||
if (head == null)
|
||||
{
|
||||
|
||||
@@ -96,6 +96,12 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
{
|
||||
base.ComputeVideo();
|
||||
}
|
||||
protected override void CreateHeadImage()
|
||||
{
|
||||
base.CreateHeadImage();
|
||||
if (diff < 0)
|
||||
((RectTransform)head.transform).anchoredPosition = new Vector2(((RectTransform)head.transform).anchoredPosition.x, -800f);
|
||||
}
|
||||
|
||||
//设置当前玩家属性
|
||||
public void SetPlayer(string name, double distance, double totalDistance, double cadance,double heartRate, double wkg, int userId,double power,double currentPlayerDistance,int frame)
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace Assets.Scripts.Scenes.VideoRide
|
||||
recorderData.PreDistance = Math.Round(preDistance, 6, MidpointRounding.AwayFromZero);
|
||||
recorderData.EndDistance = Math.Round(targetData._Distance, 6, MidpointRounding.AwayFromZero);
|
||||
recorderData.RiderDatas.Add(targetData);
|
||||
|
||||
//默认启用多圈
|
||||
//if (totalDistance >= mapData.TotalDistance)
|
||||
//{
|
||||
// start = false;
|
||||
|
||||
@@ -196,7 +196,9 @@ public class ActivityController : PFUIPanel
|
||||
{
|
||||
CancelInvoke("StartPageFunc");
|
||||
Close();
|
||||
//webView.LoadHTMLString("<div style=\"background:#23232d\" />", this.url);
|
||||
#if !UNITY_STANDALONE_WIN
|
||||
webView.LoadHTMLString("<div style=\"background:#23232d\" />", this.url);
|
||||
#endif
|
||||
//Destroy(gameObject);
|
||||
//UIManager.Instance.mActivityController = null;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,9 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
deviceList = new Dictionary<string, DeviceItem>();
|
||||
|
||||
var container = this.transform.Find("GameObject");
|
||||
|
||||
deviceNotFound = container.Find("Panel/Error").gameObject;
|
||||
|
||||
var closeBtn = container.Find("CloseBtn");
|
||||
Logo = container.Find("Logo").GetComponent<Image>();
|
||||
Title = container.Find("Title").GetComponent<Text>();
|
||||
@@ -261,7 +263,9 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
//如果没有可连接的设备按钮只读
|
||||
connectBtn.mButton.enabled = deviceList.Count > 0;
|
||||
connectBtn.mButton.interactable = deviceList.Count > 0;
|
||||
|
||||
deviceNotFound.SetActive(deviceList.Count <= 0);
|
||||
|
||||
}
|
||||
}
|
||||
//选中需要连接的设备
|
||||
|
||||
@@ -151,13 +151,43 @@ public class DeviceView : MonoBehaviour
|
||||
{
|
||||
return;
|
||||
}
|
||||
mDisconnectButtonClick();
|
||||
var device = GetDevice();
|
||||
if (device != null && device.State == DeviceState.Connected)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warning"), App.GetLocalString("Disconnect the device?"), () =>
|
||||
{
|
||||
device.Disconnect(false);
|
||||
DeviceCache.Remove(device);
|
||||
UIManager.CloseConfirm();
|
||||
}, 2, () => {
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
mDisconnectButtonClick();
|
||||
}
|
||||
}));
|
||||
#endif
|
||||
|
||||
|
||||
UIManager.AddEvent(mDisconnectButton, EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<BaseEventData>(e => {
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var device = GetDevice();
|
||||
if (device != null && device.State == DeviceState.Connected)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warning"), App.GetLocalString("Disconnect the device?"), () =>
|
||||
{
|
||||
device.Disconnect(false);
|
||||
DeviceCache.Remove(device);
|
||||
UIManager.CloseConfirm();
|
||||
}, 2, () => {
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
}
|
||||
#else
|
||||
mDisconnectButtonClick();
|
||||
#endif
|
||||
}));
|
||||
|
||||
}
|
||||
@@ -280,8 +310,6 @@ public class DeviceView : MonoBehaviour
|
||||
|
||||
logo.sprite = sprite0;
|
||||
|
||||
searchState.text = App.GetLocalString("Searching...");
|
||||
|
||||
var hasDevice = false;
|
||||
if (SensorType == SensorType.SpeedCadence) {
|
||||
hasDevice = App.MainDeviceAdapter.GetDevices().Any(d => d.Sensor == SensorType.SpeedCadence || d.Sensor == SensorType.Cadence);
|
||||
@@ -289,8 +317,10 @@ public class DeviceView : MonoBehaviour
|
||||
else {
|
||||
hasDevice = App.MainDeviceAdapter.GetDevices().Any(d => d.Sensor == SensorType);
|
||||
}
|
||||
noDevice.text = hasDevice? App.GetLocalString("CHOOSE DEVICE") : App.GetLocalString("NO DEVICE");
|
||||
//Debug.Log(hasDevice);
|
||||
|
||||
searchState.text = hasDevice ? App.GetLocalString("CHOOSE DEVICE") : App.GetLocalString("NO DEVICE");
|
||||
noDevice.text = "";// App.GetLocalString("NOCONN DEVICE"); //hasDevice ? App.GetLocalString("CHOOSE DEVICE") : ;
|
||||
|
||||
if (hasDevice)
|
||||
{
|
||||
mSearchButton.SetActive(false);
|
||||
|
||||
@@ -92,7 +92,7 @@ public class MainNav : MonoBehaviour
|
||||
|
||||
private void ShowMailDot(object sender, EventArgs e)
|
||||
{
|
||||
if (transform)
|
||||
if (transform!=null)
|
||||
{
|
||||
transform.Find("Mail/Dot").gameObject.SetActive((bool)sender);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class NewMainNav : MonoBehaviour
|
||||
this.custom = custom;
|
||||
this.custom2 = custom2;
|
||||
this.custom3 = custom3;
|
||||
if (custom != null)
|
||||
if (custom != null)
|
||||
{
|
||||
transform.Find("Custom").GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
transform.Find("Custom").GetComponent<Button>().onClick.AddListener(custom.action);
|
||||
|
||||
@@ -72,7 +72,7 @@ public class BigMapController : PFUIPanel
|
||||
StartCoroutine("Main");
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var nav = transform.Find("Canvas/Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2,
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 6, 7 }, 2,
|
||||
custom: new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/搜索"), () =>
|
||||
{
|
||||
mapManager.Destroy();
|
||||
|
||||
@@ -71,7 +71,7 @@ public class EarthController : PFUIPanel
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
SetRounded(panel.transform, 20);
|
||||
var nav = transform.Find("Canvas/Panel/Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2,
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 6, 7 }, 2,
|
||||
custom: new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/搜索"), () =>
|
||||
{
|
||||
UIManager.ShowNewRouteOverviewPanel();
|
||||
|
||||
@@ -46,6 +46,7 @@ public class HomeController : PFUIPanel
|
||||
{
|
||||
UIManager.ShowRowerSelector();
|
||||
},false));
|
||||
nav.HideButton("Custom");
|
||||
newNav = nav;
|
||||
UIManager.AddEvent(transform.Find("TodayData/Datas/Distance").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
|
||||
@@ -103,7 +103,7 @@ public class MapListController : PFUIPanel
|
||||
map = Resources.Load<GameObject>("UI/Prefab/MapList/MapItem-Mobile");
|
||||
Debug.Log(98);
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0,
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 6, 7 }, 0,
|
||||
new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Mobile/map_筛选"), () =>
|
||||
{
|
||||
OpenFilter(false);
|
||||
@@ -585,4 +585,8 @@ public class MapListController : PFUIPanel
|
||||
GC.Collect();
|
||||
Debug.Log("list empty");
|
||||
}
|
||||
protected override void OnDisable()
|
||||
{
|
||||
App.CurrentRouteType = "";
|
||||
}
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class NewRouteDetailController : PFUIPanel
|
||||
});
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0);
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 6, 7 }, 0);
|
||||
newNav = nav;
|
||||
|
||||
#else
|
||||
|
||||
@@ -67,7 +67,7 @@ public class NewRouteOverviewController: PFUIPanel
|
||||
tmpItem = Resources.Load<Transform>("UI/Prefab/NewRoute/RouteItem");
|
||||
#else
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2,
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 6, 7 }, 2,
|
||||
new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/map_mode"),()=>
|
||||
{
|
||||
UIManager.PopStack();
|
||||
|
||||
@@ -76,7 +76,7 @@ public class RaceHomeScript : RaceScript
|
||||
#else
|
||||
btnGoList = rightContainer.Find("BtnGoList");
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 2, 3, 4, 6, 7 }, 2);
|
||||
nav.SetButtonActive(new List<int> { 2, 3,6, 7 }, 2);
|
||||
newNav = nav;
|
||||
#endif
|
||||
if (btnGoList != null)
|
||||
|
||||
@@ -248,7 +248,7 @@ public class RaceListScript : RaceScript
|
||||
CloseFilter();
|
||||
});
|
||||
var nav = transform.Find("Tmp/MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0,
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 6, 7 }, 0,
|
||||
custom: new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Mobile/map_筛选"), () =>
|
||||
{
|
||||
OpenFilter();
|
||||
|
||||
@@ -119,18 +119,19 @@ public class ResultListController : PFUIPanel
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
GetList(2);
|
||||
#endif
|
||||
#region 划船机功能:隐藏骑行记录
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
btnRower.transform.localPosition = new Vector3(btnRower.transform.localPosition.x, btnRoute.transform.localPosition.y, btnRower.transform.localPosition.z);
|
||||
btnRoute.gameObject.SetActive(false);
|
||||
btnMatch.gameObject.SetActive(false);
|
||||
transform.Find("ListPanel/Line").gameObject.SetActive(false);
|
||||
transform.Find("ListPanel/Line2").gameObject.SetActive(false);
|
||||
StartScroll(2);
|
||||
//scrollContent.localPosition = new Vector3(674 * -2, scrollContent.localPosition.y, scrollContent.localPosition.z);//.DOLocalMoveX(674 * index * -1, 0.3f);
|
||||
//btnRower.GetComponent<Text>().color = Utils.HexToColor("#ffffff");
|
||||
#endif
|
||||
#endregion
|
||||
btnRower.gameObject.SetActive(false);
|
||||
// #region 划船机功能:隐藏骑行记录
|
||||
//#if UNITY_ANDROID || UNITY_IOS
|
||||
// btnRower.transform.localPosition = new Vector3(btnRower.transform.localPosition.x, btnRoute.transform.localPosition.y, btnRower.transform.localPosition.z);
|
||||
// btnRoute.gameObject.SetActive(false);
|
||||
// btnMatch.gameObject.SetActive(false);
|
||||
// transform.Find("ListPanel/Line").gameObject.SetActive(false);
|
||||
// transform.Find("ListPanel/Line2").gameObject.SetActive(false);
|
||||
// StartScroll(2);
|
||||
// //scrollContent.localPosition = new Vector3(674 * -2, scrollContent.localPosition.y, scrollContent.localPosition.z);//.DOLocalMoveX(674 * index * -1, 0.3f);
|
||||
// //btnRower.GetComponent<Text>().color = Utils.HexToColor("#ffffff");
|
||||
//#endif
|
||||
// #endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user