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_AnchorMin: {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_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8555668976453305956

View File

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