Merge remote-tracking branch 'origin/dev_release' into dev_release

This commit is contained in:
CaiYanPeng 2021-11-24 10:16:14 +08:00
commit 350103d5a9
2 changed files with 12 additions and 2 deletions

View File

@ -49,6 +49,7 @@ namespace Assets.Scenes.Ride.Scripts
altitudeGraph.gameObject.SetActive(false);
//暂停按钮禁用
pauseButton.interactable = false;
InitGameObject();
}
protected override void Update()
{
@ -67,7 +68,12 @@ namespace Assets.Scenes.Ride.Scripts
//开始骑行-加个5秒钟倒计时
public override void StartRide()
{
competitionModel = mainController.cyclingController as CompetitionModel;
}
public void InitGameObject()
{
competitionModel = mainController.cyclingController as CompetitionModel;
#if UNITY_IOS || UNITY_ANDROID
countDownPanel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Match/Mobile/CountDownPanel"), uipanel.transform);

View File

@ -23,13 +23,17 @@ namespace Assets.Scenes.Ride.Scripts
CountTimer = transform.Find("Timer").GetComponent<Text>();
TimerTitle = transform.Find("ConpetitionTimerTitle").GetComponent<Text>();
Timer = transform.Find("ConpetitionTimer").GetComponent<Text>();
competitionModel = cyclingController.cyclingController as CompetitionModel;
}
GameObject competitionResultPanel { get; set; }
private void Update()
{
if (competitionModel == null)
{
competitionModel = cyclingController.cyclingController as CompetitionModel;
}
if (competitionModel != null)
{
var count = competitionModel.StartCountdown();