修改细节
This commit is contained in:
1 parent
164db7c013
commit
ca938ab6f5
16 files changed
+1608
-51
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using Assets.Scripts;
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -8,6 +9,11 @@ public class RaceScript : PFUIPanel
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
protected Transform currentItem { get; set; }
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
transform.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
}
|
||||
protected void StartTime()
|
||||
{
|
||||
timerFlag = true;
|
||||
@@ -34,6 +40,20 @@ public class RaceScript : PFUIPanel
|
||||
StopTime();
|
||||
}
|
||||
}
|
||||
private Transform avatar;
|
||||
protected void handleAvatar()
|
||||
{
|
||||
avatar = transform.Find("Avatar");
|
||||
if (avatar != null)
|
||||
{
|
||||
Debug.Log(App.CurrentUser.WxHeadImg);
|
||||
Utils.DisplayImage(avatar.GetComponent<RawImage>(), App.CurrentUser.WxHeadImg, true);
|
||||
UIManager.AddEvent(avatar.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
UIManager.ShowUserInfoPanel();
|
||||
});
|
||||
}
|
||||
}
|
||||
/*参考代码
|
||||
var second = Math.Ceiling((Now - mapCompetition.StartTime.ToLocalTime()).TotalSeconds);
|
||||
|
||||
@@ -54,7 +74,6 @@ public class RaceScript : PFUIPanel
|
||||
if (currentItem != null && currentItem.Find("GetReadyContainer").gameObject.activeSelf)
|
||||
{
|
||||
var map = currentItem.GetComponent<RaceItemScript>().mapCompetition;
|
||||
Debug.Log(map.Status);
|
||||
if (map.Status == 1)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Application Start Time";
|
||||
@@ -67,16 +86,21 @@ public class RaceScript : PFUIPanel
|
||||
else
|
||||
{
|
||||
//Dictionary<int,>
|
||||
var time = (map.Status == 1 ? map.StartTime.ToLocalTime() : map.EndTime.ToLocalTime()) - UIManager.Now.GetDateTime();
|
||||
var time = (map.Status == 2 ? map.StartTime.ToLocalTime() : map.EndTime.ToLocalTime()) - UIManager.Now.GetDateTime();
|
||||
if (time.TotalSeconds < 0)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 0;
|
||||
var res = ConfigHelper.mapCompetitionApi.GetById(map.Id);
|
||||
if (res.result)
|
||||
{
|
||||
currentItem.GetComponent<RaceItemScript>().Initial(res.data, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 1;
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text
|
||||
= map.Status == 1 ? "Get Ready" : "Riding Time";
|
||||
= map.Status == 2 ? "Get Ready" : "Riding Time";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text
|
||||
= Utils.GetCountDown(time);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user