ar观察者模式

This commit is contained in:
lishuo committed 2023-01-31 18:22:15 +08:00
1 parent df936c4e04
commit 7822584cdd
62 files changed
+8331 -7049

No files matched your search

@@ -23,12 +23,13 @@ public class GameRoomCountDownController : PFUIPanel
{
base.Show();
}
public void Init(int seconds,Action action,bool isEnd = false)
private bool isSimple { get; set; }
public void Init(int seconds,Action action,bool isEnd = false,bool isSimple = false)
{
Seconds = seconds;
Callback = action;
endCount.gameObject.SetActive(isEnd);
this.isSimple = isSimple;
}
public override void Close()
@@ -52,7 +53,14 @@ public class GameRoomCountDownController : PFUIPanel
}
else
{
count.text = Helper.FormatTicks(Seconds);
if (isSimple)
{
count.text = Seconds.ToString();
}
else
{
count.text = Helper.FormatTicks(Seconds);
}
endCount.text = Helper.FormatTicks(Seconds);
}
Seconds--;
@@ -223,7 +223,7 @@ public class GameRoomListController : PFUIPanel
MapUDPService.MessageListener = ListenerHandler;
MapUDPService.SendQueryGameRoomList(App.CurrentUser.Id, pageHelper.PageIndex, pageHelper.PageSize, seachName);
}
private List<string> fileNameList = new List<string>();
private void Update()
{
//房间已经进行骑行时间
@@ -277,12 +277,12 @@ public class GameRoomListController : PFUIPanel
if (Loom.DownLoadTaskList.Count>0)
{
var content = downLoadList.transform.Find("Viewport/Content");
var taskList = FindObjectsOfType<GameRoomDownloadTask>();
foreach (var item in Loom.DownLoadTaskList)
{
var done = taskList.Where(c => c.FileName.Equals(item.Key)).Any();
var done = fileNameList.Where(c => c.Equals(item.Key)).Any();
if (!done)
{
fileNameList.Add(item.Key);
var newtask = Instantiate(_downLoadTask, content);
newtask.GetComponent<GameRoomDownloadTask>().Init(0, item.Key, downloadPanel);
}