0606修改
This commit is contained in:
1 parent
6effadc1e9
commit
bfc56dded5
8 files changed
+8760
-7881
No files matched your search
@@ -98,6 +98,7 @@ namespace Assets.Scripts.Apis.Models
|
||||
public int Nid { get; set; }
|
||||
public double Ticks { get; set; }
|
||||
public int rankNum { get; set; }
|
||||
public string GradeStr { get; set; }
|
||||
}
|
||||
|
||||
public class Info
|
||||
|
||||
@@ -236,14 +236,24 @@ public class RowerHomeScript : PFUIPanel
|
||||
if (checkRowing()) return;
|
||||
UIManager.ShowRowerDevicePanel();
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("Stopped/DeviceStatus").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
if (checkRowing()) return;
|
||||
UIManager.ShowRowerDevicePanel();
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("Stopped/DeviceStatusConnect").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
if (checkRowing()) return;
|
||||
UIManager.ShowRowerDevicePanel();
|
||||
});
|
||||
//手机版tab
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var nav = transform.Find("MainNav-mobile").GetComponent<NewMainNav>();
|
||||
var c1 = new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/RowerNew/ICON_create_44"), () =>
|
||||
{
|
||||
//UIManager.ShowRowerWelldone("33171855-66FC-4121-935C-0F4DA98E5BB2", Init);
|
||||
//UIManager.ShowRowerWelldone("31C5A37D-6ADD-4EE1-B6DA-5AA2F9949C4B", Init);
|
||||
//return;
|
||||
|
||||
|
||||
//UIManager.ShowRowerWelldone("C0F81E83-120B-4A2C-AD0E-8BC1B8EB3E74", Init);
|
||||
//return;
|
||||
if (checkRowing()) return;
|
||||
@@ -287,7 +297,7 @@ public class RowerHomeScript : PFUIPanel
|
||||
rowerType = new RowerType { type = 1, value = 500 };
|
||||
HandleSelectType();
|
||||
Init();
|
||||
|
||||
isFirstReset = false;
|
||||
}
|
||||
|
||||
RowerResultModel reRowData = null;
|
||||
@@ -1268,15 +1278,27 @@ public class RowerHomeScript : PFUIPanel
|
||||
MSText.text = rate.ToString();
|
||||
|
||||
}
|
||||
bool isFirstReset = false;
|
||||
void HandleStatic()
|
||||
{
|
||||
var flag = Rower != null && RowerData != null;
|
||||
if (transform.Find("Ready").gameObject.activeInHierarchy)
|
||||
{
|
||||
var flag = Rower != null && RowerData != null;
|
||||
transform.Find("Ready/DeviceStatus").gameObject.SetActive(!flag);
|
||||
transform.Find("Ready/Img").gameObject.SetActive(flag);
|
||||
transform.Find("Ready/Text").gameObject.SetActive(flag);
|
||||
transform.Find("Ready/DeviceStatusConnect").gameObject.SetActive(flag);
|
||||
if (!isFirstReset && flag)
|
||||
{
|
||||
isFirstReset = true;
|
||||
Rower.Reset();
|
||||
RowerData.Reset();
|
||||
}
|
||||
}
|
||||
if (transform.Find("Stopped").gameObject.activeInHierarchy)
|
||||
{
|
||||
transform.Find("Stopped/DeviceStatus").gameObject.SetActive(!flag);
|
||||
transform.Find("Stopped/DeviceStatusConnect").gameObject.SetActive(flag);
|
||||
}
|
||||
if (Rower != null)
|
||||
{
|
||||
|
||||
@@ -250,9 +250,8 @@ public class RowerDeviceView : MonoBehaviour
|
||||
connectionPanel.SetActive(false);
|
||||
|
||||
logo.sprite = sprite0;
|
||||
noDevice.text = App.GetLocalString("NO DEVICE");
|
||||
searchState.text = App.GetLocalString("Searching...");
|
||||
|
||||
searchState.text = App.GetLocalString("Searching...");
|
||||
var hasDevice = false;
|
||||
if (SensorType == SensorType.SpeedCadence)
|
||||
{
|
||||
@@ -262,6 +261,7 @@ public class RowerDeviceView : MonoBehaviour
|
||||
{
|
||||
hasDevice = App.MainDeviceAdapter.GetDevices().Any(d => d.Sensor == SensorType);
|
||||
}
|
||||
noDevice.text = hasDevice ? App.GetLocalString("CHOOSE DEVICE") : App.GetLocalString("NO DEVICE");
|
||||
if (hasDevice)
|
||||
{
|
||||
mSearchButton.SetActive(false);
|
||||
|
||||
@@ -124,7 +124,14 @@ public class RowerWelldone : PFUIPanel
|
||||
game.transform.Find("Content/Rank").GetComponent<Text>().text = item.rankNum.ToString("00");
|
||||
game.transform.Find("Content/NickName").GetComponent<Text>().text = item.NickName;
|
||||
Utils.DisplayImageTempDict(game.transform.Find("Content/Avatar").GetComponent<RawImage>(), item.WxHeadImg, caches);
|
||||
game.transform.Find("Content/Time").GetComponent<Text>().text = data.info.Type == 1 ? TimeSpan.FromSeconds(item.Ticks).ToString(@"hh\:mm\:ss") : item.TotalDistance.ToString("#0M");
|
||||
if (item.GradeStr.Contains("DNF"))
|
||||
{
|
||||
game.transform.Find("Content/Time").GetComponent<Text>().text = "DNF";
|
||||
}
|
||||
else
|
||||
{
|
||||
game.transform.Find("Content/Time").GetComponent<Text>().text = data.info.Type == 1 ? TimeSpan.FromSeconds(item.Ticks).ToString(@"hh\:mm\:ss") : item.TotalDistance.ToString("#0M");
|
||||
}
|
||||
game.transform.SetParent(rankContent);
|
||||
game.transform.localScale = Vector3.one;
|
||||
game.SetActive(true);
|
||||
|
||||
Reference in new issue
Block a user