Merge branch 'dev_lishuo' into dev
This commit is contained in:
commit
7eb76291ec
@ -92,7 +92,8 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
else if (recorderData.EndDistance > 0)//没有骑,但是有初始位置的情况
|
||||
{
|
||||
var point = _turfHelper.Along(recorderData.EndDistance);
|
||||
MapUDPService.Send(route.RouteInstance.Id, recorderData.BelongUserId, new double[] { point.Latitude, point.Longitude }, competitionId: recorderData.Competitionid);
|
||||
//MapUDPService.Send(route.RouteInstance.Id, recorderData.BelongUserId, new double[] { point.Latitude, point.Longitude }, competitionId: recorderData.Competitionid);
|
||||
MapUDPService.Send(route.RouteInstance.Id, recorderData.BelongUserId, new double[] { point.Latitude, point.Longitude }, endDistance:recorderData.EndDistance,preDistance: recorderData.EndDistance, competitionId: recorderData.Competitionid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -77,6 +77,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (endistance > mapDataModel.TotalDistance)
|
||||
{
|
||||
onIndex = pointList.Count-2;
|
||||
}
|
||||
return onIndex;
|
||||
}
|
||||
|
||||
@ -87,8 +91,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
public void MoveHead(Transform parent)
|
||||
{
|
||||
var itemIndex = chartDataSourceScript.GetViewIndex(GetCurrentIndex(TotalDistance, mainController.GetMapData())) + 1;
|
||||
var itemIndex = chartDataSourceScript.GetViewIndex(GetCurrentIndex(TotalDistance, mainController.GetMapData()))+1;
|
||||
var m = graph.DataSource.GetPoint("Player 2", itemIndex);
|
||||
Debug.Log(itemIndex.ToString() + "=" + TotalDistance.ToString());
|
||||
graph.PointToWorldSpace(out Vector3 itemPosition, m.x, m.y, "Player 2");
|
||||
itemPosition.x -= 12f;
|
||||
itemPosition.y += 5f;
|
||||
@ -100,6 +105,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
headPanel.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
|
||||
headPanel.transform.position = itemPosition;
|
||||
}
|
||||
else
|
||||
{
|
||||
headPanel.transform.DOMove(new Vector3(itemPosition.x, itemPosition.y, 0), 1);
|
||||
}
|
||||
if (head == null)
|
||||
{
|
||||
head = headPanel.GetComponentInChildren<RawImage>();
|
||||
@ -113,7 +122,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
headPanel.transform.DOMove(new Vector3(itemPosition.x, itemPosition.y, 0), 1);
|
||||
|
||||
}
|
||||
|
||||
public void ShowInfoPanel(Vector3 playerScreenPos)
|
||||
|
||||
@ -106,8 +106,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
_Lon = currentlatlong.y,
|
||||
_TotalClimb = totalClimb,
|
||||
};
|
||||
recorderData.PreDistance = TotalDistance - Distance;
|
||||
recorderData.EndDistance = TotalDistance;
|
||||
|
||||
recorderData.PreDistance = targetData._Distance - Distance;
|
||||
recorderData.EndDistance = targetData._Distance;
|
||||
recorderData.RiderDatas.Add(targetData);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user