ar观察者模式
This commit is contained in:
1 parent
df936c4e04
commit
7822584cdd
62 files changed
+8331
-7049
No files matched your search
@@ -43,15 +43,15 @@ class GameRoomDownLoad : MonoBehaviour
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
downLoadList.SetActive(true);
|
||||
var content = downLoadList.transform.Find("Viewport/Content");
|
||||
var list = FindObjectsOfType<GameRoomDownloadTask>();
|
||||
//新增
|
||||
var obj = list.Where(c => c.RoomId == RoomId).FirstOrDefault();
|
||||
if (obj == null)
|
||||
{
|
||||
var newtask = Instantiate(downLoadTask, content);
|
||||
newtask.GetComponent<GameRoomDownloadTask>().Init(RoomId, FileName,gameObject);
|
||||
}
|
||||
//var content = downLoadList.transform.Find("Viewport/Content");
|
||||
//var list = FindObjectsOfType<GameRoomDownloadTask>();
|
||||
////新增
|
||||
//var obj = list.Where(c => c.RoomId == RoomId).FirstOrDefault();
|
||||
//if (obj == null)
|
||||
//{
|
||||
// var newtask = Instantiate(downLoadTask, content);
|
||||
// newtask.GetComponent<GameRoomDownloadTask>().Init(RoomId, FileName,gameObject);
|
||||
//}
|
||||
});
|
||||
|
||||
UIManager.AddEvent(enterBtn, EventTriggerType.PointerClick, (ee) =>
|
||||
|
||||
@@ -26,7 +26,7 @@ class GameRoomDownloadTask : MonoBehaviour
|
||||
{
|
||||
modal.SetActive(true);
|
||||
modal.GetComponent<GameRoomDownLoad>().ComeIntoStep2(FileName);
|
||||
transform.parent.parent.parent.gameObject.SetActive(false);
|
||||
//transform.parent.parent.parent.gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,8 @@ public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnter
|
||||
var tabContainer = transform.Find("TabContainer");
|
||||
var diff = tabContainer.Find("Diff");
|
||||
diff.Find("Text").GetComponent<Text>().text = myMap.Hard;
|
||||
tabContainer.Find("3d").gameObject.SetActive(myMap.Enable3D);
|
||||
tabContainer.Find("3d").gameObject.SetActive(myMap.Enable3D && !myMap.EnableAR);
|
||||
tabContainer.Find("AR").gameObject?.SetActive(myMap.EnableAR);
|
||||
tabContainer.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImage(myMap.CountryCode);
|
||||
//if (!isModal)
|
||||
//{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user