修改卡片样式
This commit is contained in:
1 parent
ab9b6a86f3
commit
164db7c013
7 files changed
+434
-132
No files matched your search
@@ -54,18 +54,33 @@ public class RaceScript : PFUIPanel
|
||||
if (currentItem != null && currentItem.Find("GetReadyContainer").gameObject.activeSelf)
|
||||
{
|
||||
var map = currentItem.GetComponent<RaceItemScript>().mapCompetition;
|
||||
var time = map.StartTime.ToLocalTime() - UIManager.Now.GetDateTime();
|
||||
if (time.TotalSeconds < 0)
|
||||
Debug.Log(map.Status);
|
||||
if (map.Status == 1)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 0;
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Application Start Time";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
|
||||
map.StartApplyTime.ToString("yyyy-MM-dd HH:mm");
|
||||
currentItem.Find("GetReadyContainer-2/Title").GetComponent<Text>().text = "Race Start Time";
|
||||
currentItem.Find("GetReadyContainer-2/Value").GetComponent<Text>().text =
|
||||
map.StartTime.ToString("yyyy-MM-dd HH:mm");
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 1;
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text
|
||||
= Utils.GetCountDown(time);
|
||||
//Dictionary<int,>
|
||||
var time = (map.Status == 1 ? map.StartTime.ToLocalTime() : map.EndTime.ToLocalTime()) - UIManager.Now.GetDateTime();
|
||||
if (time.TotalSeconds < 0)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 1;
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text
|
||||
= map.Status == 1 ? "Get Ready" : "Riding Time";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text
|
||||
= Utils.GetCountDown(time);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user