登录增加loading&赛事提醒修改
This commit is contained in:
1 parent
51cea743be
commit
dfb80658dd
23 files changed
+2137
-34355
No files matched your search
@@ -10,7 +10,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
public class RaceAlertController : PFUIPanel
|
||||
{
|
||||
public Text Content { get; set; }
|
||||
//public Text Timer { get; set; }
|
||||
public Text Timer { get; set; }
|
||||
public GameObject GoBtn { get; set; }
|
||||
public GameObject Card { get; set; }
|
||||
public GameObject StayBtn { get; set; }
|
||||
@@ -23,7 +23,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
protected override void Awake()
|
||||
{
|
||||
//Card
|
||||
//Timer = this.transform.Find("Card/Timer").GetComponent<Text>();
|
||||
Timer = this.transform.Find("Card/Timer")?.GetComponent<Text>();
|
||||
Content = this.transform.Find("Card/Content").GetComponent<Text>();
|
||||
GoBtn = this.transform.Find("Card/Go").gameObject;
|
||||
StayBtn = this.transform.Find("Card/Stay").gameObject;
|
||||
@@ -35,16 +35,19 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
float t = 1f;
|
||||
private void Update()
|
||||
{
|
||||
//t -= Time.deltaTime;
|
||||
//while (t <= 0)
|
||||
//{
|
||||
// if (ticks > 0)
|
||||
// {
|
||||
// ticks--;
|
||||
// Timer.text = Helper.FormatTicks(ticks);
|
||||
// }
|
||||
// t = 1f;
|
||||
//}
|
||||
t -= Time.deltaTime;
|
||||
while (t <= 0)
|
||||
{
|
||||
if (ticks > 0)
|
||||
{
|
||||
ticks--;
|
||||
if (Timer != null)
|
||||
{
|
||||
Timer.text = Helper.FormatTicks(ticks);
|
||||
}
|
||||
}
|
||||
t += 1f;
|
||||
}
|
||||
}
|
||||
|
||||
public void Set(DateTime startTime, DateTime now,string title, string sceneName, int competitionId,int routeId)
|
||||
@@ -69,6 +72,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
App.CompetitionIdList.Add(CompetitionId);
|
||||
this.Close();
|
||||
Utils.DestroyChildren(transform);
|
||||
DestroyImmediate(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user