ant+和http组件bug修复
This commit is contained in:
1 parent
f7b33bf491
commit
48c5b161b1
29 files changed
+3526
-2755
No files matched your search
@@ -87,6 +87,17 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
GameObject settingPanel;
|
||||
Button abandonButton;
|
||||
GameObject singleArea;
|
||||
Sprite downhill1;
|
||||
Sprite uphill1;
|
||||
Sprite straight;
|
||||
|
||||
Sprite downhill1Small;
|
||||
Sprite uphill1Small;
|
||||
Sprite straightSmall;
|
||||
|
||||
Image nextSlopeImage;
|
||||
Image currentSlopeImage;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
#region 控件获取与事件绑定
|
||||
@@ -152,6 +163,18 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
settingPanel = transform.Find("Panel/SettingPanel").gameObject;
|
||||
preSlopeText = transform.Find("Panel/PreSlopePanel/PreSlopeText").GetComponent<Text>();
|
||||
|
||||
nextSlopeImage = transform.Find("Panel/NextSlopePanel/NextSlopeImage").GetComponent<Image>();
|
||||
currentSlopeImage = transform.Find("Panel/CurrentSlopePanel/Image").GetComponent<Image>();
|
||||
|
||||
//加载坡度图片
|
||||
downhill1 = Resources.Load<Sprite>("Images/Ride/downhill 1");
|
||||
uphill1 = Resources.Load<Sprite>("Images/Ride/uphill 1");
|
||||
straight = Resources.Load<Sprite>("Images/Ride/straight");
|
||||
|
||||
downhill1Small = Resources.Load<Sprite>("Images/Ride/downhill-small");
|
||||
uphill1Small = Resources.Load<Sprite>("Images/Ride/uphill-small");
|
||||
straightSmall = Resources.Load<Sprite>("Images/Ride/straight-small");
|
||||
|
||||
target = transform.parent.Find("Target").gameObject;
|
||||
|
||||
UIManager.AddEvent(startBtn.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, StartRide);
|
||||
@@ -204,7 +227,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
Init();
|
||||
RenderChart();
|
||||
ContinueRide();//继续骑行
|
||||
//ContinueRide();//继续骑行
|
||||
}
|
||||
// Update is called once per frame
|
||||
float time = 1f;
|
||||
@@ -250,7 +273,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
//继续骑行如果有伴侣就自动进入伴侣骑行
|
||||
private void ContinueRide()
|
||||
public void ContinueRide()
|
||||
{
|
||||
if (mainController.routeResult != null)
|
||||
{
|
||||
@@ -313,6 +336,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
if (count == 1 && mainController.cyclingModel == CyclingModel.Single)
|
||||
{
|
||||
reviewPanel.GetComponent<CanvasGroup>().DOFade(0, 1);
|
||||
//附近的人
|
||||
// nearByPanel.GetComponent<CanvasGroup>().DOFade(0, 1);
|
||||
}
|
||||
timeRemaining = 1.0f;
|
||||
}
|
||||
@@ -339,6 +364,33 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
|
||||
currentSlopeDistanceText.GetComponent<NumberDotween>().AnimateNum((float)playerController.CurrentSlopeDistance, Math.Round(playerController.CurrentDistance, 0), playerController.CurrentIndex, 0, "{0}M");
|
||||
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
|
||||
//动态改变坡度图片
|
||||
if (playerController.CurrentSlope >= 1 )
|
||||
{
|
||||
currentSlopeImage.sprite = uphill1;
|
||||
}
|
||||
else if(playerController.CurrentSlope > -1|| playerController.CurrentSlope<1)
|
||||
{
|
||||
currentSlopeImage.sprite = straight;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentSlopeImage.sprite = downhill1;
|
||||
}
|
||||
//下一个坡度
|
||||
if (playerController.NextSlope >= 1)
|
||||
{
|
||||
nextSlopeImage.sprite = uphill1Small;
|
||||
}
|
||||
else if (playerController.NextSlope > -1 || playerController.NextSlope < 1)
|
||||
{
|
||||
nextSlopeImage.sprite = straightSmall;
|
||||
}
|
||||
else
|
||||
{
|
||||
nextSlopeImage.sprite = downhill1Small;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//重置游戏
|
||||
@@ -459,13 +511,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
if (clearLock)
|
||||
{
|
||||
clearLock = false;
|
||||
leftPanel.transform.DOLocalMove(new Vector3(leftPanel.transform.localPosition.x + isSimple * -430f, leftPanel.transform.localPosition.y, leftPanel.transform.localPosition.z), 1);
|
||||
leftPanel.transform.DOLocalMove(new Vector3(leftPanel.transform.localPosition.x + isSimple * 430f, leftPanel.transform.localPosition.y, leftPanel.transform.localPosition.z), 1);
|
||||
titlePanel.transform.DOLocalMove(new Vector3(titlePanel.transform.localPosition.x, titlePanel.transform.localPosition.y + isSimple * 200f, titlePanel.transform.localPosition.z), 1);
|
||||
miniMap.transform.DOLocalMove(new Vector3(miniMap.transform.localPosition.x , miniMap.transform.localPosition.y + isSimple * 260f, miniMap.transform.localPosition.z), 1);
|
||||
nextSlopePanel.transform.DOLocalMove(new Vector3(nextSlopePanel.transform.localPosition.x, nextSlopePanel.transform.localPosition.y + isSimple * 260f, nextSlopePanel.transform.localPosition.z), 1);
|
||||
currentSlopePanel.transform.DOLocalMove(new Vector3(currentSlopePanel.transform.localPosition.x, currentSlopePanel.transform.localPosition.y + isSimple * 260f, currentSlopePanel.transform.localPosition.z), 1);
|
||||
currentSlopePanel.transform.DOLocalMove(new Vector3(currentSlopePanel.transform.localPosition.x, currentSlopePanel.transform.localPosition.y + isSimple * 80f, currentSlopePanel.transform.localPosition.z), 1);
|
||||
|
||||
nearByPanel.transform.DOLocalMove(new Vector3(nearByPanel.transform.localPosition.x + isSimple * 330f, nearByPanel.transform.localPosition.y, nearByPanel.transform.localPosition.z), 1).onComplete += () =>
|
||||
nearByPanel.transform.DOLocalMove(new Vector3(nearByPanel.transform.localPosition.x + isSimple * -330f, nearByPanel.transform.localPosition.y, nearByPanel.transform.localPosition.z), 1).onComplete += () =>
|
||||
{
|
||||
clearLock = true;
|
||||
isSimple *= -1;
|
||||
@@ -524,6 +576,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
viewIndex = 0;
|
||||
}
|
||||
|
||||
var n = graph.DataSource.GetPoint("Player 2", viewIndex);
|
||||
graph.PointToWorldSpace(out Vector3 nextPosition, n.x, n.y, "Player 2");
|
||||
nextPosition.x -= 14f;
|
||||
|
||||
Reference in new issue
Block a user