public static JumpResult GetJumpResult(IJumpData jumpData, IHillInfo hillInfo, bool gateComp, bool windComp)
        {
            var jump = new JumpResult(jumpData.Distance, jumpData.JudgesMarks, jumpData.GatesDiff, jumpData.Wind,
                                      jumpData.Speed);

            jump.distancePoints = hillInfo.GetDistancePoints(jump.distance);
            jump.windPoints     = windComp ? hillInfo.GetWindPoints(jump.wind) : 0m;
            jump.gatePoints     = gateComp ? hillInfo.GetGatePoints(jump.gatesDiff) : 0m;
            jump.totalPoints    = Math.Max(0,
                                           jump.distancePoints + jump.judgesTotalPoints + jump.windPoints + jump.gatePoints);
            return(jump);
        }
        private void HillSetUp(GameSave save, int eventId, EventInfo currentEventInfo)
        {
            var hillId = save.calendar.events[eventId].hillId;

            hill.profileData.Value = hillsRepository.GetProfileData(hillId);
            hill.landingAreaSO     = hillsFactory.landingAreas[(int)currentEventInfo.hillSurface].Value;
            var track = currentEventInfo.hillSurface == HillSurface.Matting
                ? hill.profileData.Value.inrunData.summerTrack
                : hill.profileData.Value.inrunData.winterTrack;

            hill.inrunTrackSO = hillsFactory.inrunTracks[(int)track].Value;
            hill.GenerateMesh();

            _hillInfo             = hillsRepository.GetHillInfo(hillId);
            var(head, tail, gate) = compensationsJumpSimulator.GetCompensations();
            _hillInfo.SetCompensations(head, tail, gate);
        }
Ejemplo n.º 3
0
 public void Initialize(EventInfo eventInfo, List <Participant> orderedParticipants,
                        IHillInfo hillInfo)
 {
     Value = new ResultsManager(eventInfo, orderedParticipants, hillInfo);
 }