405 {
406 float rainReduction =
GetRain().
GetActual() * GameConstants.RAIN_NOISE_REDUCTION_WEIGHT;
407 float snowfallReduction =
GetSnowfall().
GetActual() * GameConstants.SNOWFALL_NOISE_REDUCTION_WEIGHT;
408
409 if (rainReduction == 0 && snowfallReduction == 0)
410 return 1;
411
412 if (rainReduction > snowfallReduction)
413 return 1 - rainReduction;
414 else
415 return 1 - snowfallReduction;
416 }
proto native Snowfall GetSnowfall()
Returns a snowfall phenomenon object.
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native float GetActual()