Merge remote-tracking branch 'origin/dev_mobile_ble' into dev_mobile

This commit is contained in:
CaiYanPeng 2021-09-16 20:35:25 +08:00
commit 40b6205abc
2 changed files with 8 additions and 5 deletions

View File

@ -566,7 +566,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1} m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -65.95, y: -22} m_AnchoredPosition: {x: -55.95, y: -22}
m_SizeDelta: {x: 28.092041, y: 16} m_SizeDelta: {x: 28.092041, y: 16}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8555668976453305956 --- !u!222 &8555668976453305956

View File

@ -85,7 +85,7 @@ namespace Assets.Scenes.Ride.Scripts
//3.开始按钮 //3.开始按钮
rideNow.gameObject.SetActive(_canEnter); rideNow.gameObject.SetActive(_canEnter);
//4.详情按钮 //4.详情按钮
Detail.SetActive(!_canEnter); Detail.SetActive(!_canEnter && !_canWatch);
//5.取消报名按钮 (比赛开始前可以取消报名) //5.取消报名按钮 (比赛开始前可以取消报名)
CancelJoin.SetActive(_canCancelApply); CancelJoin.SetActive(_canCancelApply);
@ -98,7 +98,7 @@ namespace Assets.Scenes.Ride.Scripts
CompetitionStatus.text = competition.StatusVlaue.ToString(); CompetitionStatus.text = competition.StatusVlaue.ToString();
} }
Watch.GetComponent<Button>().enabled = process>=100; //Watch.GetComponent<Button>().enabled = process>=100;
Watch.GetComponent<Button>().interactable = process >= 100; Watch.GetComponent<Button>().interactable = process >= 100;
} }
#endregion #endregion
@ -149,7 +149,8 @@ namespace Assets.Scenes.Ride.Scripts
Watcher = Resources.Load<GameObject>("UI/Prefab/Match/Watcher"); Watcher = Resources.Load<GameObject>("UI/Prefab/Match/Watcher");
MoreHead = Resources.Load<GameObject>("UI/Prefab/Match/MoreHead"); MoreHead = Resources.Load<GameObject>("UI/Prefab/Match/MoreHead");
#endif #endif
Watch.GetComponent<Button>().enabled = false; //Watch.GetComponent<Button>().enabled = false;
Watch.GetComponent<Button>().interactable = false; Watch.GetComponent<Button>().interactable = false;
UIManager.AddEvent(ReadMore, EventTriggerType.PointerClick, ReadCompetitionPreview); UIManager.AddEvent(ReadMore, EventTriggerType.PointerClick, ReadCompetitionPreview);
@ -267,6 +268,8 @@ namespace Assets.Scenes.Ride.Scripts
//观察 //观察
protected void StartWatch(BaseEventData baseEvent) protected void StartWatch(BaseEventData baseEvent)
{ {
if (!Watch.GetComponent<Button>().interactable)
return;
UpdateCompetition(); UpdateCompetition();
if (competition.Status == 4) if (competition.Status == 4)
{ {
@ -323,7 +326,7 @@ namespace Assets.Scenes.Ride.Scripts
Utils.showToast(gameObject, rrr.errMsg); Utils.showToast(gameObject, rrr.errMsg);
} }
rideNow.gameObject.SetActive(_canStart); rideNow.gameObject.SetActive(_canStart);
Detail.SetActive(!_canStart); Detail.SetActive(!_canStart && !_canWatch);
UIManager.CloseConfirm(); UIManager.CloseConfirm();
}); });