Example #1
0
 public override void Show()
 {
     toBeatText.text          = TvGraphicsUtils.ToBeatText(toBeatDistFV.Value);
     canvasGroup.alpha        = 1;
     rectTransform.localScale = new Vector3(0, 1, 1);
     DOTween.Sequence().Append(rectTransform.DOScaleX(1, 0.5f));
 }
Example #2
0
 public override void Show()
 {
     speedText.text           = TvGraphicsUtils.SpeedText(jumpData.Speed);
     canvasGroup.alpha        = 1;
     rectTransform.localScale = new Vector3(0, 1, 1);
     DOTween.Sequence().Append(rectTransform.DOScaleX(1, 0.5f));
 }
        public override void Show()
        {
            canvasGroup.alpha = 1;
            LoadImage();
            SetCountry();

            rectTransform.localScale = new Vector3(0, 1, 1);

            DOTween.Sequence().Append(rectTransform.DOScaleX(1, 0.5f));

            var jumpsCount     = resultsManager.Value.RoundIndex;
            var competitorId   = resultsManager.Value.GetCurrentCompetitorLocalId();
            var competitorBib  = resultsManager.Value.Results[competitorId].Bibs[resultsManager.Value.RoundIndex];
            var competitorRank = resultsManager.Value.LastRank[competitorId];
            var competitor     = GetCompetitorById(competitorId, resultsManager.Value.SubroundIndex);


            jumperName.text = TvGraphicsUtils.JumperNameText(competitor);
            bib.text        = competitorBib.ToString();

            if (resultsManager.Value.StartListIndex + 1 < resultsManager.Value.StartList.Count)
            {
                nextAthleteObj.SetActive(true);
                var nextCompetitorId = resultsManager.Value.StartList[resultsManager.Value.StartListIndex + 1];
                var nextCompetitor   = competitors.competitors[
                    resultsManager.Value.OrderedParticipants[nextCompetitorId]
                    .competitors[resultsManager.Value.SubroundIndex]];
                nextAthleteName.text = TvGraphicsUtils.NextAthleteText(nextCompetitor);
            }
            else
            {
                nextAthleteObj.SetActive(false);
            }

            if (jumpsCount == 0)
            {
                row2.SetActive(false);
            }
            else
            {
                row2.SetActive(true);
                rank.text = competitorRank.ToString();

                var jumpResults = resultsManager.Value.Results[competitorId]
                                  .Results[resultsManager.Value.SubroundIndex];
                var jump = jumpResults.results[resultsManager.Value.RoundIndex - 1];
                total.text = TvGraphicsUtils.PointsText(resultsManager.Value.Results[competitorId].TotalPoints);
                var xx = Mathf.Max(0, jumpsCount - meters.Length);
                foreach (var item in meters)
                {
                    item.text = xx < jumpsCount?TvGraphicsUtils.DistanceText(jumpResults.results[xx].distance) : "";

                    xx++;
                }
            }
        }
        public override void Show()
        {
            canvasGroup.alpha = 1;
            SetCountry();

            rectTransform.localScale        = new Vector3(0, 1, 1);
            judgesMarksTransform.localScale = new Vector3(1, 0, 1);
            DOTween.Sequence().Append(rectTransform.DOScaleX(1, 0.5f)).Append(judgesMarksTransform.DOScaleY(1, 0.5f));

            var jumpsCount   = resultsManager.Value.RoundIndex + 1;
            var competitorId = resultsManager.Value.GetCurrentCompetitorLocalId();
            var bib          = resultsManager.Value.Results[competitorId].Bibs[resultsManager.Value.RoundIndex];
            var rank         = resultsManager.Value.CompetitorRank(competitorId);
            var competitor   =
                competitors.competitors[
                    resultsManager.Value.OrderedParticipants[competitorId]
                    .competitors[resultsManager.Value.SubroundIndex]];
            var team        = competitors.teams[resultsManager.Value.OrderedParticipants[competitorId].id];
            var jumpResults = resultsManager.Value.Results[competitorId].Results[resultsManager.Value.SubroundIndex];

            teamName.text   = team.teamName.ToUpper();
            jumperName.text = TvGraphicsUtils.JumperNameText(competitor);
            bibTeam.text    = bib.ToString();
            bibJumper.text  = (resultsManager.Value.SubroundIndex + 1).ToString();
            rankText.text   = rank.ToString();

            var xx = jumpsCount - meters.Length;

            var jump = jumpResults.results[resultsManager.Value.RoundIndex];

            totalTeam.text   = TvGraphicsUtils.PointsText(resultsManager.Value.Results[competitorId].TotalPoints);
            totalJumper.text = TvGraphicsUtils.PointsText(resultsManager.Value.Results[competitorId]
                                                          .TotalResults[resultsManager.Value.SubroundIndex]);
            wind.SetValues(jump.windPoints);
            gate.SetValues(jump.gatePoints);

            for (var i = 0; i < judgesMarks.Length; i++)
            {
                judgesMarks[i].SetValues(jump.judgesMarks[i], judgesUIData.countries[i],
                                         flagsData.GetFlag(judgesUIData.countries[i]), jump.judgesMask[i]);
            }

            foreach (var item in meters)
            {
                item.text = xx < 0 ? "" : TvGraphicsUtils.DistanceText(jumpResults.results[xx].distance);
                xx++;
            }
        }