Merge remote-tracking branch 'origin/dev_cyp' into dev_lishuo
# Conflicts: # Assets/Scripts/Apis/Models/MapCompetition.cs
This commit is contained in:
commit
4a8239a2db
18 files changed
+1541
-286
No files matched your search
@@ -10,10 +10,10 @@ namespace Assets.Scripts.UI.Prefab.Race
|
||||
{
|
||||
public static Dictionary<string, string> statusDict = new Dictionary<string, string>()
|
||||
{
|
||||
{"Not started","1" },
|
||||
{"Appling","2" },
|
||||
{"All","" },
|
||||
{"Not started","1,2" },
|
||||
{"Racing","3" },
|
||||
{"Finished","4" },
|
||||
{"Done","4" },
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ public class RaceHomeScript : RaceScript
|
||||
{
|
||||
base.Show();
|
||||
handleAvatar();
|
||||
GetData();
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
@@ -58,8 +59,7 @@ public class RaceHomeScript : RaceScript
|
||||
UIManager.ShowRaceListPanel();
|
||||
};
|
||||
});
|
||||
handleAvatar();
|
||||
GetData();
|
||||
|
||||
}
|
||||
|
||||
async void GetData()
|
||||
@@ -87,6 +87,15 @@ public class RaceHomeScript : RaceScript
|
||||
// game.transform.SetParent(rightContainer.Find("Container-1"));
|
||||
// game.transform.localScale = Vector3.one;
|
||||
//}
|
||||
foreach (Transform t in rightContainer.Find("Container-2"))
|
||||
{
|
||||
if (t.name != "BtnGoList")
|
||||
{
|
||||
t.gameObject.Destroy();
|
||||
}
|
||||
}
|
||||
scroll.transform.Find("DotList").DestroyChildren();
|
||||
scroll.content.DestroyChildren();
|
||||
for (; i < list.Count; i++)
|
||||
{
|
||||
var game = Instantiate<GameObject>(smallGame);
|
||||
|
||||
@@ -30,7 +30,7 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
Utils.DisplayImage(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, true);
|
||||
Utils.DisplayImage(transform.Find("AltitudeCurve").GetComponent<RawImage>(), mapCompetition.AltitudeGraph, true);
|
||||
transform.Find("InfoContainer/Text").GetComponent<Text>().SetTextWithEllipsis(mapCompetition.Title);
|
||||
transform.Find("GetReadyContainer").gameObject.SetActive(mapCompetition.Status != 4);
|
||||
transform.Find("GetReadyContainer").gameObject.SetActive(mapCompetition.Status != 3);
|
||||
transform.Find("GetReadyContainer-2").gameObject.SetActive(mapCompetition.Status == 1);
|
||||
//transform.Find("Text").GetComponent<Text>().text = mapCompetition.Title;
|
||||
//props.Find("DistanceText").GetComponent<Text>().text = $"{myMap.Distance.ToString(myMap.Distance > 1000 ? "#0" : "#0.00")}KM";
|
||||
@@ -55,71 +55,89 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
|
||||
private void SetButtonGroup(MapCompetition mapCompetition)
|
||||
{
|
||||
if (mapCompetition.Status == 1)
|
||||
{
|
||||
var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Enter");
|
||||
var igame = Instantiate(game);
|
||||
igame.name = "BtnContainer";
|
||||
igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
igame.transform.SetParent(transform);
|
||||
igame.transform.localScale = Vector3.one;
|
||||
var loc = Vector3.zero;
|
||||
loc.y = myType == ItemType.big ? -252 : -257;
|
||||
igame.transform.localPosition = loc;
|
||||
}
|
||||
else if (mapCompetition.Status == 4)
|
||||
{
|
||||
var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Watch");
|
||||
var igame = Instantiate(game);
|
||||
igame.name = "BtnContainer";
|
||||
igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
igame.transform.SetParent(transform);
|
||||
igame.transform.localScale = Vector3.one;
|
||||
var loc = Vector3.zero;
|
||||
loc.y = myType == ItemType.big ? -252 : -257;
|
||||
igame.transform.localPosition = loc;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (myType == ItemType.big)
|
||||
{
|
||||
var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Double-H");
|
||||
var igame = Instantiate(game);
|
||||
igame.name = "BtnContainer";
|
||||
igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
igame.transform.Find("BtnJoin").gameObject.SetActive(mapCompetition.CanJoin);
|
||||
igame.transform.Find("BtnCancel").gameObject.SetActive(mapCompetition.HasJoin);
|
||||
igame.transform.SetParent(transform);
|
||||
igame.transform.localScale = Vector3.one;
|
||||
igame.transform.GetComponent<RectTransform>().anchorMax = new Vector2(0, 0);
|
||||
igame.transform.GetComponent<RectTransform>().anchorMin = new Vector2(1, 0);
|
||||
igame.transform.GetComponent<RectTransform>().pivot = new Vector2(0.5f, 0);
|
||||
var loc = Vector3.zero;
|
||||
loc.y = 20;
|
||||
igame.transform.GetComponent<RectTransform>().anchoredPosition = loc;
|
||||
}
|
||||
else
|
||||
{
|
||||
var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Double-V");
|
||||
var igame = Instantiate(game);
|
||||
igame.name = "BtnContainer";
|
||||
igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
igame.transform.Find("BtnJoin").gameObject.SetActive(mapCompetition.CanJoin);
|
||||
igame.transform.Find("BtnCancel").gameObject.SetActive(mapCompetition.HasJoin);
|
||||
igame.transform.SetParent(transform);
|
||||
igame.transform.localScale = Vector3.one;
|
||||
igame.transform.GetComponent<RectTransform>().anchorMax = new Vector2(0, 0);
|
||||
igame.transform.GetComponent<RectTransform>().anchorMin = new Vector2(1, 0);
|
||||
igame.transform.GetComponent<RectTransform>().pivot = new Vector2(0.5f, 0);
|
||||
var loc = Vector3.zero;
|
||||
loc.y = 20;
|
||||
igame.transform.GetComponent<RectTransform>().anchoredPosition = loc;
|
||||
}
|
||||
}
|
||||
var container = transform.Find("BtnContainer");
|
||||
container.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
container.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
container.Find("BtnCancel").gameObject.SetActive(mapCompetition.CanCancelJoin);
|
||||
container.Find("BtnJoin").gameObject.SetActive(mapCompetition.CanJoin);
|
||||
container.Find("BtnEnter").gameObject.SetActive(mapCompetition.Status != 4);
|
||||
container.Find("BtnWatch").gameObject.SetActive(mapCompetition.Status == 4);
|
||||
//if (transform.Find("BtnContainer") != null)
|
||||
//{
|
||||
// transform.Find("BtnContainer").gameObject.Destroy();
|
||||
//}
|
||||
//if (mapCompetition.Status == 1)
|
||||
//{
|
||||
// var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Enter");
|
||||
// var igame = Instantiate(game);
|
||||
// igame.name = "BtnContainer";
|
||||
// igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
// igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
// igame.transform.SetParent(transform);
|
||||
// igame.transform.localScale = Vector3.one;
|
||||
// var loc = Vector3.zero;
|
||||
// loc.y = myType == ItemType.big ? -252 : -257;
|
||||
// igame.transform.localPosition = loc;
|
||||
//}
|
||||
//else
|
||||
//if (mapCompetition.Status == 4)
|
||||
//{
|
||||
// var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Watch");
|
||||
// var igame = Instantiate(game);
|
||||
// igame.name = "BtnContainer";
|
||||
// igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
// igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
// igame.transform.SetParent(transform);
|
||||
// igame.transform.localScale = Vector3.one;
|
||||
// var loc = Vector3.zero;
|
||||
// loc.y = myType == ItemType.big ? -252 : -257;
|
||||
// igame.transform.localPosition = loc;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (myType == ItemType.big)
|
||||
// {
|
||||
// var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Double-H");
|
||||
// var igame = Instantiate(game);
|
||||
// igame.name = "BtnContainer";
|
||||
// igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
// igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
// igame.transform.Find("BtnJoin").gameObject.SetActive(mapCompetition.CanJoin);
|
||||
// igame.transform.Find("BtnCancel").gameObject.SetActive(mapCompetition.CanCancelJoin);
|
||||
// igame.transform.SetParent(transform);
|
||||
// igame.transform.localScale = Vector3.one;
|
||||
// igame.transform.GetComponent<RectTransform>().anchorMax = new Vector2(0, 0);
|
||||
// igame.transform.GetComponent<RectTransform>().anchorMin = new Vector2(1, 0);
|
||||
// igame.transform.GetComponent<RectTransform>().pivot = new Vector2(0.5f, 0);
|
||||
// var loc = Vector3.zero;
|
||||
// loc.y = 20;
|
||||
// loc.y = 20;
|
||||
// igame.transform.GetComponent<RectTransform>().anchoredPosition = loc;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var game = Resources.Load<GameObject>("UI/Prefab/Race/ButtonGroup/BtnContainer-Double-V");
|
||||
// var igame = Instantiate(game);
|
||||
// igame.name = "BtnContainer";
|
||||
// igame.GetComponent<RaceButtonGroupScript>().map = mapCompetition;
|
||||
// igame.GetComponent<RaceButtonGroupScript>().parent = transform;
|
||||
// igame.transform.Find("BtnJoin").gameObject.SetActive(mapCompetition.CanJoin);
|
||||
// igame.transform.Find("BtnCancel").gameObject.SetActive(mapCompetition.CanCancelJoin);
|
||||
|
||||
// igame.transform.SetParent(transform);
|
||||
// igame.transform.localScale = Vector3.one;
|
||||
// igame.transform.GetComponent<RectTransform>().anchorMax = new Vector2(0, 0);
|
||||
// igame.transform.GetComponent<RectTransform>().anchorMin = new Vector2(1, 0);
|
||||
// igame.transform.GetComponent<RectTransform>().pivot = new Vector2(0.5f, 0);
|
||||
// var loc = Vector3.zero;
|
||||
// loc.y = 20;
|
||||
// igame.transform.GetComponent<RectTransform>().anchoredPosition = loc;
|
||||
// }
|
||||
//}
|
||||
//if (transform.Find("Masking").GetComponent<CanvasGroup>().alpha == 1)
|
||||
//{
|
||||
// transform.Find("BtnContainer").GetComponent<CanvasGroup>().alpha = 1;
|
||||
//}
|
||||
}
|
||||
|
||||
private Dictionary<int, string> statusColorDict = new Dictionary<int, string>
|
||||
@@ -136,9 +154,9 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
else
|
||||
{
|
||||
status.GetComponent<RawImage>().color = Utils.HexToColorHtml(statusColorDict[mapCompetition.Status]);
|
||||
if (mapCompetition.Status == 2 && mapCompetition.HasJoin)
|
||||
if (mapCompetition.Status == 2 && !mapCompetition.HasJoin)
|
||||
{
|
||||
status.Find("Text").GetComponent<Text>().text = "Applied";
|
||||
status.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -149,7 +167,6 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
transform.Find("Masking").GetComponent<CanvasGroup>().DOFade(0, 0.5f);
|
||||
transform.Find("AltitudeCurve").GetComponent<RawImage>().DOFade(0, 0.5f);
|
||||
transform.Find("InfoContainer/Text").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
@@ -176,7 +193,6 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
Cursor.SetCursor(Resources.Load<Texture2D>("Images/PointerButtonHover"), Vector2.zero, CursorMode.Auto);
|
||||
transform.Find("Masking").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
transform.Find("AltitudeCurve").GetComponent<RawImage>().DOFade(1, 0.5f);
|
||||
transform.Find("InfoContainer/Text").GetComponent<CanvasGroup>().DOFade(0, 0.5f);
|
||||
@@ -211,12 +227,18 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
var res = ConfigHelper.mapCompetitionApi.ApplyMapCompetition(mapCompetition.Id);
|
||||
if (res.result)
|
||||
{
|
||||
mapCompetition.HasJoin = true;
|
||||
mapCompetition.CanJoin = false;
|
||||
transform.Find("CountContainer/Text").GetComponent<Text>().text = (++mapCompetition.ApplyCount).ToString();
|
||||
SetStatus(mapCompetition);
|
||||
transform.Find("BtnContainer").gameObject.Destroy();
|
||||
SetButtonGroup(mapCompetition);
|
||||
|
||||
//mapCompetition.HasJoin = true;
|
||||
//mapCompetition.CanJoin = false;
|
||||
//transform.Find("CountContainer/Text").GetComponent<Text>().text = (++mapCompetition.ApplyCount).ToString();
|
||||
//SetStatus(mapCompetition);
|
||||
//transform.Find("BtnContainer").gameObject.Destroy();
|
||||
//SetButtonGroup(mapCompetition);
|
||||
var res1 = ConfigHelper.mapCompetitionApi.GetById(mapCompetition.Id);
|
||||
if (res1.result)
|
||||
{
|
||||
Initial(res1.data, null);
|
||||
}
|
||||
Utils.showToast(null, "Successful application!", type: 1);
|
||||
}
|
||||
else
|
||||
@@ -229,12 +251,17 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
var res = ConfigHelper.mapCompetitionApi.CancelMapCompetition(mapCompetition.Id);
|
||||
if (res.result)
|
||||
{
|
||||
mapCompetition.HasJoin = false;
|
||||
mapCompetition.CanJoin = true;
|
||||
transform.Find("CountContainer/Text").GetComponent<Text>().text = (--mapCompetition.ApplyCount).ToString();
|
||||
SetStatus(mapCompetition);
|
||||
transform.Find("BtnContainer").gameObject.Destroy();
|
||||
SetButtonGroup(mapCompetition);
|
||||
//mapCompetition.HasJoin = false;
|
||||
//mapCompetition.CanJoin = true;
|
||||
//transform.Find("CountContainer/Text").GetComponent<Text>().text = (--mapCompetition.ApplyCount).ToString();
|
||||
//SetStatus(mapCompetition);
|
||||
//transform.Find("BtnContainer").gameObject.Destroy();
|
||||
//SetButtonGroup(mapCompetition);
|
||||
var res1 = ConfigHelper.mapCompetitionApi.GetById(mapCompetition.Id);
|
||||
if (res1.result)
|
||||
{
|
||||
Initial(res1.data, null);
|
||||
}
|
||||
Utils.showToast(null, "Successful cancellation application!", type: 1);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -26,6 +26,7 @@ public class RaceListScript : RaceScript
|
||||
{
|
||||
base.Show();
|
||||
handleAvatar();
|
||||
//Refresh();
|
||||
}
|
||||
//筛选条件
|
||||
void Start()
|
||||
@@ -44,24 +45,66 @@ public class RaceListScript : RaceScript
|
||||
var button = t.GetComponent<Button>();
|
||||
var image = t.GetComponent<Image>();
|
||||
var text = t.Find("Text").GetComponent<Text>();
|
||||
UIManager.AddEvent(button.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
if (t.name == "Btn1")
|
||||
{
|
||||
Color c1 = Utils.HexToColorHtml("#23232D");
|
||||
if (image.color.r == c1.r && image.color.g == c1.g && image.color.b == c1.b)
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
UIManager.AddEvent(button.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Add(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
else
|
||||
foreach (Transform t1 in statusOptionContainer)
|
||||
{
|
||||
var image1 = t1.GetComponent<Image>();
|
||||
var text1 = t1.Find("Text").GetComponent<Text>();
|
||||
if (t1.name == t.name)
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#F93086");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#23232D");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
}
|
||||
statusOptions.Clear();
|
||||
scroll.GetComponent<ScrollRect>().verticalNormalizedPosition = 1;
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.AddEvent(button.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
image.color = c1;
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Remove(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
scroll.GetComponent<ScrollRect>().verticalNormalizedPosition = 1;
|
||||
Refresh();
|
||||
});
|
||||
Color c1 = Utils.HexToColorHtml("#23232D");
|
||||
if (image.color.r == c1.r && image.color.g == c1.g && image.color.b == c1.b)
|
||||
{
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Add(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
else
|
||||
{
|
||||
image.color = c1;
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Remove(RaceFilterOptions.statusDict[text.text]);
|
||||
}
|
||||
Transform t1 = statusOptionContainer.GetChild(0);
|
||||
var image1 = t1.GetComponent<Image>();
|
||||
var text1 = t1.Find("Text").GetComponent<Text>();
|
||||
if (statusOptions.Count == 0)
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#F93086");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
image1.color = Utils.HexToColorHtml("#23232D");
|
||||
text1.color = new Color(1, 1, 1, 1);
|
||||
}
|
||||
scroll.GetComponent<ScrollRect>().verticalNormalizedPosition = 1;
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
reserveContainer = transform.Find("ListContainer/Conditions/ReserveContainer");
|
||||
@@ -98,7 +141,11 @@ public class RaceListScript : RaceScript
|
||||
searchInput = transform.Find("ListContainer/Conditions/SearchInput");
|
||||
if (searchInput != null)
|
||||
{
|
||||
UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
//UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
//{
|
||||
// //onEndEdit();
|
||||
//});
|
||||
searchInput.GetComponent<InputField>().onEndEdit.AddListener((string s) =>
|
||||
{
|
||||
onEndEdit();
|
||||
});
|
||||
@@ -114,7 +161,6 @@ public class RaceListScript : RaceScript
|
||||
};
|
||||
});
|
||||
}
|
||||
handleAvatar();
|
||||
Refresh();
|
||||
}
|
||||
|
||||
@@ -143,10 +189,10 @@ public class RaceListScript : RaceScript
|
||||
OnEndDrag(null);
|
||||
}
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
|
||||
{
|
||||
onEndEdit();
|
||||
}
|
||||
//if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
|
||||
//{
|
||||
// onEndEdit();
|
||||
//}
|
||||
}
|
||||
|
||||
private void OnEndDrag(BaseEventData arg0)
|
||||
|
||||
@@ -77,13 +77,30 @@ public class RaceScript : PFUIPanel
|
||||
if (map.Status == 1)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Application Start Time";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
|
||||
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");
|
||||
|
||||
if ((map.StartApplyTime - UIManager.Now.GetDateTime()).TotalSeconds < 0 ||
|
||||
(map.StartTime - UIManager.Now.GetDateTime()).TotalSeconds < 0)
|
||||
{
|
||||
var res = ConfigHelper.mapCompetitionApi.GetById(map.Id);
|
||||
if (res.result)
|
||||
{
|
||||
currentItem.GetComponent<RaceItemScript>().Initial(res.data, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (map.Status == 4)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Race End Time";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
|
||||
map.FirstEndTime.HasValue?
|
||||
map.FirstEndTime.Value.ToString("yyyy-MM-dd HH:mm"):map.EndTime.ToString("yyyy-MM-dd HH:mm");
|
||||
}
|
||||
else
|
||||
{
|
||||
//Dictionary<int,>
|
||||
var time = (map.Status == 2 ? map.StartTime.ToLocalTime() : map.EndTime.ToLocalTime()) - UIManager.Now.GetDateTime();
|
||||
@@ -91,7 +108,7 @@ public class RaceScript : PFUIPanel
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 0;
|
||||
var res = ConfigHelper.mapCompetitionApi.GetById(map.Id);
|
||||
if (res.result)
|
||||
if (res.result)
|
||||
{
|
||||
currentItem.GetComponent<RaceItemScript>().Initial(res.data, null);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user