456 {
457 float rainReduction =
GetRain().
GetActual() * GameConstants.RAIN_NOISE_REDUCTION_WEIGHT;
458 float snowfallReduction =
GetSnowfall().
GetActual() * GameConstants.SNOWFALL_NOISE_REDUCTION_WEIGHT;
459
460 if (rainReduction == 0 && snowfallReduction == 0)
461 return 1;
462
463 if (rainReduction > snowfallReduction)
464 return 1 - rainReduction;
465 else
466 return 1 - snowfallReduction;
467 }
proto native Snowfall GetSnowfall()
Returns a snowfall phenomenon object.
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native float GetActual()