修改细节

This commit is contained in:
Caiyanpeng committed 2021-07-29 15:45:44 +08:00
1 parent 6ab3ee19f2
commit edce9c676d
18 files changed
+1735 -1368

No files matched your search

@@ -35,7 +35,7 @@ public class RaceButtonGroupScript : MonoBehaviour
}
void GoJoin()
{
UIManager.ShowConfirm("Join", "you want to join?", () =>
UIManager.ShowConfirm("Join", "Do you want to join?", () =>
{
if (!map.HasJoin)
{
@@ -54,7 +54,7 @@ public class RaceButtonGroupScript : MonoBehaviour
}
void GoCancel()
{
UIManager.ShowConfirm("Cancel Reservation", "you want to cancel reservation?", () =>
UIManager.ShowConfirm("Cancel Reservation", "Do you want to cancel reservation?", () =>
{
if (map.HasJoin)
{
@@ -23,6 +23,10 @@ public class RaceHomeScript : RaceScript
base.Show();
handleAvatar();
GetData();
if (btnGoList != null)
{
btnGoList.Find("Panel").GetComponent<CanvasGroup>().alpha = 0;
}
}
void Start()
{
@@ -68,11 +72,13 @@ public class RaceHomeScript : RaceScript
rightContainer = transform.Find("RightContainer");
leftContainer = transform.Find("LeftContainer");
btnGoList = rightContainer.Find("Container-2/BtnGoList");
UIManager.AddEvent(btnGoList.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
if (btnGoList != null)
{
UIManager.ShowRaceListPanel();
});
UIManager.AddEvent(btnGoList.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
UIManager.ShowRaceListPanel();
});
}
}
bool isEnter = false;
@@ -42,7 +42,7 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
= $"{(mapCompetition.TotalClimb ?? 0.0).ToString(mapCompetition.TotalClimb > 1000 ? "#0" : "#0.00")}M";
transform.Find("DataContainer/Slope/Text").GetComponent<Text>().text
= $"{mapCompetition.AverageGrade.ToString("#0.00")}%";
transform.Find("InfoContainer/StartTime/Text").GetComponent<Text>().text = mapCompetition.StartTime.ToString();
transform.Find("InfoContainer/StartTime/Text").GetComponent<Text>().text = mapCompetition.StartTime.ToLocalTime().ToString();
transform.Find("CountContainer/Text").GetComponent<Text>().text = mapCompetition.ApplyCount.ToString();
SetStatus(mapCompetition);
SetButtonGroup(mapCompetition);
+6 -6
View File
@@ -80,13 +80,13 @@ public class RaceScript : PFUIPanel
{
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Start for Registration";
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
map.StartApplyTime.ToString("yyyy-MM-dd HH:mm");
map.StartApplyTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
currentItem.Find("GetReadyContainer-2/Title").GetComponent<Text>().text = "Deadline for Registration";
currentItem.Find("GetReadyContainer-2/Value").GetComponent<Text>().text =
map.EndApplyTime.ToString("yyyy-MM-dd HH:mm");
map.EndApplyTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
if ((map.StartApplyTime - UIManager.Now.GetDateTime()).TotalSeconds < 0 ||
(map.StartTime - UIManager.Now.GetDateTime()).TotalSeconds < 0)
if ((map.StartApplyTime.ToLocalTime() - UIManager.Now.GetDateTime()).TotalSeconds < 0 ||
(map.StartTime.ToLocalTime() - UIManager.Now.GetDateTime()).TotalSeconds < 0)
{
var res = ConfigHelper.mapCompetitionApi.GetById(map.Id);
if (res.result)
@@ -99,7 +99,7 @@ public class RaceScript : PFUIPanel
{
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Start Time";
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
map.StartTime.ToString("yyyy-MM-dd HH:mm");
map.StartTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
}
//else if (map.Status == 4)
//{
@@ -127,7 +127,7 @@ public class RaceScript : PFUIPanel
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text
= map.HasJoin ? "Get Ready" : "Start Time";
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text
= map.HasJoin ? Utils.GetCountDown(time): map.StartTime.ToString("yyyy-MM-dd HH:mm");
= map.HasJoin ? Utils.GetCountDown(time): map.StartTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
}
}
}