ar骑行bug fix
This commit is contained in:
1 parent
2c9440f656
commit
08b92e7e9b
37 files changed
+3233
-3358
No files matched your search
@@ -80,7 +80,7 @@ public class GameRoomListController : PFUIPanel
|
||||
private int CloseTime;
|
||||
private int Members;
|
||||
private GameRoomModel GameRoom;
|
||||
|
||||
private int RoomId;
|
||||
|
||||
[SerializeField]
|
||||
RectTransform _rectTransform;
|
||||
@@ -181,12 +181,6 @@ public class GameRoomListController : PFUIPanel
|
||||
Total = roomList.GameRoomTotal;
|
||||
ListChanged = true;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// list = null;
|
||||
// Total = 0;
|
||||
// ListChanged = true;
|
||||
//}
|
||||
//查询自己当前创建的房间信息并进入
|
||||
var info = message.Where(c => c.RoomList != null && c.RoomList.Where(o => o.UserId == App.CurrentUser.Id && o.Status == 0).Any()).FirstOrDefault();
|
||||
if (info != null)
|
||||
@@ -194,11 +188,15 @@ public class GameRoomListController : PFUIPanel
|
||||
GameRoom = info.RoomList[0];
|
||||
App.gameRoomDetail = GameRoom;
|
||||
CreateRoomSuccessed = true;
|
||||
//进入房间清空列表
|
||||
list = null;
|
||||
Total = 0;
|
||||
ListChanged = true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Debug.LogError(e);
|
||||
}
|
||||
}
|
||||
protected override void Start()
|
||||
@@ -223,7 +221,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()
|
||||
{
|
||||
//房间已经进行骑行时间
|
||||
@@ -257,7 +255,7 @@ public class GameRoomListController : PFUIPanel
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//列表改变事件
|
||||
if (ListChanged)
|
||||
{
|
||||
Refreash();
|
||||
@@ -270,25 +268,29 @@ public class GameRoomListController : PFUIPanel
|
||||
CreateClicked = false;
|
||||
UIManager.ShowGameRoomDetailPanel();
|
||||
}
|
||||
|
||||
//LOOM中取数据渲染下载当前下载进度
|
||||
var downLoadList = transform.Find("DownLoadList").gameObject;
|
||||
var downloadPanel = transform.Find("DownloadPanel").gameObject;
|
||||
if (Loom.DownLoadTaskList.Count>0)
|
||||
var list = Loom.DownloadStack.Where(c => c.Value.Process < 1);
|
||||
if (list.Count() > 0)
|
||||
{
|
||||
downLoadList.SetActive(true);
|
||||
var downloadPanel = transform.Find("DownloadPanel").gameObject;
|
||||
var content = downLoadList.transform.Find("Viewport/Content");
|
||||
foreach (var item in Loom.DownLoadTaskList)
|
||||
var currentList = FindObjectsOfType<GameRoomDownloadTask>();
|
||||
foreach (var item in list)
|
||||
{
|
||||
var done = fileNameList.Where(c => c.Equals(item.Key)).Any();
|
||||
if (!done)
|
||||
var loaded = currentList.Where(c => c.FileName.Equals(item.Key)).Any();
|
||||
if (!loaded)
|
||||
{
|
||||
fileNameList.Add(item.Key);
|
||||
var newtask = Instantiate(_downLoadTask, content);
|
||||
newtask.GetComponent<GameRoomDownloadTask>().Init(0, item.Key, downloadPanel);
|
||||
newtask.GetComponent<GameRoomDownloadTask>().Init(0, item.Key, item.Value.DisplayName, downloadPanel);
|
||||
}
|
||||
downLoadList.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
downLoadList.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitStep1()
|
||||
@@ -744,7 +746,7 @@ public class GameRoomListController : PFUIPanel
|
||||
//查询fileUrl
|
||||
GameRoom.FileUrl = ConfigHelper.GameRoomApi.GetMapVideoURL(GameRoom.MapRouteId).data;
|
||||
download.SetActive(true);
|
||||
download.GetComponent<GameRoomDownLoad>().Init(RoomId, GameRoom.FileName, GameRoom.FileUrl, this);
|
||||
download.GetComponent<GameRoomDownLoad>().Init(RoomId, GameRoom.FileName, GameRoom.FileUrl, this, GameRoom.MapRouteName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -785,6 +787,7 @@ public class GameRoomListController : PFUIPanel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowStatusModal(Transform tr,GameRoomModel data)
|
||||
{
|
||||
tr.Find("Modal/Id").GetComponent<Text>().text = data.RoomId.ToString().PadLeft(7, '0');
|
||||
@@ -814,7 +817,7 @@ public class GameRoomListController : PFUIPanel
|
||||
UIManager.AddEvent(quit, EventTriggerType.PointerClick, (e) => { tr.gameObject.SetActive(false); });
|
||||
tr.gameObject.SetActive(true);
|
||||
}
|
||||
private int RoomId;
|
||||
|
||||
|
||||
public void GetInRoom()
|
||||
{
|
||||
@@ -837,6 +840,7 @@ public class GameRoomListController : PFUIPanel
|
||||
MapUDPService.SendJoinGameRoom(App.gameRoomDetail.RoomId,App.CurrentUser.Id,UIManager.Now.GetDateTime().ToUniversalTime());
|
||||
UIManager.ShowGameRoomDetailPanel();
|
||||
}
|
||||
|
||||
public void SelectRoom(GameRoomModel room)
|
||||
{
|
||||
GameRoom = room;
|
||||
@@ -881,6 +885,7 @@ public class GameRoomListController : PFUIPanel
|
||||
tabContainer.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImage(map.CountryCode);
|
||||
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
content.transform.DestroyChildren();
|
||||
|
||||
Reference in new issue
Block a user