Merge remote-tracking branch 'origin/dev_nonearth' into dev_cyp

# Conflicts:
#	Assets/Scenes/Login-Mobile.unity
#	Assets/Scripts/UI/Prefab/Panel/NewRouteDetailController.cs
This commit is contained in:
Caiyanpeng committed 2021-12-28 11:26:34 +08:00
commit f23fc4b4c0
45 files changed
+4765 -1412

No files matched your search

@@ -1,6 +1,8 @@
using Assets.Scripts;
using Assets.Scenes.Ride.Scripts;
using Assets.Scripts;
using Assets.Scripts.Apis.Models;
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -18,6 +20,8 @@ public class NewRouteDetailController : PFUIPanel
{false,Resources.Load<Sprite>("Images/NewDesign/icon_heji_unlike") },
{true,Resources.Load<Sprite>("Images/NewDesign/icon_heji_like") },
};
List<int> routeIds { get; set; }
protected override void Awake()
{
caches = new Dictionary<string, Texture>();
@@ -85,7 +89,7 @@ public class NewRouteDetailController : PFUIPanel
rect.offsetMin = new Vector2(rect.offsetMin.x, 0);
BindHeadImage();
}
float timer = 1f;
// Update is called once per frame
void Update()
{
@@ -104,6 +108,18 @@ public class NewRouteDetailController : PFUIPanel
OnEndDrag(null);
}
}
timer -= Time.deltaTime;
while (timer < 0)
{
var list = MapUDPService.GetAllOnlineUserList();
if (list.Count > 0 && routeIds != null)
{
//当前集合骑行人数
var currentUserCount = list.Where(c => routeIds.Contains(c.RouteId)).Count();
Debug.Log($"当前集合骑行人数{currentUserCount}");
}
timer += 1f;
}
}
MapRouteAreaItem area;
int pageIndex = 0, pageSize = 10;
@@ -171,9 +187,10 @@ public class NewRouteDetailController : PFUIPanel
var res = await ConfigHelper.mapApi.GetMapRouteAreaDetailList(area.Id, pageIndex, pageSize);
if (res.result)
{
if (res.data.Count > 0)
if (res.data.RouteList.Count > 0)
{
DisplayMaps(res.data);
DisplayMaps(res.data.RouteList);
routeIds = res.data.RouteIds;
}
else
{