public void UpdateToBeat() { if (resultsManager.Value.StartListIndex == 0 && resultsManager.Value.SubroundIndex == 0) { jumpData.InitGate = jumpData.Gate; } toBeatLineController.CompensationPoints = (float)(_hillInfo.GetGatePoints(jumpData.GatesDiff) + _hillInfo.GetWindPoints(jumpData.Wind)); onWindGateChanged.Invoke(); }
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); }