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

+63
View File
@@ -0,0 +1,63 @@
using System;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
using Assets.Scripts.UI.Control;
using Assets.Scripts;
public class MultiTips:PFUIText
{
private Text text;
private Button button;
private string[] tips { get; set; }
private int currentIndex = 0;
new void Awake()
{
base.Awake();
text = GetComponent<Text>();
var tiplist = ConfigHelper.mapApi.GetTipsList();
if (!string.IsNullOrEmpty(tiplist))
{
tips = tiplist.Split(',');
}
var random = new System.Random();
currentIndex = random.Next(0, tips.Length);
SetText();
}
// Start is called before the first frame update
new void Start()
{
base.Awake();
}
public void SetText()
{
if(text == null)
{
return;
}
if (currentIndex <= tips.Length)
{
text.text = tips[currentIndex];
if (currentIndex + 1 < tips.Length)
{
currentIndex++;
}
else
{
currentIndex = 0;
}
}
}
float time = 5f;
// Update is called once per frame
void Update()
{
time -= Time.deltaTime;
while (time<0)
{
SetText();
time += 5f;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 81e6186d0c08df64ba2687b894591e90
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -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
{