骑行数据逻辑调整

This commit is contained in:
lishuo committed 2021-04-27 20:28:03 +08:00
1 parent 8226b8a7c2
commit 00b9c7e796
15 files changed
+4173 -21344

No files matched your search

+1 -1
View File
@@ -73,7 +73,7 @@ namespace Assets.Scripts.Apis.Models
private void CalcDistance()
{
//_List[0].Distance = 0;
for (int i = 1; i < _List.Count - 1; i++)
for (int i = 0; i < _List.Count - 1; i++)
{
var pt1 = Turf.Point(new double[] { _List[i].Point[1], _List[i].Point[0] });
var pt2 = Turf.Point(new double[] { _List[i+1].Point[1], _List[i+1].Point[0] });
+15
View File
@@ -135,6 +135,21 @@ namespace Assets.Scripts
loading.GetComponent<LoadingPf>().Initial();
loading.gameObject.SetActive(true);
}
public static void showLoadingExtension(this GameObject game)
{
var loading = game.transform.Find("Loading");
if (loading == null)
{
var newLoading = MonoBehaviour.Instantiate(Resources.Load<GameObject>("UI/Prefab/Common/Loading"));
newLoading.name = "Loading";
newLoading.GetComponent<RectTransform>().position = new Vector3(Screen.width / 2, Screen.height / 2, 0);
newLoading.transform.parent = game.transform;
loading = newLoading.transform;
}
loading.GetComponent<LoadingPf>().Initial();
loading.gameObject.SetActive(true);
}
public static void hideLoading(this GameObject game)
{
var parent = Utils.FindUpParent(game.transform);