赛事卡片bug修正
This commit is contained in:
1 parent
6d1bc8e2c8
commit
4aa6178495
3 files changed
+18
-8
No files matched your search
@@ -9,6 +9,7 @@ public class RaceScript : PFUIPanel
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
protected Transform currentItem { get; set; }
|
||||
IEnumerator _timer { get; set; }
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
@@ -17,7 +18,7 @@ public class RaceScript : PFUIPanel
|
||||
protected void StartTime()
|
||||
{
|
||||
timerFlag = true;
|
||||
StartCoroutine(Timer());
|
||||
StartCoroutine(_timer);
|
||||
}
|
||||
protected void StopTime()
|
||||
{
|
||||
@@ -37,7 +38,8 @@ public class RaceScript : PFUIPanel
|
||||
}
|
||||
else
|
||||
{
|
||||
StopTime();
|
||||
StopCoroutine(_timer);
|
||||
//StopTime();
|
||||
}
|
||||
}
|
||||
private Transform avatar;
|
||||
@@ -62,9 +64,10 @@ public class RaceScript : PFUIPanel
|
||||
private bool timerFlag = false;
|
||||
IEnumerator Timer()
|
||||
{
|
||||
while (timerFlag)
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(1.0f); // 停止执行1秒
|
||||
yield return new WaitForSeconds(1.0f); //
|
||||
Debug.Log(123);
|
||||
HandleTime();
|
||||
//time = UIManager.Now.GetDateTime().AddSeconds(1);
|
||||
}
|
||||
@@ -131,9 +134,9 @@ public class RaceScript : PFUIPanel
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
void Awake()
|
||||
{
|
||||
|
||||
_timer = Timer();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
Reference in new issue
Block a user